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
a4eb01d2
Commit
a4eb01d2
authored
Oct 08, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintrust: Implement CryptSIPGetSignedDataMsg for .cat files.
parent
46fd5620
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
crypt.c
dlls/wintrust/crypt.c
+40
-0
No files found.
dlls/wintrust/crypt.c
View file @
a4eb01d2
...
...
@@ -472,6 +472,41 @@ static BOOL WINTRUST_GetSignedMsgFromCabFile(SIP_SUBJECTINFO *pSubjectInfo,
return
TRUE
;
}
static
BOOL
WINTRUST_GetSignedMsgFromCatFile
(
SIP_SUBJECTINFO
*
pSubjectInfo
,
DWORD
*
pdwEncodingType
,
DWORD
dwIndex
,
DWORD
*
pcbSignedDataMsg
,
BYTE
*
pbSignedDataMsg
)
{
BOOL
ret
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
if
(
!
pbSignedDataMsg
)
{
*
pcbSignedDataMsg
=
GetFileSize
(
pSubjectInfo
->
hFile
,
NULL
);
ret
=
TRUE
;
}
else
{
DWORD
len
=
GetFileSize
(
pSubjectInfo
->
hFile
,
NULL
);
if
(
*
pcbSignedDataMsg
<
len
)
{
*
pcbSignedDataMsg
=
len
;
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
ret
=
FALSE
;
}
else
{
ret
=
ReadFile
(
pSubjectInfo
->
hFile
,
pbSignedDataMsg
,
len
,
pcbSignedDataMsg
,
NULL
);
if
(
ret
)
*
pdwEncodingType
=
X509_ASN_ENCODING
|
PKCS_7_ASN_ENCODING
;
}
}
return
ret
;
}
/***********************************************************************
* CryptSIPGetSignedDataMsg (WINTRUST.@)
*/
...
...
@@ -482,6 +517,8 @@ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEn
0x00
,
0xC0
,
0x4F
,
0xC2
,
0x95
,
0xEE
}
};
static
const
GUID
cabGUID
=
{
0xC689AABA
,
0x8E78
,
0x11D0
,
{
0x8C
,
0x47
,
0x00
,
0xC0
,
0x4F
,
0xC2
,
0x95
,
0xEE
}
};
static
const
GUID
catGUID
=
{
0xDE351A43
,
0x8E59
,
0x11D0
,
{
0x8C
,
0x47
,
0x00
,
0xC0
,
0x4F
,
0xC2
,
0x95
,
0xEE
}};
BOOL
ret
;
TRACE
(
"(%p %p %d %p %p)
\n
"
,
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
...
...
@@ -493,6 +530,9 @@ BOOL WINAPI CryptSIPGetSignedDataMsg(SIP_SUBJECTINFO* pSubjectInfo, DWORD* pdwEn
else
if
(
!
memcmp
(
pSubjectInfo
->
pgSubjectType
,
&
cabGUID
,
sizeof
(
cabGUID
)))
ret
=
WINTRUST_GetSignedMsgFromCabFile
(
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
else
if
(
!
memcmp
(
pSubjectInfo
->
pgSubjectType
,
&
catGUID
,
sizeof
(
catGUID
)))
ret
=
WINTRUST_GetSignedMsgFromCatFile
(
pSubjectInfo
,
pdwEncodingType
,
dwIndex
,
pcbSignedDataMsg
,
pbSignedDataMsg
);
else
{
FIXME
(
"unimplemented for subject type %s
\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