Commit cd5c9a2b authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

advapi32: CryptAcquireContext(CRYPT_DELETEKEYSET) should set returned provider handle to 0.

parent b13b8ccc
......@@ -523,6 +523,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
*/
if (dwFlags & CRYPT_DELETEKEYSET)
{
*phProv = 0;
pProv->dwMagic = 0;
FreeLibrary(pProv->hModule);
CRYPT_Free(provnameA);
......
......@@ -273,7 +273,6 @@ static void test_incorrect_api_usage(void)
result = pCryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL,
CRYPT_DELETEKEYSET);
ok (result, "%d\n", GetLastError());
todo_wine
ok (hProv2 == 0, "%ld\n", hProv2);
if (!result) return;
......@@ -1183,7 +1182,6 @@ static void test_container_sd(void)
ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0",
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_DELETEKEYSET);
ok(ret, "got %u\n", GetLastError());
todo_wine
ok(prov == 0, "got %ld\n", prov);
}
......
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