Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: sp3crmsg.h
  8. //
  9. //--------------------------------------------------------------------------
  10. //+-------------------------------------------------------------------------
  11. // File: sp3crmsg.h
  12. //
  13. // Contents: Data structure for enabling NT 4.0 SP3 and IE 3.02 compatible
  14. // PKCS #7 EnvelopeData messages.
  15. //
  16. // The SP3 version of crypt32.dll failed to byte reverse the
  17. // encrypted symmetric key. It also added zero salt instead
  18. // of no salt.
  19. //--------------------------------------------------------------------------
  20. #ifndef __SP3CRMSG_H__
  21. #define __SP3CRMSG_H__
  22. #include <wincrypt.h>
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. //+-------------------------------------------------------------------------
  27. // To enable SP3 compatible encryption, the pvEncryptionAuxInfo field in either
  28. // CMSG_ENVELOPED_ENCODE_INFO for CryptMsgOpenToEncode() or
  29. // CRYPT_ENCRYPT_MESSAGE_PARA for CryptSignAndEncryptMessage() or
  30. // CryptSignAndEncryptMessage() should point to the following
  31. // CMSG_SP3_COMPATIBLE_AUX_INFO data structure.
  32. //--------------------------------------------------------------------------
  33. // The following is defined in newer versions of wincrypt.h, starting with
  34. // IE 4.01 and NT 5.0 Beta 2
  35. #ifndef CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG
  36. //+-------------------------------------------------------------------------
  37. // CMSG_SP3_COMPATIBLE_AUX_INFO
  38. //
  39. // AuxInfo for enabling SP3 compatible encryption.
  40. //
  41. // The CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG is set in dwFlags to enable SP3
  42. // compatible encryption. When set, uses zero salt instead of no salt,
  43. // the encryption algorithm parameters are NULL instead of containing the
  44. // encoded RC2 parameters or encoded IV octet string and the encrypted
  45. // symmetric key is encoded little endian instead of big endian.
  46. //--------------------------------------------------------------------------
  47. typedef struct _CMSG_SP3_COMPATIBLE_AUX_INFO {
  48. DWORD cbSize;
  49. DWORD dwFlags;
  50. } CMSG_SP3_COMPATIBLE_AUX_INFO, *PCMSG_SP3_COMPATIBLE_AUX_INFO;
  51. #define CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG 0x80000000
  52. #endif // CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG
  53. #ifdef __cplusplus
  54. } // Balance extern "C" above
  55. #endif
  56. #endif // __SP3CRMSG_H__