crypt32/tests: Don't crash on Win9x (test_msg_get_and_verify_signer).
This commit is contained in:
parent
b38b207625
commit
6859eee630
|
@ -2968,11 +2968,14 @@ static void test_msg_get_and_verify_signer(void)
|
||||||
|
|
||||||
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL);
|
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL);
|
||||||
/* A "signed" message created with no signer cert likewise has no signer */
|
/* A "signed" message created with no signer cert likewise has no signer */
|
||||||
CryptMsgUpdate(msg, signedEmptyContent, sizeof(signedEmptyContent), TRUE);
|
ret = CryptMsgUpdate(msg, signedEmptyContent, sizeof(signedEmptyContent), TRUE);
|
||||||
SetLastError(0xdeadbeef);
|
if (ret)
|
||||||
ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL);
|
{
|
||||||
ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER,
|
/* Crashes on most Win9x */
|
||||||
"expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError());
|
ret = CryptMsgGetAndVerifySigner(msg, 0, NULL, 0, NULL, NULL);
|
||||||
|
ok(!ret && GetLastError() == CRYPT_E_NO_TRUSTED_SIGNER,
|
||||||
|
"expected CRYPT_E_NO_TRUSTED_SIGNER, got 0x%08x\n", GetLastError());
|
||||||
|
}
|
||||||
CryptMsgClose(msg);
|
CryptMsgClose(msg);
|
||||||
|
|
||||||
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL);
|
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL);
|
||||||
|
|
Loading…
Reference in New Issue