Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
57e7e2b3
Commit
57e7e2b3
authored
Oct 02, 2006
by
Juan Lang
Committed by
Alexandre Julliard
Oct 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Win64 printf format warning fixes.
parent
4b99bf02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
sip.c
dlls/crypt32/tests/sip.c
+21
-21
No files found.
dlls/crypt32/tests/sip.c
View file @
57e7e2b3
...
...
@@ -61,14 +61,14 @@ static void test_AddRemoveProvider(void)
ret
=
CryptSIPRemoveProvider
(
NULL
);
ok
(
!
ret
,
"Expected CryptSIPRemoveProvider to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* nonexistent provider should result in a registry error */
SetLastError
(
0xdeadbeef
);
ret
=
CryptSIPRemoveProvider
(
&
actionid
);
ok
(
!
ret
,
"Expected CryptSIPRemoveProvider to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_FILE_NOT_FOUND, got %d.
\n
"
,
GetLastError
());
/* Everything OK, pwszIsFunctionName and pwszIsFunctionNameFmt2 are left NULL
* as allowed */
...
...
@@ -85,7 +85,7 @@ static void test_AddRemoveProvider(void)
SetLastError
(
0xdeadbeef
);
ret
=
CryptSIPAddProvider
(
&
newprov
);
ok
(
ret
,
"CryptSIPAddProvider should have succeeded
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d
\n
"
,
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
/* Dummy provider will be deleted, but the function still fails because
...
...
@@ -96,7 +96,7 @@ static void test_AddRemoveProvider(void)
ret
=
CryptSIPRemoveProvider
(
&
actionid
);
ok
(
!
ret
,
"Expected CryptSIPRemoveProvider to fail.
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_FILE_NOT_FOUND, got %d.
\n
"
,
GetLastError
());
/* Everything OK */
memset
(
&
newprov
,
0
,
sizeof
(
SIP_ADD_NEWPROVIDER
));
...
...
@@ -113,14 +113,14 @@ static void test_AddRemoveProvider(void)
SetLastError
(
0xdeadbeef
);
ret
=
CryptSIPAddProvider
(
&
newprov
);
ok
(
ret
,
"CryptSIPAddProvider should have succeeded
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d
\n
"
,
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
/* Dummy provider should be deleted */
SetLastError
(
0xdeadbeef
);
ret
=
CryptSIPRemoveProvider
(
&
actionid
);
ok
(
ret
,
"CryptSIPRemoveProvider should have succeeded
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %
l
d
\n
"
,
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
}
...
...
@@ -147,7 +147,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
NULL
,
NULL
,
NULL
);
ok
(
!
ret
,
"Expected CryptSIPRetrieveSubjectGuid to fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got %d.
\n
"
,
GetLastError
());
/* Test with a nonexistent file (hopefully) */
SetLastError
(
0xdeadbeef
);
...
...
@@ -156,7 +156,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
deadbeef
,
NULL
,
&
subject
);
ok
(
!
ret
,
"Expected CryptSIPRetrieveSubjectGuid to fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %
l
d.
\n
"
,
GetLastError
());
"Expected ERROR_FILE_NOT_FOUND, got %d.
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)),
"Expected a NULL GUID for c:
\\
deadbeef.dbf, not %s
\n
"
,
show_guid
(
&
subject
));
...
...
@@ -175,7 +175,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
regeditPathW
,
NULL
,
&
subject
);
ok
(
ret
,
"Expected CryptSIPRetrieveSubjectGuid to succeed
\n
"
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_SUCCESS, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
unknownGUID
,
sizeof
(
GUID
)),
"Expected (%s), got (%s).
\n
"
,
show_guid
(
&
unknownGUID
),
show_guid
(
&
subject
));
...
...
@@ -186,7 +186,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
NULL
,
file
,
&
subject
);
ok
(
ret
,
"Expected CryptSIPRetrieveSubjectGuid to succeed
\n
"
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_SUCCESS, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
unknownGUID
,
sizeof
(
GUID
)),
"Expected (%s), got (%s).
\n
"
,
show_guid
(
&
unknownGUID
),
show_guid
(
&
subject
));
CloseHandle
(
file
);
...
...
@@ -198,7 +198,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
regeditPathW
,
file
,
&
subject
);
ok
(
ret
,
"Expected CryptSIPRetrieveSubjectGuid to succeed
\n
"
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_SUCCESS, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
unknownGUID
,
sizeof
(
GUID
)),
"Expected (%s), got (%s).
\n
"
,
show_guid
(
&
unknownGUID
),
show_guid
(
&
subject
));
CloseHandle
(
file
);
...
...
@@ -216,7 +216,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ok
(
!
ret
,
"Expected CryptSIPRetrieveSubjectGuid to fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_INVALID
||
GetLastError
()
==
S_OK
/* Win98 */
,
"Expected ERROR_FILE_INVALID or S_OK, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_FILE_INVALID or S_OK, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
show_guid
(
&
subject
));
...
...
@@ -231,7 +231,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ok
(
!
ret
,
"Expected CryptSIPRetrieveSubjectGuid to fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
S_OK
/* Win98 */
,
"Expected ERROR_INVALID_PARAMETER or S_OK, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER or S_OK, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
show_guid
(
&
subject
));
...
...
@@ -246,7 +246,7 @@ static void test_SIPRetrieveSubjectGUID(void)
ok
(
!
ret
,
"Expected CryptSIPRetrieveSubjectGuid to fail
\n
"
);
ok
(
GetLastError
()
==
TRUST_E_SUBJECT_FORM_UNKNOWN
||
GetLastError
()
==
S_OK
/* Win98 */
,
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN or S_OK, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN or S_OK, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
show_guid
(
&
subject
));
...
...
@@ -269,7 +269,7 @@ static void test_SIPLoad(void)
ok
(
!
ret
,
"Expected CryptSIPLoad to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got 0x%08x
\n
"
,
GetLastError
());
/* Only pSipDispatch NULL */
SetLastError
(
0xdeadbeef
);
...
...
@@ -277,7 +277,7 @@ static void test_SIPLoad(void)
ok
(
!
ret
,
"Expected CryptSIPLoad to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got 0x%08x
\n
"
,
GetLastError
());
/* No NULLs, but nonexistent pgSubject */
SetLastError
(
0xdeadbeef
);
...
...
@@ -288,7 +288,7 @@ static void test_SIPLoad(void)
ok
(
!
ret
,
"Expected CryptSIPLoad to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
TRUST_E_SUBJECT_FORM_UNKNOWN
,
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x
\n
"
,
GetLastError
());
ok
(
sdi
.
pfGet
==
(
pCryptSIPGetSignedDataMsg
)
0xdeadbeef
,
"Expected no change to the function pointer
\n
"
);
/* cbSize not initialized */
...
...
@@ -299,7 +299,7 @@ static void test_SIPLoad(void)
ok
(
!
ret
,
"Expected CryptSIPLoad to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
TRUST_E_SUBJECT_FORM_UNKNOWN
,
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x
\n
"
,
GetLastError
());
ok
(
sdi
.
pfGet
==
(
pCryptSIPGetSignedDataMsg
)
0xdeadbeef
,
"Expected no change to the function pointer
\n
"
);
/* cbSize not initialized, but valid subject (named unknown but registered by wintrust) */
...
...
@@ -311,7 +311,7 @@ static void test_SIPLoad(void)
{
ok
(
ret
,
"Expected CryptSIPLoad to succeed
\n
"
);
ok
(
GetLastError
()
==
ERROR_PROC_NOT_FOUND
,
"Expected ERROR_PROC_NOT_FOUND, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_PROC_NOT_FOUND, got 0x%08x
\n
"
,
GetLastError
());
ok
(
sdi
.
pfGet
!=
(
pCryptSIPGetSignedDataMsg
)
0xdeadbeef
,
"Expected a function pointer to be loaded.
\n
"
);
}
...
...
@@ -324,7 +324,7 @@ static void test_SIPLoad(void)
todo_wine
ok
(
ret
,
"Expected CryptSIPLoad to succeed
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected 0xdeadbeef, got 0x%08x
\n
"
,
GetLastError
());
todo_wine
ok
(
sdi
.
pfGet
!=
(
pCryptSIPGetSignedDataMsg
)
0xdeadbeef
,
"Expected a function pointer to be loaded.
\n
"
);
...
...
@@ -365,7 +365,7 @@ static void test_SIPLoad(void)
ok
(
!
ret
,
"Expected CryptSIPLoad to fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got 0x%08
l
x
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_PARAMETER, got 0x%08x
\n
"
,
GetLastError
());
ok
(
sdi
.
pfGet
==
(
pCryptSIPGetSignedDataMsg
)
0xdeadbeef
,
"Expected no change to the function pointer
\n
"
);
}
...
...
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