rsaenh/tests: Fix a test failure on Win98.

This commit is contained in:
Paul Vriens 2008-11-27 11:03:53 +01:00 committed by Alexandre Julliard
parent 26d565ac1b
commit d211ddbfad
1 changed files with 8 additions and 1 deletions

View File

@ -146,9 +146,16 @@ static void clean_up_base_environment(void)
{
BOOL result;
SetLastError(0xdeadbeef);
result = CryptReleaseContext(hProv, 1);
ok(!result && GetLastError()==NTE_BAD_FLAGS, "%08x\n", GetLastError());
ok(!result || broken(result) /* Win98 */, "Expected failure\n");
ok(GetLastError()==NTE_BAD_FLAGS, "Expected NTE_BAD_FLAGS, got %08x\n", GetLastError());
/* Just to prove that Win98 also released the CSP */
SetLastError(0xdeadbeef);
result = CryptReleaseContext(hProv, 0);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%08x\n", GetLastError());
CryptAcquireContext(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
}