Paul Vriens : crypt32/tests: Don't crash on Win9x ( test_msg_get_and_verify_signer).
Alexandre Julliard
julliard at winehq.org
Mon Feb 23 10:00:43 CST 2009
Module: wine
Branch: master
Commit: 6859eee630d3116edf3c497ee1f7171e36e99502
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6859eee630d3116edf3c497ee1f7171e36e99502
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Mon Feb 23 11:05:20 2009 +0100
crypt32/tests: Don't crash on Win9x (test_msg_get_and_verify_signer).
---
dlls/crypt32/tests/msg.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c
index a8193cd..2188e6d 100644
--- a/dlls/crypt32/tests/msg.c
+++ b/dlls/crypt32/tests/msg.c
@@ -2968,11 +2968,14 @@ static void test_msg_get_and_verify_signer(void)
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL);
/* A "signed" message created with no signer cert likewise has no signer */
- CryptMsgUpdate(msg, signedEmptyContent, sizeof(signedEmptyContent), TRUE);
- SetLastError(0xdeadbeef);
- 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());
+ ret = CryptMsgUpdate(msg, signedEmptyContent, sizeof(signedEmptyContent), TRUE);
+ if (ret)
+ {
+ /* Crashes on most Win9x */
+ 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);
msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL);
More information about the wine-cvs
mailing list