advapi32/tests: Add a test for provider handle returned by CryptAcquireContext(CRYPT_DELETEKEYSET).
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c530d4943f
commit
b13b8ccc1f
|
@ -268,12 +268,15 @@ static void test_incorrect_api_usage(void)
|
||||||
dwTemp = CRYPT_MODE_ECB;
|
dwTemp = CRYPT_MODE_ECB;
|
||||||
result = pCryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD));
|
result = pCryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD));
|
||||||
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
|
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
|
||||||
|
|
||||||
|
hProv2 = 0xdeadbeef;
|
||||||
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);
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
|
||||||
result = pCryptReleaseContext(hProv, 0);
|
result = pCryptReleaseContext(hProv, 0);
|
||||||
ok (result, "%d\n", GetLastError());
|
ok (result, "%d\n", GetLastError());
|
||||||
if (!result) return;
|
if (!result) return;
|
||||||
|
@ -1176,9 +1179,12 @@ static void test_container_sd(void)
|
||||||
ret = CryptReleaseContext(prov, 0);
|
ret = CryptReleaseContext(prov, 0);
|
||||||
ok(ret, "got %u\n", GetLastError());
|
ok(ret, "got %u\n", GetLastError());
|
||||||
|
|
||||||
|
prov = 0xdeadbeef;
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(crypt)
|
START_TEST(crypt)
|
||||||
|
|
Loading…
Reference in New Issue