Commit 20f6f612 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wintrust: Translate CRYPTCAT_OPEN_CREATENEW to CREATE_ALWAYS.

parent 699e0a55
...@@ -873,7 +873,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv, ...@@ -873,7 +873,7 @@ HANDLE WINAPI CryptCATOpen(WCHAR *filename, DWORD flags, HCRYPTPROV hProv,
if (flags == CRYPTCAT_OPEN_EXISTING) if (flags == CRYPTCAT_OPEN_EXISTING)
open_mode = OPEN_EXISTING; open_mode = OPEN_EXISTING;
if (flags & CRYPTCAT_OPEN_CREATENEW) 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); file = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, open_mode, 0, NULL);
if (file == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE; if (file == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE;
......
...@@ -451,7 +451,7 @@ static void test_CryptCATOpen(void) ...@@ -451,7 +451,7 @@ static void test_CryptCATOpen(void)
file = _wfopen(filename, L"r"); file = _wfopen(filename, L"r");
ret = fread(buffer, 1, sizeof(buffer), file); ret = fread(buffer, 1, sizeof(buffer), file);
if (flags & CRYPTCAT_OPEN_CREATENEW) 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 else
ok(ret == 9 && !strncmp(buffer, "test text", ret), "flags %#x: got %s\n", flags, debugstr_an(buffer, ret)); ok(ret == 9 && !strncmp(buffer, "test text", ret), "flags %#x: got %s\n", flags, debugstr_an(buffer, ret));
fclose(file); fclose(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment