Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1862826a
Commit
1862826a
authored
May 19, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
May 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust/tests: Add a basic CryptCATOpen test.
parent
ba35760f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
3 deletions
+32
-3
crypt.c
dlls/wintrust/tests/crypt.c
+32
-3
No files found.
dlls/wintrust/tests/crypt.c
View file @
1862826a
...
...
@@ -373,6 +373,37 @@ static void test_calchash(void)
DeleteFileA
(
temp
);
}
static
void
test_CryptCATOpen
(
void
)
{
HANDLE
hcat
;
char
empty
[
MAX_PATH
];
WCHAR
emptyW
[
MAX_PATH
];
HANDLE
file
;
BOOL
ret
;
SetLastError
(
0xdeadbeef
);
hcat
=
pCryptCATOpen
(
NULL
,
0
,
0
,
0
,
0
);
ok
(
hcat
==
INVALID_HANDLE_VALUE
,
"CryptCATOpen succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %08x
\n
"
,
GetLastError
());
if
(
!
GetTempFileNameA
(
CURR_DIR
,
"cat"
,
0
,
empty
))
return
;
file
=
CreateFileA
(
empty
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFileA failed %u
\n
"
,
GetLastError
());
CloseHandle
(
file
);
MultiByteToWideChar
(
CP_ACP
,
0
,
empty
,
-
1
,
emptyW
,
MAX_PATH
);
hcat
=
pCryptCATOpen
(
emptyW
,
0
,
0
,
0
,
0
);
todo_wine
ok
(
hcat
!=
INVALID_HANDLE_VALUE
,
"Expected a correct handle
\n
"
);
ret
=
pCryptCATClose
(
hcat
);
todo_wine
ok
(
ret
,
"CryptCATClose failed
\n
"
);
DeleteFileA
(
empty
);
}
static
DWORD
error_area
;
static
DWORD
local_error
;
...
...
@@ -615,9 +646,6 @@ static void test_catalog_properties(CHAR *catfile, int attributes, int members)
catalog
[
0
]
=
0
;
}
hcat
=
pCryptCATOpen
(
NULL
,
0
,
0
,
0
,
0
);
ok
(
hcat
==
INVALID_HANDLE_VALUE
,
"CryptCATOpen succeeded
\n
"
);
hcat
=
pCryptCATOpen
(
catalogW
,
0
,
0
,
0
,
0
);
if
(
hcat
==
INVALID_HANDLE_VALUE
&&
members
==
0
)
{
...
...
@@ -1106,6 +1134,7 @@ START_TEST(crypt)
test_context
();
test_calchash
();
test_CryptCATOpen
();
/* Parameter checking only */
test_CryptCATCDF_params
();
/* Test the parsing of a cdf file */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment