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
7e10d48c
Commit
7e10d48c
authored
Jul 30, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Implement getting the signer cert info from a decoded signed message.
parent
555e85a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
msg.c
dlls/crypt32/msg.c
+44
-0
No files found.
dlls/crypt32/msg.c
View file @
7e10d48c
...
...
@@ -1697,6 +1697,38 @@ static BOOL CRYPT_CopySignerInfo(void *pvData, DWORD *pcbData,
return
ret
;
}
static
BOOL
CRYPT_CopySignerCertInfo
(
void
*
pvData
,
DWORD
*
pcbData
,
const
CMSG_SIGNER_INFO
*
in
)
{
DWORD
size
=
sizeof
(
CERT_INFO
);
BOOL
ret
;
size
+=
in
->
Issuer
.
cbData
;
size
+=
in
->
SerialNumber
.
cbData
;
if
(
!
pvData
)
{
*
pcbData
=
size
;
ret
=
TRUE
;
}
else
if
(
*
pcbData
<
size
)
{
*
pcbData
=
size
;
SetLastError
(
ERROR_MORE_DATA
);
ret
=
FALSE
;
}
else
{
LPBYTE
nextData
=
(
BYTE
*
)
pvData
+
sizeof
(
CERT_INFO
);
CERT_INFO
*
out
=
(
CERT_INFO
*
)
pvData
;
memset
(
out
,
0
,
sizeof
(
CERT_INFO
));
CRYPT_CopyBlob
(
&
out
->
Issuer
,
&
in
->
Issuer
,
&
nextData
);
CRYPT_CopyBlob
(
&
out
->
SerialNumber
,
&
in
->
SerialNumber
,
&
nextData
);
ret
=
TRUE
;
}
return
ret
;
}
static
BOOL
CDecodeSignedMsg_GetParam
(
CDecodeMsg
*
msg
,
DWORD
dwParamType
,
DWORD
dwIndex
,
void
*
pvData
,
DWORD
*
pcbData
)
{
...
...
@@ -1747,6 +1779,18 @@ static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType,
else
SetLastError
(
CRYPT_E_INVALID_MSG_TYPE
);
break
;
case
CMSG_SIGNER_CERT_INFO_PARAM
:
if
(
msg
->
u
.
signedInfo
)
{
if
(
dwIndex
>=
msg
->
u
.
signedInfo
->
cSignerInfo
)
SetLastError
(
CRYPT_E_INVALID_INDEX
);
else
ret
=
CRYPT_CopySignerCertInfo
(
pvData
,
pcbData
,
&
msg
->
u
.
signedInfo
->
rgSignerInfo
[
dwIndex
]);
}
else
SetLastError
(
CRYPT_E_INVALID_MSG_TYPE
);
break
;
case
CMSG_CERT_COUNT_PARAM
:
if
(
msg
->
u
.
signedInfo
)
ret
=
CRYPT_CopyParam
(
pvData
,
pcbData
,
...
...
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