From 4e0ef1cb38ccef8cf994a6c34544b822f0e081f9 Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 13 Jun 2007 08:31:07 +0200 Subject: [PATCH] rsaenh: Allow CRYPT_NEWKEYSET and CRYPT_VERIFYCONTEXT at same time when acquiring context. --- dlls/rsaenh/rsaenh.c | 1 + dlls/rsaenh/tests/rsaenh.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 101eb8c8b4a..8f58d82ad31 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -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"); diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 5d17be2f685..53ec3741dae 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -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;