Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244 Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dssenh/main.c | 3 ++- dlls/dssenh/tests/dssenh.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 6cfa04393fd..b03c05195cd 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -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: diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index 8a53e210ce3..4b9cb25c5a4 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -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); }