Commit 113c6145 authored by Alexander Morozov's avatar Alexander Morozov Committed by Alexandre Julliard

crypt32/tests: Do not crash on some Win98.

parent 92bfadef
...@@ -2081,8 +2081,8 @@ static void test_enveloped_msg_open(void) ...@@ -2081,8 +2081,8 @@ static void test_enveloped_msg_open(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
context = CertCreateCertificateContext(X509_ASN_ENCODING, context = CertCreateCertificateContext(X509_ASN_ENCODING,
v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey)); v1CertWithValidPubKey, sizeof(v1CertWithValidPubKey));
ok(context != NULL, "CertCreateCertificateContext failed: %08x\n", if (context)
GetLastError()); {
envelopedInfo.rgpRecipientCert = (PCERT_INFO *)&context->pCertInfo; envelopedInfo.rgpRecipientCert = (PCERT_INFO *)&context->pCertInfo;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED, msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_ENVELOPED,
...@@ -2090,6 +2090,9 @@ static void test_enveloped_msg_open(void) ...@@ -2090,6 +2090,9 @@ static void test_enveloped_msg_open(void)
todo_wine todo_wine
ok(msg != NULL, "CryptMsgOpenToEncode failed: %08x\n", GetLastError()); ok(msg != NULL, "CryptMsgOpenToEncode failed: %08x\n", GetLastError());
CryptMsgClose(msg); CryptMsgClose(msg);
}
else
win_skip("failed to create certificate context, skipping a test\n");
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = pCryptAcquireContextA(&envelopedInfo.hCryptProv, NULL, NULL, ret = pCryptAcquireContextA(&envelopedInfo.hCryptProv, NULL, NULL,
......
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