[1/3] rsaenh/tests: Make the tests pass in Windows <= NT4
Bruno Jesus
00cpxxx at gmail.com
Sat Jul 12 11:11:14 CDT 2014
Since my test DES test [1] patch failed [2] I started digging a way to
fix it. I don't have windows 2000, but I do have NT4. Before fixing my
DES tests I fixed other problems that were making the test not pass.
[1] http://source.winehq.org/patches/data/105516
[2] https://testbot.winehq.org/JobDetails.pl?Key=7931
-------------- next part --------------
---
dlls/rsaenh/tests/rsaenh.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index abc90e1..c90bc79 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -450,6 +450,11 @@ static void test_hashes(void)
ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), CRYPT_USERDATA);
+ if (!result && GetLastError() == NTE_BAD_FLAGS) /* <= NT4 */
+ {
+ ok(broken(1), "Failed to support CRYPT_USERDATA flag\n");
+ result = CryptHashData(hHash, pbData, sizeof(pbData), 0);
+ }
ok(result, "%08x\n", GetLastError());
len = sizeof(DWORD);
@@ -477,6 +482,11 @@ static void test_hashes(void)
ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), CRYPT_USERDATA);
+ if (!result && GetLastError() == NTE_BAD_FLAGS) /* <= NT4 */
+ {
+ ok(broken(1), "Failed to support CRYPT_USERDATA flag\n");
+ result = CryptHashData(hHash, pbData, sizeof(pbData), 0);
+ }
ok(result, "%08x\n", GetLastError());
len = 16;
@@ -526,6 +536,11 @@ static void test_hashes(void)
ok(result, "%08x\n", GetLastError());
result = CryptHashData(hHash, pbData, 5, CRYPT_USERDATA);
+ if (!result && GetLastError() == NTE_BAD_FLAGS) /* <= NT4 */
+ {
+ ok(broken(1), "Failed to support CRYPT_USERDATA flag\n");
+ result = CryptHashData(hHash, pbData, 5, 0);
+ }
ok(result, "%08x\n", GetLastError());
if(pCryptDuplicateHash) {
--
1.8.3.2
More information about the wine-patches
mailing list