Commit d7f68cb5 authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

crypt32/tests: Print an error if CertOpenStore fails.

parent 4b144594
...@@ -148,6 +148,7 @@ static void testAddCRL(void) ...@@ -148,6 +148,7 @@ static void testAddCRL(void)
BOOL ret; BOOL ret;
DWORD GLE; DWORD GLE;
ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError());
if (!store) return; if (!store) return;
/* Bad CRL encoding type */ /* Bad CRL encoding type */
...@@ -425,21 +426,24 @@ static const BYTE rootSignedCRL[] = { ...@@ -425,21 +426,24 @@ static const BYTE rootSignedCRL[] = {
static void testFindCRL(void) static void testFindCRL(void)
{ {
HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, HCERTSTORE store;
CERT_STORE_CREATE_NEW_FLAG, NULL);
PCCRL_CONTEXT context; PCCRL_CONTEXT context;
PCCERT_CONTEXT cert, endCert, rootCert; PCCERT_CONTEXT cert, endCert, rootCert;
CRL_FIND_ISSUED_FOR_PARA issuedForPara = { NULL, NULL }; CRL_FIND_ISSUED_FOR_PARA issuedForPara = { NULL, NULL };
DWORD count, revoked_count; DWORD count, revoked_count;
BOOL ret; BOOL ret;
if (!store) return;
if (!pCertFindCRLInStore || !pCertFindCertificateInCRL) if (!pCertFindCRLInStore || !pCertFindCertificateInCRL)
{ {
win_skip("CertFindCRLInStore or CertFindCertificateInCRL not available\n"); win_skip("CertFindCRLInStore or CertFindCertificateInCRL not available\n");
return; return;
} }
store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
CERT_STORE_CREATE_NEW_FLAG, NULL);
ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError());
if (!store) return;
ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL, ret = CertAddEncodedCRLToStore(store, X509_ASN_ENCODING, signedCRL,
sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL); sizeof(signedCRL), CERT_STORE_ADD_ALWAYS, NULL);
ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError()); ok(ret, "CertAddEncodedCRLToStore failed: %08x\n", GetLastError());
...@@ -783,6 +787,7 @@ static void testGetCRLFromStore(void) ...@@ -783,6 +787,7 @@ static void testGetCRLFromStore(void)
DWORD flags; DWORD flags;
BOOL ret; BOOL ret;
ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError());
if (!store) return; if (!store) return;
/* Crash /* Crash
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment