rsaenh/tests: Make the tests pass in Windows <= NT4.

This commit is contained in:
Bruno Jesus 2014-07-12 13:11:14 -03:00 committed by Alexandre Julliard
parent 4387192120
commit 50ded4b2f8
1 changed files with 15 additions and 0 deletions

View File

@ -450,6 +450,11 @@ static void test_hashes(void)
ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError()); ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), CRYPT_USERDATA); 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()); ok(result, "%08x\n", GetLastError());
len = sizeof(DWORD); len = sizeof(DWORD);
@ -477,6 +482,11 @@ static void test_hashes(void)
ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError()); ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), CRYPT_USERDATA); 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()); ok(result, "%08x\n", GetLastError());
len = 16; len = 16;
@ -526,6 +536,11 @@ static void test_hashes(void)
ok(result, "%08x\n", GetLastError()); ok(result, "%08x\n", GetLastError());
result = CryptHashData(hHash, pbData, 5, CRYPT_USERDATA); 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()); ok(result, "%08x\n", GetLastError());
if(pCryptDuplicateHash) { if(pCryptDuplicateHash) {