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
1a4bd814
Commit
1a4bd814
authored
Sep 27, 2006
by
Paul Vriens
Committed by
Alexandre Julliard
Sep 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Another CryptSIPLoad test.
parent
a0ac040b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
sip.c
dlls/crypt32/tests/sip.c
+35
-0
No files found.
dlls/crypt32/tests/sip.c
View file @
1a4bd814
...
...
@@ -29,6 +29,12 @@
#include "wine/test.h"
static
BOOL
(
WINAPI
*
funcCryptSIPGetSignedDataMsg
)(
SIP_SUBJECTINFO
*
,
DWORD
*
,
DWORD
,
DWORD
*
,
BYTE
*
);
static
BOOL
(
WINAPI
*
funcCryptSIPPutSignedDataMsg
)(
SIP_SUBJECTINFO
*
,
DWORD
,
DWORD
*
,
DWORD
,
BYTE
*
);
static
BOOL
(
WINAPI
*
funcCryptSIPCreateIndirectData
)(
SIP_SUBJECTINFO
*
,
DWORD
*
,
SIP_INDIRECT_DATA
*
);
static
BOOL
(
WINAPI
*
funcCryptSIPVerifyIndirectData
)(
SIP_SUBJECTINFO
*
,
SIP_INDIRECT_DATA
*
);
static
BOOL
(
WINAPI
*
funcCryptSIPRemoveSignedDataMsg
)(
SIP_SUBJECTINFO
*
,
DWORD
);
static
char
*
show_guid
(
const
GUID
*
guid
)
{
static
char
guidstring
[
39
];
...
...
@@ -277,6 +283,7 @@ static void test_SIPLoad(void)
static
GUID
dummySubject
=
{
0xdeadbeef
,
0xdead
,
0xbeef
,
{
0xde
,
0xad
,
0xbe
,
0xef
,
0xde
,
0xad
,
0xbe
,
0xef
}};
static
GUID
unknown
=
{
0xC689AABA
,
0x8E78
,
0x11D0
,
{
0x8C
,
0x47
,
0x00
,
0xC0
,
0x4F
,
0xC2
,
0x95
,
0xEE
}};
SIP_DISPATCH_INFO
sdi
;
HMODULE
hCrypt
;
/* All NULL */
SetLastError
(
0xdeadbeef
);
...
...
@@ -334,6 +341,34 @@ static void test_SIPLoad(void)
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got 0x%08lx
\n
"
,
GetLastError
());
/* The function addresses returned by CryptSIPLoad are actually the addresses of
* crypt32's own functions. A function calling these addresses will end up first
* calling crypt32 functions which in it's turn call the equivalent in the SIP
* as dictated by the given GUID.
*/
hCrypt
=
LoadLibrary
(
"crypt32.dll"
);
if
(
hCrypt
)
{
funcCryptSIPGetSignedDataMsg
=
(
void
*
)
GetProcAddress
(
hCrypt
,
"CryptSIPGetSignedDataMsg"
);
funcCryptSIPPutSignedDataMsg
=
(
void
*
)
GetProcAddress
(
hCrypt
,
"CryptSIPPutSignedDataMsg"
);
funcCryptSIPCreateIndirectData
=
(
void
*
)
GetProcAddress
(
hCrypt
,
"CryptSIPCreateIndirectData"
);
funcCryptSIPVerifyIndirectData
=
(
void
*
)
GetProcAddress
(
hCrypt
,
"CryptSIPVerifyIndirectData"
);
funcCryptSIPRemoveSignedDataMsg
=
(
void
*
)
GetProcAddress
(
hCrypt
,
"CryptSIPRemoveSignedDataMsg"
);
if
(
funcCryptSIPGetSignedDataMsg
&&
funcCryptSIPPutSignedDataMsg
&&
funcCryptSIPCreateIndirectData
&&
funcCryptSIPVerifyIndirectData
&&
funcCryptSIPRemoveSignedDataMsg
)
todo_wine
ok
(
sdi
.
pfGet
==
funcCryptSIPGetSignedDataMsg
&&
sdi
.
pfPut
==
funcCryptSIPPutSignedDataMsg
&&
sdi
.
pfCreate
==
funcCryptSIPCreateIndirectData
&&
sdi
.
pfVerify
==
funcCryptSIPVerifyIndirectData
&&
sdi
.
pfRemove
==
funcCryptSIPRemoveSignedDataMsg
,
"Expected function addresses to be from crypt32
\n
"
);
else
trace
(
"Couldn't load function pointers
\n
"
);
FreeLibrary
(
hCrypt
);
}
/* Reserved parameter not 0 */
SetLastError
(
0xdeadbeef
);
memset
(
&
sdi
,
0
,
sizeof
(
SIP_DISPATCH_INFO
));
...
...
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