mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 01:03:38 +00:00
dssenh: Return NTE_BAD_KEYSET when key cannot be opened.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244 Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c5bdc2408f
commit
cf770571bf
|
@ -284,7 +284,8 @@ BOOL WINAPI CPAcquireContext( HCRYPTPROV *ret_prov, LPSTR container, DWORD flags
|
|||
{
|
||||
case 0:
|
||||
case 0 | CRYPT_MACHINE_KEYSET:
|
||||
ret = read_key_container( name, flags );
|
||||
if (!(ret = read_key_container( name, flags )))
|
||||
SetLastError( NTE_BAD_KEYSET );
|
||||
break;
|
||||
|
||||
case CRYPT_NEWKEYSET:
|
||||
|
|
|
@ -75,7 +75,7 @@ static void test_acquire_context(void)
|
|||
result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_DSS, 0);
|
||||
if (!result)
|
||||
{
|
||||
todo_wine ok(GetLastError() == NTE_BAD_KEYSET, "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError());
|
||||
ok(GetLastError() == NTE_BAD_KEYSET, "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError());
|
||||
SetLastError(0xdeadbeef);
|
||||
result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_DSS, CRYPT_NEWKEYSET);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue