Leaked source code of windows server 2003
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.

187 lines
7.4 KiB

  1. /*****************************************************************************\
  2. * *
  3. * Wab16.h *
  4. * *
  5. \*****************************************************************************/
  6. #ifndef __WAB16_H__
  7. #define __WAB16_H__
  8. #ifdef __cplusplus
  9. extern "C"{
  10. #endif
  11. /*****************************************************************************\
  12. * *
  13. * From windowsx.h(INC32)
  14. * *
  15. \*****************************************************************************/
  16. typedef WCHAR PWCHAR;
  17. #define END_INTERFACE
  18. // From capi.h
  19. #define WTD_UI_ALL 1
  20. #define WTD_UI_NONE 2
  21. #define WTD_UI_NOBAD 3
  22. #define WTD_UI_NOGOOD 4
  23. #define WTD_REVOKE_NONE 0x00000000
  24. #define WTD_REVOKE_WHOLECHAIN 0x00000001
  25. #pragma pack(8)
  26. //////////////////////////////////////////////////////////////////////////////
  27. //
  28. // WINTRUST_DATA Structure
  29. //----------------------------------------------------------------------------
  30. // Used when calling WinVerifyTrust to pass necessary information into
  31. // the Providers.
  32. //
  33. typedef struct _WINTRUST_DATA
  34. {
  35. DWORD cbStruct; // = sizeof(WINTRUST_DATA)
  36. LPVOID pPolicyCallbackData; // optional: used to pass data between the app and policy
  37. LPVOID pSIPClientData; // optional: used to pass data between the app and SIP.
  38. DWORD dwUIChoice; // required: UI choice. One of the following.
  39. # define WTD_UI_ALL 1
  40. # define WTD_UI_NONE 2
  41. # define WTD_UI_NOBAD 3
  42. # define WTD_UI_NOGOOD 4
  43. DWORD fdwRevocationChecks; // required: certificate revocation check options
  44. # define WTD_REVOKE_NONE 0x00000000
  45. # define WTD_REVOKE_WHOLECHAIN 0x00000001
  46. DWORD dwUnionChoice; // required: which structure is being passed in?
  47. # define WTD_CHOICE_FILE 1
  48. # define WTD_CHOICE_CATALOG 2
  49. # define WTD_CHOICE_BLOB 3
  50. # define WTD_CHOICE_SIGNER 4
  51. # define WTD_CHOICE_CERT 5
  52. union
  53. {
  54. struct WINTRUST_FILE_INFO_ *pFile; // individual file
  55. struct WINTRUST_CATALOG_INFO_ *pCatalog; // member of a Catalog File
  56. struct WINTRUST_BLOB_INFO_ *pBlob; // memory blob
  57. struct WINTRUST_SGNR_INFO_ *pSgnr; // signer structure only
  58. struct WINTRUST_CERT_INFO_ *pCert;
  59. };
  60. DWORD dwStateAction; // optional
  61. # define WTD_STATEACTION_IGNORE 0x00000000
  62. # define WTD_STATEACTION_VERIFY 0x00000001
  63. # define WTD_STATEACTION_CLOSE 0x00000002
  64. HANDLE hWVTStateData; // optional
  65. WCHAR *pwszURLReference; // optional: currently used to determine zone.
  66. } WINTRUST_DATA, *PWINTRUST_DATA;
  67. //////////////////////////////////////////////////////////////////////////////
  68. //
  69. // WINTRUST_FILE_INFO Structure
  70. //----------------------------------------------------------------------------
  71. // Used when calling WinVerifyTrust against an individual file.
  72. //
  73. typedef struct WINTRUST_FILE_INFO_
  74. {
  75. DWORD cbStruct; // = sizeof(WINTRUST_FILE_INFO)
  76. LPCWSTR pcwszFilePath; // required, file name to be verified
  77. HANDLE hFile; // optional, open handle to pcwszFilePath
  78. } WINTRUST_FILE_INFO, *PWINTRUST_FILE_INFO;
  79. //////////////////////////////////////////////////////////////////////////////
  80. //
  81. // WINTRUST_CATALOG_INFO Structure
  82. //----------------------------------------------------------------------------
  83. // Used when calling WinVerifyTrust against a member of a Microsoft Catalog
  84. // file.
  85. //
  86. typedef struct WINTRUST_CATALOG_INFO_
  87. {
  88. DWORD cbStruct; // = sizeof(WINTRUST_CATALOG_INFO)
  89. DWORD dwCatalogVersion; // optional: Catalog version number
  90. LPCWSTR pcwszCatalogFilePath; // required: path/name to Catalog file
  91. LPCWSTR pcwszMemberTag; // required: tag to member in Catalog
  92. LPCWSTR pcwszMemberFilePath; // required: path/name to member file
  93. HANDLE hMemberFile; // optional: open handle to pcwszMemberFilePath
  94. } WINTRUST_CATALOG_INFO, *PWINTRUST_CATALOG_INFO;
  95. //////////////////////////////////////////////////////////////////////////////
  96. //
  97. // WINTRUST_BLOB_INFO Structure
  98. //----------------------------------------------------------------------------
  99. // Used when calling WinVerifyTrust against a memory blob.
  100. //
  101. typedef struct WINTRUST_BLOB_INFO_
  102. {
  103. DWORD cbStruct; // = sizeof(WINTRUST_BLOB_INFO)
  104. GUID gSubject; // SIP to load
  105. LPCWSTR pcwszDisplayName; // display name of object
  106. DWORD cbMemObject;
  107. BYTE *pbMemObject;
  108. DWORD cbMemSignedMsg;
  109. BYTE *pbMemSignedMsg;
  110. } WINTRUST_BLOB_INFO, *PWINTRUST_BLOB_INFO;
  111. //////////////////////////////////////////////////////////////////////////////
  112. //
  113. // WINTRUST_SGNR_INFO Structure
  114. //----------------------------------------------------------------------------
  115. // Used when calling WinVerifyTrust against a CMSG_SIGNER_INFO Structure
  116. //
  117. typedef struct WINTRUST_SGNR_INFO_
  118. {
  119. DWORD cbStruct; // = sizeof(WINTRUST_SGNR_INFO)
  120. LPCWSTR pcwszDisplayName; // name of the "thing" the pbMem is pointing to.
  121. CMSG_SIGNER_INFO *psSignerInfo;
  122. DWORD chStores; // number of stores in pahStores
  123. HCERTSTORE *pahStores; // array of stores to add to internal list
  124. } WINTRUST_SGNR_INFO, *PWINTRUST_SGNR_INFO;
  125. //////////////////////////////////////////////////////////////////////////////
  126. //
  127. // WINTRUST_CERT_INFO Structure
  128. //----------------------------------------------------------------------------
  129. // Used when calling WinVerifyTrust against a CERT_CONTEXT Structure
  130. //
  131. typedef struct WINTRUST_CERT_INFO_
  132. {
  133. DWORD cbStruct; // = sizeof(WINTRUST_CERT_INFO)
  134. LPCWSTR pcwszDisplayName; // display name
  135. CERT_CONTEXT *psCertContext;
  136. DWORD chStores; // number of stores in pahStores
  137. HCERTSTORE *pahStores; // array of stores to add to internal list
  138. } WINTRUST_CERT_INFO, *PWINTRUST_CERT_INFO;
  139. #pragma pack()
  140. // End of Capi.h
  141. const CLSID CLSID_HTMLDocument;
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145. #endif // !__WAB16_H__