Module: wine Branch: master Commit: 4e0ef1cb38ccef8cf994a6c34544b822f0e081f9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e0ef1cb38ccef8cf994a6c345...
Author: Maarten Lankhorst m.b.lankhorst@gmail.com Date: Wed Jun 13 08:31:07 2007 +0200
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(+), 0 deletions(-)
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 101eb8c..8f58d82 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 5d17be2..53ec374 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;