[2/4] rsaenh: Fixing a testfailure because Win7 seems to support salt with AES
André Hentschel
nerv at dawncrow.de
Fri Apr 30 11:07:54 CDT 2010
---
dlls/rsaenh/tests/rsaenh.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index d2ababf..7034716 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -800,10 +800,13 @@ static void test_aes(int keylen)
for (i=0; i<sizeof(pbData); i++) pbData[i] = (unsigned char)i;
- /* AES provider doesn't support salt */
+ /* AES provider doesn't support salt before Win7 */
+ SetLastError(0xdeadbeef);
result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0);
- ok(!result && (GetLastError() == NTE_BAD_KEY || GetLastError() == ERROR_NO_TOKEN /* Win7 */),
- "expected NTE_BAD_KEY or ERROR_NO_TOKEN, got %08x\n", GetLastError());
+ todo_wine ok(broken(!result && GetLastError() == NTE_BAD_KEY) || result /* Win7 */,
+ "CryptGetKeyParam failed, got %08x\n", GetLastError());
+ if (result)
+ ok(!dwLen, "unexpected salt length %d\n", dwLen);
dwLen = 13;
result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16);
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list