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
aa265b41
Commit
aa265b41
authored
Aug 20, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Handle the detached portion of detached signed messages.
parent
0a8d14c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
msg.c
dlls/crypt32/msg.c
+18
-9
No files found.
dlls/crypt32/msg.c
View file @
aa265b41
...
...
@@ -1658,20 +1658,30 @@ static BOOL CDecodeMsg_DecodeSignedContent(CDecodeMsg *msg,
msg
->
crypt_prov
);
if
(
ret
)
{
CRYPT_DATA_BLOB
*
content
;
/* Now that we have all the content, update the hash handles with
* it. Have to decode it if the type is szOID_RSA_data.
* it. If the message is a detached message, the content is stored
* in msg->detached_data rather than in the signed message's
* content.
*/
if
(
msg
->
u
.
signed_data
.
info
->
content
.
Content
.
cbData
)
if
(
msg
->
base
.
open_flags
&
CMSG_DETACHED_FLAG
)
content
=
&
msg
->
detached_data
;
else
content
=
&
msg
->
u
.
signed_data
.
info
->
content
.
Content
;
if
(
content
->
cbData
)
{
if
(
!
strcmp
(
msg
->
u
.
signed_data
.
info
->
content
.
pszObjId
,
/* If the message is not detached, have to decode the message's
* content if the type is szOID_RSA_data.
*/
if
(
!
(
msg
->
base
.
open_flags
&
CMSG_DETACHED_FLAG
)
&&
!
strcmp
(
msg
->
u
.
signed_data
.
info
->
content
.
pszObjId
,
szOID_RSA_data
))
{
CRYPT_DATA_BLOB
*
blob
;
ret
=
CryptDecodeObjectEx
(
X509_ASN_ENCODING
,
X509_OCTET_STRING
,
msg
->
u
.
signed_data
.
info
->
content
.
Content
.
pbData
,
msg
->
u
.
signed_data
.
info
->
content
.
Content
.
cbData
,
X509_OCTET_STRING
,
content
->
pbData
,
content
->
cbData
,
CRYPT_DECODE_ALLOC_FLAG
,
NULL
,
(
LPBYTE
)
&
blob
,
&
size
);
if
(
ret
)
{
...
...
@@ -1682,14 +1692,13 @@ static BOOL CDecodeMsg_DecodeSignedContent(CDecodeMsg *msg,
}
else
ret
=
CSignedMsgData_Update
(
&
msg
->
u
.
signed_data
,
msg
->
u
.
signed_data
.
info
->
content
.
Content
.
pbData
,
msg
->
u
.
signed_data
.
info
->
content
.
Content
.
cbData
,
TRUE
,
Verify
);
content
->
pbData
,
content
->
cbData
,
TRUE
,
Verify
);
}
}
}
return
ret
;
}
/* Decodes the content in blob as the type given, and updates the value
* (type, parameters, etc.) of msg based on what blob contains.
* It doesn't just use msg's type, to allow a recursive call from an implicitly
...
...
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