Commit c3072bca authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

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

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