Paul Vriens : rsaenh/tests: Fix the remaining test failures on Win9x up to W2K.
Alexandre Julliard
julliard at winehq.org
Fri Jan 30 07:58:23 CST 2009
Module: wine
Branch: master
Commit: ce20f6c687f189dbfebb0c3c15fa1bf607363ce3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ce20f6c687f189dbfebb0c3c15fa1bf607363ce3
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Fri Jan 30 09:49:40 2009 +0100
rsaenh/tests: Fix the remaining test failures on Win9x up to W2K.
---
dlls/rsaenh/tests/rsaenh.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index b5af81f..ad53c72 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -1577,9 +1577,8 @@ static void test_rsa_encrypt(void)
/* but its private key may not be. */
SetLastError(0xdeadbeef);
result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen);
- ok(!result &&
- (GetLastError() == NTE_BAD_KEY_STATE ||
- broken(GetLastError() == 0xdeadbeef) /* Win9x/NT4 */),
+ ok((!result && GetLastError() == NTE_BAD_KEY_STATE) ||
+ broken(result), /* Win9x/NT4 */
"expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError());
/* Setting the permissions of the key exchange key isn't allowed, either. */
dwVal |= CRYPT_EXPORT;
@@ -1612,9 +1611,8 @@ static void test_rsa_encrypt(void)
/* but its private key may not be. */
SetLastError(0xdeadbeef);
result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen);
- ok(!result &&
- (GetLastError() == NTE_BAD_KEY_STATE ||
- broken(GetLastError() == 0xdeadbeef) /* Win9x/NT4 */),
+ ok((!result && GetLastError() == NTE_BAD_KEY_STATE) ||
+ broken(result), /* Win9x/NT4 */
"expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError());
/* Setting the permissions of the signature key isn't allowed, either. */
dwVal |= CRYPT_EXPORT;
@@ -2159,7 +2157,10 @@ static void test_key_permissions(void)
/* Turning off the key's export permissions is "allowed".. */
dwVal &= ~CRYPT_EXPORT;
result = CryptSetKeyParam(hKey1, KP_PERMISSIONS, (BYTE *)&dwVal, 0);
- ok(result, "%08x\n", GetLastError());
+ ok(result ||
+ broken(!result && GetLastError() == NTE_BAD_DATA) || /* W2K */
+ broken(!result && GetLastError() == NTE_BAD_FLAGS), /* Win9x/WinME/NT4 */
+ "%08x\n", GetLastError());
/* but it has no effect. */
dwVal = 0xdeadbeef;
dwLen = sizeof(DWORD);
More information about the wine-cvs
mailing list