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.

178 lines
5.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: locals.h
  8. //
  9. // Contents: Microsoft Internet Security Policy Provider
  10. //
  11. //
  12. // History: 05-Jun-1997 pberkman created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef LOCALS_H
  16. #define LOCALS_H
  17. #ifdef __cplusplus
  18. extern "C"
  19. {
  20. #endif
  21. extern HINSTANCE hinst;
  22. #ifndef SECURITY_FLAG_IGNORE_REVOCATION
  23. # define SECURITY_FLAG_IGNORE_REVOCATION 0x00000080
  24. # define SECURITY_FLAG_IGNORE_UNKNOWN_CA 0x00000100
  25. #endif
  26. #ifndef SECURITY_FLAG_IGNORE_WRONG_USAGE
  27. # define SECURITY_FLAG_IGNORE_WRONG_USAGE 0x00000200
  28. #endif
  29. #ifndef szOID_SERVER_GATED_CRYPTO
  30. # define szOID_SERVER_GATED_CRYPTO "1.3.6.1.4.1.311.10.3.3"
  31. #endif
  32. #ifndef szOID_SGC_NETSCAPE
  33. # define szOID_SGC_NETSCAPE "2.16.840.1.113730.4.1"
  34. #endif
  35. //
  36. // checks.cpp
  37. //
  38. extern DWORD checkGetErrorBasedOnStepErrors(CRYPT_PROVIDER_DATA *pProvData);
  39. extern BOOL checkIsTrustedRoot(CRYPT_PROVIDER_CERT *pRoot);
  40. extern BOOL checkCertificateChain(CRYPT_PROVIDER_DATA *pProvData,
  41. CRYPT_PROVIDER_SGNR *pProvSngr,
  42. DWORD *dwError);
  43. extern BOOL checkTimeStampCertificateChain(CRYPT_PROVIDER_DATA *pProvData,
  44. CRYPT_PROVIDER_SGNR *pProvSngr,
  45. DWORD *dwError);
  46. extern BOOL checkSetCommercial(CRYPT_PROVIDER_DATA *pProvData,
  47. CRYPT_PROVIDER_SGNR *pSgnr,
  48. BOOL *pfCommercial);
  49. extern BOOL checkBasicConstraints(CRYPT_PROVIDER_DATA *pProvData, CRYPT_PROVIDER_CERT *pCert,
  50. DWORD CertIndex, PCERT_INFO pCertInfo);
  51. extern BOOL checkBasicConstraints2(CRYPT_PROVIDER_DATA *pProvData, CRYPT_PROVIDER_CERT *pCert,
  52. DWORD idxCert, PCERT_INFO pCertInfo);
  53. extern BOOL checkCertPurpose(CRYPT_PROVIDER_DATA *pProvData,
  54. CRYPT_PROVIDER_CERT *pCert, BOOL fCommercialMsg);
  55. extern BOOL checkCertAnyUnknownCriticalExtensions(CRYPT_PROVIDER_DATA *pProvData,
  56. PCERT_INFO pCertInfo);
  57. extern BOOL checkMeetsMinimalFinancialCriteria(CRYPT_PROVIDER_DATA *pProvData,
  58. PCCERT_CONTEXT pCert,
  59. BOOL *pfAvail, BOOL *pfMeets);
  60. extern BOOL checkRevocation(CRYPT_PROVIDER_DATA *pProvData, CRYPT_PROVIDER_SGNR *pSgnr,
  61. BOOL fCommercial, DWORD *pdwError);
  62. //
  63. // authcode.cpp
  64. //
  65. extern HRESULT WINAPI SoftpubAuthenticode(CRYPT_PROVIDER_DATA *pProvData);
  66. //
  67. // msgprov.cpp
  68. //
  69. extern HRESULT WINAPI SoftpubLoadMessage(CRYPT_PROVIDER_DATA *pProvData);
  70. //
  71. // chkcert.cpp
  72. //
  73. extern BOOL WINAPI SoftpubCheckCert(CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner,
  74. BOOL fCounterSignerChain, DWORD idxCounterSigner);
  75. extern BOOL IsInTrustList(CRYPT_PROVIDER_DATA *pProvData, PCCERT_CONTEXT pCertContext, PCCERT_CONTEXT *ppCTLSigner,
  76. LPSTR pszUsage);
  77. //
  78. // sigprov.cpp
  79. //
  80. extern HRESULT WINAPI SoftpubLoadSignature(CRYPT_PROVIDER_DATA *pProvData);
  81. //
  82. // initprov.cpp
  83. //
  84. extern HRESULT WINAPI SoftpubInitialize(CRYPT_PROVIDER_DATA *pProvData);
  85. //
  86. // clnprov.cpp
  87. //
  88. extern HRESULT WINAPI SoftpubCleanup(CRYPT_PROVIDER_DATA *pProvData);
  89. //
  90. // test.cpp
  91. //
  92. extern HRESULT WINAPI SoftpubDumpStructure(CRYPT_PROVIDER_DATA *pProvData);
  93. //
  94. // callui.cpp
  95. //
  96. extern HRESULT SoftpubCallUI(CRYPT_PROVIDER_DATA *pProvData, DWORD dwError, BOOL fFinalCall);
  97. //
  98. // httpsprv.cpp
  99. //
  100. STDAPI HTTPSRegisterServer(void);
  101. STDAPI HTTPSUnregisterServer(void);
  102. extern BOOL WINAPI HTTPSCheckCertProv(CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner,
  103. BOOL fCounterSignerChain, DWORD idxCounterSigner);
  104. extern HRESULT WINAPI HTTPSFinalProv(CRYPT_PROVIDER_DATA *pProvData);
  105. //
  106. // offprov.cpp
  107. //
  108. STDAPI OfficeRegisterServer(void);
  109. STDAPI OfficeUnregisterServer(void);
  110. extern HRESULT WINAPI OfficeInitializePolicy(CRYPT_PROVIDER_DATA *pProvData);
  111. extern HRESULT WINAPI OfficeCleanupPolicy(CRYPT_PROVIDER_DATA *pProvData);
  112. //
  113. // drvprov.cpp
  114. //
  115. STDAPI DriverRegisterServer(void);
  116. STDAPI DriverUnregisterServer(void);
  117. extern HRESULT WINAPI DriverInitializePolicy(CRYPT_PROVIDER_DATA *pProvData);
  118. extern HRESULT WINAPI DriverCleanupPolicy(CRYPT_PROVIDER_DATA *pProvData);
  119. extern HRESULT WINAPI DriverFinalPolicy(CRYPT_PROVIDER_DATA *pProvData);
  120. //
  121. // sphelper.cpp
  122. //
  123. extern WCHAR *spGetAgencyNameOfCert(PCCERT_CONTEXT pCert);
  124. extern WCHAR *spGetPublisherNameOfCert(IN PCCERT_CONTEXT pCert);
  125. extern WCHAR *spGetCommonNameExtension(PCCERT_CONTEXT pCert);
  126. extern WCHAR *spGetAgencyName(IN PCERT_NAME_BLOB pNameBlob);
  127. extern WCHAR *spGetRDNAttrWStr(IN LPCSTR pszObjId, IN PCERT_NAME_BLOB pNameBlob);
  128. //
  129. // chainprv.cpp
  130. //
  131. STDAPI GenericChainRegisterServer(void);
  132. STDAPI GenericChainUnregisterServer(void);
  133. //
  134. // dllmain.cpp
  135. //
  136. HCERTSTORE
  137. WINAPI
  138. OpenTrustedPublisherStore();
  139. HCERTSTORE
  140. WINAPI
  141. OpenDisallowedStore();
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145. #endif // LOCALS_H