rsaenh: Allow CRYPT_NEWKEYSET and CRYPT_VERIFYCONTEXT at same time when acquiring context.

This commit is contained in:
Maarten Lankhorst 2007-06-13 08:31:07 +02:00 committed by Alexandre Julliard
parent 0e3e2875a5
commit 4e0ef1cb38
2 changed files with 6 additions and 0 deletions

View File

@ -1502,6 +1502,7 @@ BOOL WINAPI RSAENH_CPAcquireContext(HCRYPTPROV *phProv, LPSTR pszContainer,
*phProv = new_key_container(szKeyContainerName, dwFlags, pVTable);
break;
case CRYPT_VERIFYCONTEXT|CRYPT_NEWKEYSET:
case CRYPT_VERIFYCONTEXT:
if (pszContainer) {
TRACE("pszContainer should be NULL\n");

View File

@ -1318,6 +1318,11 @@ static void test_schannel_provider(void)
0x3d, 0xca, 0x6a, 0x6f, 0xfa, 0x15, 0x4e, 0xaa
};
result = CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_SCHANNEL, CRYPT_VERIFYCONTEXT|CRYPT_NEWKEYSET);
ok (result, "%08x\n", GetLastError());
if (result)
CryptReleaseContext(hProv, 0);
result = CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_SCHANNEL, CRYPT_VERIFYCONTEXT);
ok (result, "%08x\n", GetLastError());
if (!result) return;