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.

195 lines
9.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: wtoride.h
  8. //
  9. // Contents: Microsoft Internet Security Trust Provider
  10. //
  11. // History: 28-Jul-1997 pberkman created
  12. //
  13. //--------------------------------------------------------------------------
  14. #ifndef WTORIDE_H
  15. #define WTORIDE_H
  16. #ifdef __cplusplus
  17. extern "C"
  18. {
  19. #endif
  20. //
  21. // override wintrust data with both more than and less than
  22. //
  23. typedef struct _WINTRUST_DATA_ORLESS
  24. {
  25. DWORD cbStruct; // = sizeof(WINTRUST_DATA)
  26. LPVOID pPolicyCallbackData; // optional: used to pass data between the app and policy
  27. LPVOID pSIPClientData; // optional: used to pass data between the app and SIP.
  28. DWORD dwUIChoice; // required: UI choice. One of the following.
  29. DWORD fdwRevocationChecks; // required: certificate revocation check options
  30. DWORD dwUnionChoice; // required: which structure is being passed in?
  31. union
  32. {
  33. struct WINTRUST_FILE_INFO_ *pFile; // individual file
  34. struct WINTRUST_CATALOG_INFO_ *pCatalog; // member of a Catalog File
  35. struct WINTRUST_BLOB_INFO_ *pBlob; // memory blob
  36. struct WINTRUST_SGNR_INFO_ *pSgnr; // signer structure only
  37. struct WINTRUST_CERT_INFO_ *pCert;
  38. };
  39. } WINTRUST_DATA_ORLESS, *PWINTRUST_DATA_ORLESS;
  40. typedef struct WINTRUST_FILE_INFO_ORLESS_
  41. {
  42. DWORD cbStruct; // = sizeof(WINTRUST_FILE_INFO)
  43. LPCWSTR pcwszFilePath; // required, file name to be verified
  44. } WINTRUST_FILE_INFO_ORLESS, *PWINTRUST_FILE_INFO_ORLESS;
  45. typedef struct _WINTRUST_DATA_ORMORE
  46. {
  47. DWORD cbStruct; // = sizeof(WINTRUST_DATA)
  48. LPVOID pPolicyCallbackData; // optional: used to pass data between the app and policy
  49. LPVOID pSIPClientData; // optional: used to pass data between the app and SIP.
  50. DWORD dwUIChoice; // required: UI choice. One of the following.
  51. DWORD fdwRevocationChecks; // required: certificate revocation check options
  52. DWORD dwUnionChoice; // required: which structure is being passed in?
  53. union
  54. {
  55. struct WINTRUST_FILE_INFO_ *pFile; // individual file
  56. struct WINTRUST_CATALOG_INFO_ *pCatalog; // member of a Catalog File
  57. struct WINTRUST_BLOB_INFO_ *pBlob; // memory blob
  58. struct WINTRUST_SGNR_INFO_ *pSgnr; // signer structure only
  59. struct WINTRUST_CERT_INFO_ *pCert;
  60. };
  61. DWORD dwStateAction; // optional
  62. HANDLE hWVTStateData; // optional
  63. WCHAR *pwszURLReference; // optional: currently used to determine zone.
  64. DWORD dwExtra[40];
  65. } WINTRUST_DATA_ORMORE, *PWINTRUST_DATA_ORMORE;
  66. typedef struct WINTRUST_FILE_INFO_OR_
  67. {
  68. DWORD cbStruct; // = sizeof(WINTRUST_FILE_INFO)
  69. LPCWSTR pcwszFilePath; // required, file name to be verified
  70. HANDLE hFile; // optional, open handle to pcwszFilePath
  71. DWORD dwExtra[20];
  72. } WINTRUST_FILE_INFO_OR, *PWINTRUST_FILE_INFO_OR;
  73. typedef struct _CRYPT_PROVIDER_FUNCTIONS_ORMORE
  74. {
  75. DWORD cbStruct;
  76. PFN_CPD_MEM_ALLOC pfnAlloc; // set in WVT
  77. PFN_CPD_MEM_FREE pfnFree; // set in WVT
  78. PFN_CPD_ADD_STORE pfnAddStore2Chain; // call to add a store to the chain.
  79. PFN_CPD_ADD_SGNR pfnAddSgnr2Chain; // call to add a sgnr struct to a msg struct sgnr chain
  80. PFN_CPD_ADD_CERT pfnAddCert2Chain; // call to add a cert struct to a sgnr struct cert chain
  81. PFN_CPD_ADD_PRIVDATA pfnAddPrivData2Chain; // call to add provider private data to struct.
  82. PFN_PROVIDER_INIT_CALL pfnInitialize; // initialize Policy data.
  83. PFN_PROVIDER_OBJTRUST_CALL pfnObjectTrust; // build info up to the signer info(s).
  84. PFN_PROVIDER_SIGTRUST_CALL pfnSignatureTrust; // build info to the signing cert
  85. PFN_PROVIDER_CERTTRUST_CALL pfnCertificateTrust; // build the chain
  86. PFN_PROVIDER_FINALPOLICY_CALL pfnFinalPolicy; // final call to policy
  87. PFN_PROVIDER_CERTCHKPOLICY_CALL pfnCertCheckPolicy; // check each cert will building chain
  88. PFN_PROVIDER_TESTFINALPOLICY_CALL pfnTestFinalPolicy; // dump structures to a file (or whatever the policy chooses)
  89. struct _CRYPT_PROVUI_FUNCS *psUIpfns;
  90. // the following was added on 7/23/1997: pberkman
  91. PFN_PROVIDER_CLEANUP_CALL pfnCleanupPolicy; // PRIVDATA cleanup routine.
  92. DWORD dwExtra[40];
  93. } CRYPT_PROVIDER_FUNCTIONS_ORMORE, *PCRYPT_PROVIDER_FUNCTIONS_ORMORE;
  94. typedef struct _CRYPT_PROVIDER_FUNCTIONS_ORLESS
  95. {
  96. DWORD cbStruct;
  97. PFN_CPD_MEM_ALLOC pfnAlloc; // set in WVT
  98. PFN_CPD_MEM_FREE pfnFree; // set in WVT
  99. PFN_CPD_ADD_STORE pfnAddStore2Chain; // call to add a store to the chain.
  100. PFN_CPD_ADD_SGNR pfnAddSgnr2Chain; // call to add a sgnr struct to a msg struct sgnr chain
  101. PFN_CPD_ADD_CERT pfnAddCert2Chain; // call to add a cert struct to a sgnr struct cert chain
  102. PFN_CPD_ADD_PRIVDATA pfnAddPrivData2Chain; // call to add provider private data to struct.
  103. PFN_PROVIDER_INIT_CALL pfnInitialize; // initialize Policy data.
  104. PFN_PROVIDER_OBJTRUST_CALL pfnObjectTrust; // build info up to the signer info(s).
  105. PFN_PROVIDER_SIGTRUST_CALL pfnSignatureTrust; // build info to the signing cert
  106. PFN_PROVIDER_CERTTRUST_CALL pfnCertificateTrust; // build the chain
  107. PFN_PROVIDER_FINALPOLICY_CALL pfnFinalPolicy; // final call to policy
  108. PFN_PROVIDER_CERTCHKPOLICY_CALL pfnCertCheckPolicy; // check each cert will building chain
  109. PFN_PROVIDER_TESTFINALPOLICY_CALL pfnTestFinalPolicy; // dump structures to a file (or whatever the policy chooses)
  110. } CRYPT_PROVIDER_FUNCTIONS_ORLESS, *PCRYPT_PROVIDER_FUNCTIONS_ORLESS;
  111. typedef struct _CRYPT_PROVIDER_CERT_ORMORE
  112. {
  113. DWORD cbStruct;
  114. PCCERT_CONTEXT pCert; // must have its own ref-count!
  115. BOOL fCommercial;
  116. BOOL fTrustedRoot; // certchk policy should set this.
  117. BOOL fSelfSigned; // set in cert provider
  118. BOOL fTestCert; // certchk policy will set
  119. DWORD dwRevokedReason;
  120. DWORD dwConfidence; // set in the Certificate Provider
  121. DWORD dwError;
  122. CTL_CONTEXT *pTrustListContext;
  123. DWORD dwExtra[40];
  124. } CRYPT_PROVIDER_CERT_ORMORE, *PCRYPT_PROVIDER_CERT_ORMORE;
  125. typedef struct _CRYPT_PROVIDER_CERT_ORLESS
  126. {
  127. DWORD cbStruct;
  128. PCCERT_CONTEXT pCert; // must have its own ref-count!
  129. BOOL fCommercial;
  130. BOOL fTrustedRoot; // certchk policy should set this.
  131. BOOL fSelfSigned; // set in cert provider
  132. BOOL fTestCert; // certchk policy will set
  133. DWORD dwRevokedReason;
  134. DWORD dwConfidence; // set in the Certificate Provider
  135. DWORD dwError;
  136. } CRYPT_PROVIDER_CERT_ORLESS, *PCRYPT_PROVIDER_CERT_ORLESS;
  137. #ifdef __cplusplus
  138. }
  139. #endif
  140. #endif // WTORIDE_H