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
f8ff1c32
Commit
f8ff1c32
authored
Sep 27, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Support PKCS messages wrapped in a PKCS content info in CryptQueryObject.
parent
f8809821
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
1 deletion
+49
-1
object.c
dlls/crypt32/object.c
+49
-1
No files found.
dlls/crypt32/object.c
View file @
f8ff1c32
...
...
@@ -299,7 +299,55 @@ static BOOL CRYPT_QueryMessageObject(DWORD dwObjectType, const void *pvObject,
return
FALSE
;
ret
=
FALSE
;
if
(
dwExpectedContentTypeFlags
&
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
)
/* Try it first as a PKCS content info */
if
((
dwExpectedContentTypeFlags
&
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
)
||
(
dwExpectedContentTypeFlags
&
CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED
))
{
msg
=
CryptMsgOpenToDecode
(
encodingType
,
0
,
0
,
0
,
NULL
,
NULL
);
if
(
msg
)
{
ret
=
CryptMsgUpdate
(
msg
,
blob
->
pbData
,
blob
->
cbData
,
TRUE
);
if
(
ret
)
{
DWORD
type
,
len
=
sizeof
(
type
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_TYPE_PARAM
,
0
,
&
type
,
&
len
);
if
(
ret
)
{
if
((
dwExpectedContentTypeFlags
&
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
))
{
if
(
type
!=
CMSG_SIGNED
)
{
SetLastError
(
ERROR_INVALID_DATA
);
ret
=
FALSE
;
}
else
if
(
pdwContentType
)
*
pdwContentType
=
CERT_QUERY_CONTENT_PKCS7_SIGNED
;
}
else
if
((
dwExpectedContentTypeFlags
&
CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED
))
{
if
(
type
!=
CMSG_DATA
)
{
SetLastError
(
ERROR_INVALID_DATA
);
ret
=
FALSE
;
}
else
if
(
pdwContentType
)
*
pdwContentType
=
CERT_QUERY_CONTENT_PKCS7_UNSIGNED
;
}
}
}
if
(
!
ret
)
{
CryptMsgClose
(
msg
);
msg
=
NULL
;
}
}
}
/* Failing that, try explicitly typed messages */
if
(
!
ret
&&
(
dwExpectedContentTypeFlags
&
CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED
))
{
msg
=
CryptMsgOpenToDecode
(
encodingType
,
0
,
CMSG_SIGNED
,
0
,
NULL
,
NULL
);
if
(
msg
)
...
...
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