wintrust: Translate CRYPTCAT_OPEN_CREATENEW to CREATE_ALWAYS.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-09-07 23:13:30 -05:00 committed by Alexandre Julliard
parent 699e0a55ea
commit 20f6f61212
2 changed files with 2 additions and 2 deletions
dlls/wintrust

View File

@ -873,7 +873,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
if (flags == CRYPTCAT_OPEN_EXISTING)
open_mode = OPEN_EXISTING;
if (flags & CRYPTCAT_OPEN_CREATENEW)
open_mode = CREATE_NEW;
open_mode = CREATE_ALWAYS;
file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, open_mode, 0, NULL);
if (file == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE;

View File

@ -451,7 +451,7 @@ static void test_CryptCATOpen(void)
file = _wfopen(filename, L"r");
ret = fread(buffer, 1, sizeof(buffer), file);
if (flags & CRYPTCAT_OPEN_CREATENEW)
todo_wine ok(!ret, "flags %#x: got %s\n", flags, debugstr_an(buffer, ret));
ok(!ret, "flags %#x: got %s\n", flags, debugstr_an(buffer, ret));
else
ok(ret == 9 && !strncmp(buffer, "test text", ret), "flags %#x: got %s\n", flags, debugstr_an(buffer, ret));
fclose(file);