Juan Lang : crypt32: Allow the caller of checkChainPolicyStatus to specify the date to test with and additional policy parameters .

Alexandre Julliard julliard at winehq.org
Thu Oct 29 11:20:36 CDT 2009


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Wed Oct 28 09:07:39 2009 -0700

crypt32: Allow the caller of checkChainPolicyStatus to specify the date to test with and additional policy parameters.

---

 dlls/crypt32/tests/chain.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/crypt32/tests/chain.c b/dlls/crypt32/tests/chain.c
index 94debf4..ddc9ac5 100644
--- a/dlls/crypt32/tests/chain.c
+++ b/dlls/crypt32/tests/chain.c
@@ -2217,15 +2217,16 @@ static const char *num_to_str(WORD num)
 }
 
 static void checkChainPolicyStatus(LPCSTR policy, const ChainPolicyCheck *check,
- DWORD testIndex)
+ DWORD testIndex, SYSTEMTIME *sysTime, PCERT_CHAIN_POLICY_PARA para)
+
 {
-    PCCERT_CHAIN_CONTEXT chain = getChain(&check->certs, 0, TRUE, &oct2007,
+    PCCERT_CHAIN_CONTEXT chain = getChain(&check->certs, 0, TRUE, sysTime,
      check->todo, testIndex);
 
     if (chain)
     {
         CERT_CHAIN_POLICY_STATUS policyStatus = { 0 };
-        BOOL ret = pCertVerifyCertificateChainPolicy(policy, chain, NULL,
+        BOOL ret = pCertVerifyCertificateChainPolicy(policy, chain, para,
          &policyStatus);
 
         if (check->todo & TODO_POLICY)
@@ -2375,7 +2376,8 @@ static void testVerifyCertChainPolicy(void)
 
     for (i = 0;
      i < sizeof(basePolicyCheck) / sizeof(basePolicyCheck[0]); i++)
-        checkChainPolicyStatus(CERT_CHAIN_POLICY_BASE, &basePolicyCheck[i], i);
+        checkChainPolicyStatus(CERT_CHAIN_POLICY_BASE, &basePolicyCheck[i], i,
+         &oct2007, NULL);
     /* The authenticode policy doesn't seem to check anything beyond the base
      * policy.  It might check for chains signed by the MS test cert, but none
      * of these chains is.
@@ -2383,12 +2385,12 @@ static void testVerifyCertChainPolicy(void)
     for (i = 0; i <
      sizeof(authenticodePolicyCheck) / sizeof(authenticodePolicyCheck[0]); i++)
         checkChainPolicyStatus(CERT_CHAIN_POLICY_AUTHENTICODE,
-         &authenticodePolicyCheck[i], i);
+         &authenticodePolicyCheck[i], i, &oct2007, NULL);
     for (i = 0; i <
      sizeof(basicConstraintsPolicyCheck) / sizeof(basicConstraintsPolicyCheck[0]);
      i++)
         checkChainPolicyStatus(CERT_CHAIN_POLICY_BASIC_CONSTRAINTS,
-         &basicConstraintsPolicyCheck[i], i);
+         &basicConstraintsPolicyCheck[i], i, &oct2007, NULL);
 }
 
 START_TEST(chain)




More information about the wine-cvs mailing list