crypt32: Use empty_store for new CTL contexts.
This commit is contained in:
parent
c01a708424
commit
eae8f4eda1
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue