crypt32: Use empty_store for new CTL contexts.

This commit is contained in:
Jacek Caban 2013-10-18 10:51:05 +02:00 committed by Alexandre Julliard
parent c01a708424
commit eae8f4eda1
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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);
}