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
b669dbc2
Commit
b669dbc2
authored
Feb 16, 2017
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Use IsEqualGUID() to compare GUIDs.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
062f1ae7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
sip.c
dlls/crypt32/tests/sip.c
+18
-18
No files found.
dlls/crypt32/tests/sip.c
View file @
b669dbc2
...
...
@@ -176,8 +176,8 @@ static void test_SIPRetrieveSubjectGUID(void)
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND, got %d.
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)
),
"Expected a NULL GUID for c:
\\
deadbeef.dbf, not %s
\n
"
,
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
nullSubject
),
"Expected a NULL GUID for c:
\\
deadbeef.dbf, not %s
\n
"
,
wine_dbgstr_guid
(
&
subject
));
/* Now with an executable that should exist
*
...
...
@@ -195,8 +195,8 @@ static void test_SIPRetrieveSubjectGUID(void)
memset
(
&
subject
,
1
,
sizeof
(
GUID
));
ret
=
CryptSIPRetrieveSubjectGuid
(
regeditPathW
,
NULL
,
&
subject
);
ok
(
ret
,
"Expected CryptSIPRetrieveSubjectGuid to succeed
\n
"
);
ok
(
!
memcmp
(
&
subject
,
&
unknownGUID
,
sizeof
(
GUID
)
),
"Expected (%s), got (%s).
\n
"
,
wine_dbgstr_guid
(
&
unknownGUID
),
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
unknownGUID
),
"Expected (%s), got (%s).
\n
"
,
wine_dbgstr_guid
(
&
unknownGUID
),
wine_dbgstr_guid
(
&
subject
));
/* The same thing but now with a handle instead of a filename */
file
=
CreateFileA
(
regeditPath
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
...
@@ -204,8 +204,8 @@ static void test_SIPRetrieveSubjectGUID(void)
memset
(
&
subject
,
1
,
sizeof
(
GUID
));
ret
=
CryptSIPRetrieveSubjectGuid
(
NULL
,
file
,
&
subject
);
ok
(
ret
,
"Expected CryptSIPRetrieveSubjectGuid to succeed
\n
"
);
ok
(
!
memcmp
(
&
subject
,
&
unknownGUID
,
sizeof
(
GUID
)
),
"Expected (%s), got (%s).
\n
"
,
wine_dbgstr_guid
(
&
unknownGUID
),
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
unknownGUID
),
"Expected (%s), got (%s).
\n
"
,
wine_dbgstr_guid
(
&
unknownGUID
),
wine_dbgstr_guid
(
&
subject
));
CloseHandle
(
file
);
/* And both */
...
...
@@ -214,8 +214,8 @@ static void test_SIPRetrieveSubjectGUID(void)
memset
(
&
subject
,
1
,
sizeof
(
GUID
));
ret
=
CryptSIPRetrieveSubjectGuid
(
regeditPathW
,
file
,
&
subject
);
ok
(
ret
,
"Expected CryptSIPRetrieveSubjectGuid to succeed
\n
"
);
ok
(
!
memcmp
(
&
subject
,
&
unknownGUID
,
sizeof
(
GUID
)
),
"Expected (%s), got (%s).
\n
"
,
wine_dbgstr_guid
(
&
unknownGUID
),
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
unknownGUID
),
"Expected (%s), got (%s).
\n
"
,
wine_dbgstr_guid
(
&
unknownGUID
),
wine_dbgstr_guid
(
&
subject
));
CloseHandle
(
file
);
/* Now with an empty file */
...
...
@@ -234,8 +234,8 @@ static void test_SIPRetrieveSubjectGUID(void)
GetLastError
()
==
ERROR_SUCCESS
/* most Win98 */
||
GetLastError
()
==
TRUST_E_SUBJECT_FORM_UNKNOWN
/* some Win98 */
,
"Expected ERROR_FILE_INVALID, ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)
),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
nullSubject
),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
wine_dbgstr_guid
(
&
subject
));
/* Use a file with a size of 3 (at least < 4) */
file
=
CreateFileA
(
tempfile
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
...
@@ -250,8 +250,8 @@ static void test_SIPRetrieveSubjectGUID(void)
GetLastError
()
==
ERROR_SUCCESS
/* most Win98 */
||
GetLastError
()
==
TRUST_E_SUBJECT_FORM_UNKNOWN
/* some Win98 */
,
"Expected ERROR_INVALID_PARAMETER, ERROR_SUCCESS or TRUST_E_SUBJECT_FORM_UNKNOWN, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)
),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
nullSubject
),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
wine_dbgstr_guid
(
&
subject
));
/* And now >= 4 */
file
=
CreateFileA
(
tempfile
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
...
@@ -265,8 +265,8 @@ static void test_SIPRetrieveSubjectGUID(void)
ok
(
GetLastError
()
==
TRUST_E_SUBJECT_FORM_UNKNOWN
||
GetLastError
()
==
ERROR_SUCCESS
/* Win98 */
,
"Expected TRUST_E_SUBJECT_FORM_UNKNOWN or ERROR_SUCCESS, got 0x%08x
\n
"
,
GetLastError
());
ok
(
!
memcmp
(
&
subject
,
&
nullSubject
,
sizeof
(
GUID
)
),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
nullSubject
),
"Expected a NULL GUID for empty file %s, not %s
\n
"
,
tempfile
,
wine_dbgstr_guid
(
&
subject
));
/* Clean up */
DeleteFileA
(
tempfile
);
...
...
@@ -283,8 +283,8 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
tempfileW
,
NULL
,
&
subject
);
ok
(
ret
,
"CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)
\n
"
,
GetLastError
(),
GetLastError
()
);
ok
(
!
memcmp
(
&
subject
,
&
cabGUID
,
sizeof
(
GUID
)
),
"Expected GUID %s for cabinet file, not %s
\n
"
,
wine_dbgstr_guid
(
&
cabGUID
),
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
cabGUID
),
"Expected GUID %s for cabinet file, not %s
\n
"
,
wine_dbgstr_guid
(
&
cabGUID
),
wine_dbgstr_guid
(
&
subject
));
/* Clean up */
DeleteFileA
(
tempfile
);
...
...
@@ -301,8 +301,8 @@ static void test_SIPRetrieveSubjectGUID(void)
ret
=
CryptSIPRetrieveSubjectGuid
(
tempfileW
,
NULL
,
&
subject
);
ok
(
ret
,
"CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)
\n
"
,
GetLastError
(),
GetLastError
()
);
ok
(
!
memcmp
(
&
subject
,
&
cabGUID
,
sizeof
(
GUID
)
),
"Expected GUID %s for cabinet file, not %s
\n
"
,
wine_dbgstr_guid
(
&
cabGUID
),
wine_dbgstr_guid
(
&
subject
));
ok
(
IsEqualGUID
(
&
subject
,
&
cabGUID
),
"Expected GUID %s for cabinet file, not %s
\n
"
,
wine_dbgstr_guid
(
&
cabGUID
),
wine_dbgstr_guid
(
&
subject
));
/* Clean up */
DeleteFileA
(
tempfile
);
...
...
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