crypt32: Use empty_store for new CRL contexts.

This commit is contained in:
Jacek Caban 2013-10-18 10:50:53 +02:00 committed by Alexandre Julliard
parent 9fb1e4d675
commit c01a708424
2 changed files with 9 additions and 1 deletions

View File

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

View File

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