rsaenh/tests: Fix a test failure on NT4 and below.

This commit is contained in:
Paul Vriens 2008-11-27 10:23:39 +01:00 committed by Alexandre Julliard
parent 7160d8c709
commit c3072bcaf3
1 changed files with 4 additions and 6 deletions

View File

@ -1432,13 +1432,11 @@ static void test_verify_signature(void) {
if (result) return; if (result) return;
/* check that we get a bad signature error when the signature is too short*/ /* check that we get a bad signature error when the signature is too short*/
SetLastError(0xdeadbeef);
result = CryptVerifySignature(hHash, abSignatureMD2, 64, hPubSignKey, NULL, 0); result = CryptVerifySignature(hHash, abSignatureMD2, 64, hPubSignKey, NULL, 0);
ok(!result && ok((!result && NTE_BAD_SIGNATURE == GetLastError()) ||
(NTE_BAD_SIGNATURE == GetLastError() || broken(result), /* Win9x, WinMe, NT4 */
ERROR_INVALID_PARAMETER == GetLastError()), "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError());
"Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n",
GetLastError());
if (result) return;
result = CryptVerifySignature(hHash, abSignatureMD2, 128, hPubSignKey, NULL, 0); result = CryptVerifySignature(hHash, abSignatureMD2, 128, hPubSignKey, NULL, 0);
ok(result, "%08x\n", GetLastError()); ok(result, "%08x\n", GetLastError());