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
278f806a
Commit
278f806a
authored
Jul 28, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Jul 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add test showing only file header is checked for cabinet files.
parent
408f3d96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
sip.c
dlls/crypt32/sip.c
+1
-1
sip.c
dlls/crypt32/tests/sip.c
+18
-0
No files found.
dlls/crypt32/sip.c
View file @
278f806a
...
...
@@ -332,7 +332,7 @@ BOOL WINAPI CryptSIPRetrieveSubjectGuid
bRet
=
TRUE
;
goto
cleanup1
;
}
/* Quick-n-dirty check for a cab file.
FIXME: use FDIIsCabinet instead?
*/
/* Quick-n-dirty check for a cab file. */
if
(
!
memcmp
(
pMapped
,
cabHdr
,
sizeof
(
cabHdr
)))
{
*
pgSubject
=
cabGUID
;
...
...
dlls/crypt32/tests/sip.c
View file @
278f806a
...
...
@@ -266,6 +266,24 @@ static void test_SIPRetrieveSubjectGUID(void)
/* Clean up */
DeleteFileA
(
tempfile
);
/* Create a file with just the .cab header 'MSCF' */
SetLastError
(
0xdeadbeef
);
file
=
CreateFileA
(
tempfile
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
0
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"failed with %u
\n
"
,
GetLastError
());
WriteFile
(
file
,
cabFileData
,
4
,
&
written
,
NULL
);
CloseHandle
(
file
);
SetLastError
(
0xdeadbeef
);
memset
(
&
subject
,
1
,
sizeof
(
GUID
));
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
"
,
show_guid
(
&
cabGUID
,
guid1
),
show_guid
(
&
subject
,
guid2
));
/* Clean up */
DeleteFileA
(
tempfile
);
/* Create a .cab file */
SetLastError
(
0xdeadbeef
);
file
=
CreateFileA
(
tempfile
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
0
,
NULL
);
...
...
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