Jacek Caban : crypt32: Use empty_store for new CRL contexts.

Alexandre Julliard julliard at winehq.org
Fri Oct 18 14:24:16 CDT 2013


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Oct 18 10:50:53 2013 +0200

crypt32: Use empty_store for new CRL contexts.

---

 dlls/crypt32/crl.c         |    2 +-
 dlls/crypt32/tests/store.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/crl.c b/dlls/crypt32/crl.c
index bf67a6b..4686e11 100644
--- a/dlls/crypt32/crl.c
+++ b/dlls/crypt32/crl.c
@@ -97,7 +97,7 @@ PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType,
         crl->pbCrlEncoded       = data;
         crl->cbCrlEncoded       = cbCrlEncoded;
         crl->pCrlInfo           = crlInfo;
-        crl->hCertStore         = 0;
+        crl->hCertStore         = &empty_store;
     }
 
 end:
diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c
index 5e99503..ea85dbf 100644
--- a/dlls/crypt32/tests/store.c
+++ b/dlls/crypt32/tests/store.c
@@ -2530,6 +2530,7 @@ static DWORD countCRLsInStore(HCERTSTORE store)
 static void testEmptyStore(void)
 {
     const CERT_CONTEXT *cert, *cert2, *cert3;
+    const CRL_CONTEXT *crl;
     HCERTSTORE store;
     BOOL res;
 
@@ -2586,6 +2587,13 @@ static void testEmptyStore(void)
     ok(!res && GetLastError() == E_UNEXPECTED, "CertCloseStore returned: %x(%x)\n", res, GetLastError());
 
     CertFreeCertificateContext(cert2);
+
+    crl = CertCreateCRLContext(X509_ASN_ENCODING, signedCRL, sizeof(signedCRL));
+    ok(crl != NULL, "CertCreateCRLContext failed\n");
+    ok(crl->hCertStore == cert->hCertStore, "unexpected hCertStore\n");
+
+    CertFreeCRLContext(crl);
+
     CertFreeCertificateContext(cert);
 }
 




More information about the wine-cvs mailing list