Paul Vriens : wintrust: Register WINTRUST_ACTION_GENERIC_CHAIN_VERIFY.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Sep 7 07:12:13 CDT 2006


Module: wine
Branch: master
Commit: 609b7af8cea9ff5b3d2586cc8d631a12211e8e80
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=609b7af8cea9ff5b3d2586cc8d631a12211e8e80

Author: Paul Vriens <Paul.Vriens at xs4all.nl>
Date:   Tue Sep  5 20:38:23 2006 +0200

wintrust: Register WINTRUST_ACTION_GENERIC_CHAIN_VERIFY.

---

 dlls/wintrust/register.c |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/dlls/wintrust/register.c b/dlls/wintrust/register.c
index c7c687a..48d04d8 100644
--- a/dlls/wintrust/register.c
+++ b/dlls/wintrust/register.c
@@ -57,6 +57,9 @@ static CRYPT_TRUST_REG_ENTRY DriverIniti
 static CRYPT_TRUST_REG_ENTRY DriverFinalPolicy;
 static CRYPT_TRUST_REG_ENTRY DriverCleanupPolicy;
 
+static CRYPT_TRUST_REG_ENTRY GenericChainCertificateTrust;
+static CRYPT_TRUST_REG_ENTRY GenericChainFinalProv;
+
 static const WCHAR Trust[]            = {'S','o','f','t','w','a','r','e','\\',
                                          'M','i','c','r','o','s','o','f','t','\\',
                                          'C','r','y','p','t','o','g','r','a','p','h','y','\\',
@@ -106,6 +109,8 @@ #define WINTRUST_INITREGENTRY( action, d
     WINTRUST_INITREGENTRY(DriverInitializePolicy, SP_POLICY_PROVIDER_DLL_NAME, DRIVER_INITPROV_FUNCTION)
     WINTRUST_INITREGENTRY(DriverFinalPolicy, SP_POLICY_PROVIDER_DLL_NAME, DRIVER_FINALPOLPROV_FUNCTION)
     WINTRUST_INITREGENTRY(DriverCleanupPolicy, SP_POLICY_PROVIDER_DLL_NAME, DRIVER_CLEANUPPOLICY_FUNCTION)
+    WINTRUST_INITREGENTRY(GenericChainCertificateTrust, SP_POLICY_PROVIDER_DLL_NAME, GENERIC_CHAIN_CERTTRUST_FUNCTION)
+    WINTRUST_INITREGENTRY(GenericChainFinalProv, SP_POLICY_PROVIDER_DLL_NAME, GENERIC_CHAIN_FINALPOLICY_FUNCTION)
 
 #undef WINTRUST_INITREGENTRY
 }
@@ -138,6 +143,8 @@ #define WINTRUST_FREEREGENTRY( action ) 
     WINTRUST_FREEREGENTRY(DriverInitializePolicy);
     WINTRUST_FREEREGENTRY(DriverFinalPolicy);
     WINTRUST_FREEREGENTRY(DriverCleanupPolicy);
+    WINTRUST_FREEREGENTRY(GenericChainCertificateTrust);
+    WINTRUST_FREEREGENTRY(GenericChainFinalProv);
 
 #undef WINTRUST_FREEREGENTRY
 }
@@ -662,6 +669,35 @@ static void WINTRUST_RegisterDriverVerif
     WINTRUST_WriteProviderToReg(GuidString, Cleanup       , DriverCleanupPolicy);
 }
 
+/***************************************************************************
+ *              WINTRUST_RegisterGenChainVerify
+ *
+ * Register WINTRUST_ACTION_GENERIC_CHAIN_VERIFY actions and usages.
+ *
+ * NOTES
+ *   WINTRUST_ACTION_GENERIC_CHAIN_VERIFY ({FC451C16-AC75-11D1-B4B8-00C04FB66EA0})
+ *   is defined in softpub.h
+ *   We don't care about failures (see comments in DllRegisterServer)
+ */
+static void WINTRUST_RegisterGenChainVerify(void)
+{
+    static const GUID ProvGUID = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY;
+    WCHAR GuidString[39];
+
+    WINTRUST_Guid2Wstr(&ProvGUID , GuidString);
+
+    TRACE("Going to register WINTRUST_ACTION_GENERIC_CHAIN_VERIFY : %s\n", wine_dbgstr_w(GuidString));
+
+    /* HKLM\Software\Microsoft\Cryptography\Trust\Provider\*\{FC451C16-AC75-11D1-B4B8-00C04FB66EA0} */
+    WINTRUST_WriteProviderToReg(GuidString, Initialization, SoftpubInitialization);
+    WINTRUST_WriteProviderToReg(GuidString, Message       , SoftpubMessage);
+    WINTRUST_WriteProviderToReg(GuidString, Signature     , SoftpubSignature);
+    WINTRUST_WriteProviderToReg(GuidString, Certificate   , GenericChainCertificateTrust);
+    WINTRUST_WriteProviderToReg(GuidString, CertCheck     , SoftpubCertCheck);
+    WINTRUST_WriteProviderToReg(GuidString, FinalPolicy   , GenericChainFinalProv);
+    WINTRUST_WriteProviderToReg(GuidString, Cleanup       , SoftpubCleanup);
+}
+
 /***********************************************************************
  *              DllRegisterServer (WINTRUST.@)
  */
@@ -707,6 +743,7 @@ HRESULT WINAPI DllRegisterServer(void)
     WINTRUST_RegisterHttpsProv();
     WINTRUST_RegisterOfficeSignVerify();
     WINTRUST_RegisterDriverVerify();
+    WINTRUST_RegisterGenChainVerify();
 
     /* Free the registry structures */
     WINTRUST_FreeRegStructs();




More information about the wine-cvs mailing list