[wintrust 4/8] Register WINTRUST_ACTION_TRUSTPROVIDER_TEST

Paul Vriens Paul.Vriens at xs4all.nl
Tue Sep 5 13:38:06 CDT 2006


Hi,

this one also needed some extra defines at the top.

Changelog
  Register WINTRUST_ACTION_TRUSTPROVIDER_TEST

Cheers,

Paul.

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

diff --git a/dlls/wintrust/register.c b/dlls/wintrust/register.c
index 016b2eb..e287608 100644
--- a/dlls/wintrust/register.c
+++ b/dlls/wintrust/register.c
@@ -45,6 +45,8 @@ static CRYPT_TRUST_REG_ENTRY SoftpubClea
 
 static CRYPT_TRUST_REG_ENTRY SoftpubDefCertInit;
 
+static CRYPT_TRUST_REG_ENTRY SoftpubDumpStructure;
+
 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','\\',
@@ -85,6 +87,7 @@ #define WINTRUST_INITREGENTRY( action, d
     WINTRUST_INITREGENTRY(SoftpubFinalPolicy, SP_POLICY_PROVIDER_DLL_NAME, SP_FINALPOLICY_FUNCTION)
     WINTRUST_INITREGENTRY(SoftpubCleanup, SP_POLICY_PROVIDER_DLL_NAME, SP_CLEANUPPOLICY_FUNCTION)
     WINTRUST_INITREGENTRY(SoftpubDefCertInit, SP_POLICY_PROVIDER_DLL_NAME, SP_GENERIC_CERT_INIT_FUNCTION)
+    WINTRUST_INITREGENTRY(SoftpubDumpStructure, SP_POLICY_PROVIDER_DLL_NAME, SP_TESTDUMPPOLICY_FUNCTION_TEST)
 
 #undef WINTRUST_INITREGENTRY
 }
@@ -109,6 +112,7 @@ #define WINTRUST_FREEREGENTRY( action ) 
     WINTRUST_FREEREGENTRY(SoftpubFinalPolicy);
     WINTRUST_FREEREGENTRY(SoftpubCleanup);
     WINTRUST_FREEREGENTRY(SoftpubDefCertInit);
+    WINTRUST_FREEREGENTRY(SoftpubDumpStructure);
 
 #undef WINTRUST_FREEREGENTRY
 }
@@ -495,6 +499,37 @@ static void WINTRUST_RegisterGenCertVeri
     WINTRUST_WriteProviderToReg(GuidString, Cleanup       , SoftpubCleanup);
 }
 
+/***************************************************************************
+ *              WINTRUST_RegisterTrustProviderTest
+ *
+ * Register WINTRUST_ACTION_TRUSTPROVIDER_TEST actions and usages.
+ *
+ * NOTES
+ *   WINTRUST_ACTION_TRUSTPROVIDER_TEST ({573E31F8-DDBA-11D0-8CCB-00C04FC295EE})
+ *   is defined in softpub.h
+ *   We don't care about failures (see comments in DllRegisterServer)
+ */
+static void WINTRUST_RegisterTrustProviderTest(void)
+{
+    GUID ProvGUID;
+    WCHAR GuidString[39];
+
+    ProvGUID = (GUID)WINTRUST_ACTION_TRUSTPROVIDER_TEST;
+    WINTRUST_Guid2Wstr(&ProvGUID , GuidString);
+
+    TRACE("Going to register WINTRUST_ACTION_TRUSTPROVIDER_TEST : %s\n", wine_dbgstr_w(GuidString));
+
+    /* HKLM\Software\Microsoft\Cryptography\Trust\Provider\*\{573E31F8-DDBA-11D0-8CCB-00C04FC295EE} */
+    WINTRUST_WriteProviderToReg(GuidString, Initialization  , SoftpubInitialization);
+    WINTRUST_WriteProviderToReg(GuidString, Message         , SoftpubMessage);
+    WINTRUST_WriteProviderToReg(GuidString, Signature       , SoftpubSignature);
+    WINTRUST_WriteProviderToReg(GuidString, Certificate     , SoftpubCertficate);
+    WINTRUST_WriteProviderToReg(GuidString, CertCheck       , SoftpubCertCheck);
+    WINTRUST_WriteProviderToReg(GuidString, FinalPolicy     , SoftpubFinalPolicy);
+    WINTRUST_WriteProviderToReg(GuidString, DiagnosticPolicy, SoftpubDumpStructure);
+    WINTRUST_WriteProviderToReg(GuidString, Cleanup         , SoftpubCleanup);
+}
+
 /***********************************************************************
  *              DllRegisterServer (WINTRUST.@)
  */
@@ -536,6 +571,7 @@ HRESULT WINAPI DllRegisterServer(void)
     WINTRUST_RegisterPublishedSoftware();
     WINTRUST_RegisterPublishedSoftwareNoBadUi();
     WINTRUST_RegisterGenCertVerify();
+    WINTRUST_RegisterTrustProviderTest();
 
     /* Free the registry structures */
     WINTRUST_FreeRegStructs();
-- 
1.4.1.1




More information about the wine-patches mailing list