Module: wine Branch: master Commit: eae8f4eda125693ec6467ffaca1be051845b6881 URL: http://source.winehq.org/git/wine.git/?a=commit;h=eae8f4eda125693ec6467ffaca...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Oct 18 10:51:05 2013 +0200
crypt32: Use empty_store for new CTL contexts.
---
dlls/crypt32/ctl.c | 2 +- dlls/crypt32/tests/store.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c index ef5410a..7a8c21f 100644 --- a/dlls/crypt32/ctl.c +++ b/dlls/crypt32/ctl.c @@ -453,7 +453,7 @@ PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType, ctl->pbCtlEncoded = data; ctl->cbCtlEncoded = cbCtlEncoded; ctl->pCtlInfo = ctlInfo; - ctl->hCertStore = NULL; + ctl->hCertStore = &empty_store; ctl->hCryptMsg = msg; ctl->pbCtlContext = content; ctl->cbCtlContext = contentSize; diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index ea85dbf..1fa3ffa 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -2531,6 +2531,7 @@ static void testEmptyStore(void) { const CERT_CONTEXT *cert, *cert2, *cert3; const CRL_CONTEXT *crl; + const CTL_CONTEXT *ctl; HCERTSTORE store; BOOL res;
@@ -2594,6 +2595,12 @@ static void testEmptyStore(void)
CertFreeCRLContext(crl);
+ ctl = CertCreateCTLContext(X509_ASN_ENCODING, signedCTLWithCTLInnerContent, sizeof(signedCTLWithCTLInnerContent)); + ok(ctl != NULL, "CertCreateCTLContext failed\n"); + ok(ctl->hCertStore == cert->hCertStore, "unexpected hCertStore\n"); + + CertFreeCTLContext(ctl); + CertFreeCertificateContext(cert); }