Commit c5bdc240 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dssenh/tests: Add CryptAcquireContextA last error check.

When container key doesn't exist yet. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarHans Leidekker <hans@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 98f7be85
......@@ -71,6 +71,19 @@ static void test_acquire_context(void)
/* test base DSS provider (PROV_DSS) */
SetLastError(0xdeadbeef);
result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_DSS, 0);
if (!result)
{
todo_wine ok(GetLastError() == NTE_BAD_KEYSET, "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError());
SetLastError(0xdeadbeef);
result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_DSS, CRYPT_NEWKEYSET);
}
ok(result, "CryptAcquireContextA succeeded\n");
result = CryptReleaseContext(hProv, 0);
ok(result, "CryptReleaseContext failed.\n");
result = CryptAcquireContextA(
&hProv, NULL, MS_DEF_DSS_PROV_A, PROV_DSS, CRYPT_VERIFYCONTEXT);
if(!result)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment