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
3822f9d2
Commit
3822f9d2
authored
Jan 15, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jan 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Test SystemFunction036.
parent
99a0376a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
crypt.c
dlls/advapi32/tests/crypt.c
+32
-0
No files found.
dlls/advapi32/tests/crypt.c
View file @
3822f9d2
...
...
@@ -64,6 +64,7 @@ static BOOL (WINAPI *pCryptSetHashParam)(HCRYPTKEY, DWORD, BYTE*, DWORD);
static
BOOL
(
WINAPI
*
pCryptSetKeyParam
)(
HCRYPTKEY
,
DWORD
,
BYTE
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptSetProvParam
)(
HCRYPTPROV
,
DWORD
,
BYTE
*
,
DWORD
);
static
BOOL
(
WINAPI
*
pCryptVerifySignatureW
)(
HCRYPTHASH
,
BYTE
*
,
DWORD
,
HCRYPTKEY
,
LPCWSTR
,
DWORD
);
static
BOOL
(
WINAPI
*
pSystemFunction036
)(
PVOID
,
ULONG
);
static
void
init_function_pointers
(
void
)
{
...
...
@@ -99,6 +100,7 @@ static void init_function_pointers(void)
pCryptSetKeyParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetKeyParam"
);
pCryptSetProvParam
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptSetProvParam"
);
pCryptVerifySignatureW
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"CryptVerifySignatureW"
);
pSystemFunction036
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"SystemFunction036"
);
}
static
void
init_environment
(
void
)
...
...
@@ -1073,6 +1075,35 @@ static void test_rc2_keylen(void)
}
}
static
void
test_SystemFunction036
(
void
)
{
BOOL
ret
;
int
test
;
if
(
!
pSystemFunction036
)
{
win_skip
(
"SystemFunction036 is not available
\n
"
);
return
;
}
ret
=
pSystemFunction036
(
NULL
,
0
);
ok
(
ret
==
TRUE
,
"Expected SystemFunction036 to return TRUE, got %d
\n
"
,
ret
);
/* Test crashes on Windows. */
if
(
0
)
{
SetLastError
(
0xdeadbeef
);
ret
=
pSystemFunction036
(
NULL
,
5
);
trace
(
"ret = %d, GetLastError() = %d
\n
"
,
ret
,
GetLastError
());
}
ret
=
pSystemFunction036
(
&
test
,
0
);
ok
(
ret
==
TRUE
,
"Expected SystemFunction036 to return TRUE, got %d
\n
"
,
ret
);
ret
=
pSystemFunction036
(
&
test
,
sizeof
(
int
));
ok
(
ret
==
TRUE
,
"Expected SystemFunction036 to return TRUE, got %d
\n
"
,
ret
);
}
START_TEST
(
crypt
)
{
init_function_pointers
();
...
...
@@ -1091,4 +1122,5 @@ START_TEST(crypt)
test_enum_provider_types
();
test_get_default_provider
();
test_set_provider_ex
();
test_SystemFunction036
();
}
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