advapi32: CryptAcquireContext(CRYPT_DELETEKEYSET) should set returned provider handle to 0.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b13b8ccc1f
commit
cd5c9a2bed
@ -523,6 +523,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
|
|||||||
*/
|
*/
|
||||||
if (dwFlags & CRYPT_DELETEKEYSET)
|
if (dwFlags & CRYPT_DELETEKEYSET)
|
||||||
{
|
{
|
||||||
|
*phProv = 0;
|
||||||
pProv->dwMagic = 0;
|
pProv->dwMagic = 0;
|
||||||
FreeLibrary(pProv->hModule);
|
FreeLibrary(pProv->hModule);
|
||||||
CRYPT_Free(provnameA);
|
CRYPT_Free(provnameA);
|
||||||
|
@ -273,7 +273,6 @@ static void test_incorrect_api_usage(void)
|
|||||||
result = pCryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL,
|
result = pCryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL,
|
||||||
CRYPT_DELETEKEYSET);
|
CRYPT_DELETEKEYSET);
|
||||||
ok (result, "%d\n", GetLastError());
|
ok (result, "%d\n", GetLastError());
|
||||||
todo_wine
|
|
||||||
ok (hProv2 == 0, "%ld\n", hProv2);
|
ok (hProv2 == 0, "%ld\n", hProv2);
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
@ -1183,7 +1182,6 @@ static void test_container_sd(void)
|
|||||||
ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0",
|
ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0",
|
||||||
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_DELETEKEYSET);
|
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_DELETEKEYSET);
|
||||||
ok(ret, "got %u\n", GetLastError());
|
ok(ret, "got %u\n", GetLastError());
|
||||||
todo_wine
|
|
||||||
ok(prov == 0, "got %ld\n", prov);
|
ok(prov == 0, "got %ld\n", prov);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user