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
f1f8e87b
Commit
f1f8e87b
authored
Aug 20, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Aug 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Make constructing handles a member of signed msg data.
parent
07ba16c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
msg.c
dlls/crypt32/msg.c
+14
-14
No files found.
dlls/crypt32/msg.c
View file @
f1f8e87b
...
...
@@ -790,20 +790,23 @@ typedef struct _CSignedEncodeMsg
CSignedMsgData
msg_data
;
}
CSignedEncodeMsg
;
/* Constructs a CSignerHandles with a hash handle based on HashAlgorithm, and
* an authenticated attributes hash handle if hasAuthAttrs is TRUE.
/* Constructs the signer handles for the signerIndex'th signer of msg_data.
* Assumes signerIndex is a valid idnex, and that msg_data's info has already
* been constructed.
*/
static
BOOL
CSignerHandles_Construct
(
CSignerHandles
*
handles
,
HCRYPTPROV
crypt_prov
,
CRYPT_ALGORITHM_IDENTIFIER
*
HashAlgorithm
,
BOOL
hasAuthAttrs
)
static
BOOL
CSignedMsgData_ConstructSignerHandles
(
CSignedMsgData
*
msg_data
,
DWORD
signerIndex
,
HCRYPTPROV
crypt_prov
)
{
ALG_ID
algID
;
BOOL
ret
;
algID
=
CertOIDToAlgId
(
HashAlgorithm
->
pszObjId
);
ret
=
CryptCreateHash
(
crypt_prov
,
algID
,
0
,
0
,
&
handles
->
contentHash
);
if
(
ret
&&
hasAuthAttrs
)
ret
=
CryptCreateHash
(
crypt_prov
,
algID
,
0
,
0
,
&
handles
->
authAttrHash
);
algID
=
CertOIDToAlgId
(
msg_data
->
info
->
rgSignerInfo
[
signerIndex
].
HashAlgorithm
.
pszObjId
);
ret
=
CryptCreateHash
(
crypt_prov
,
algID
,
0
,
0
,
&
msg_data
->
signerHandles
->
contentHash
);
if
(
ret
&&
msg_data
->
info
->
rgSignerInfo
[
signerIndex
].
AuthAttrs
.
cAttr
>
0
)
ret
=
CryptCreateHash
(
crypt_prov
,
algID
,
0
,
0
,
&
msg_data
->
signerHandles
->
authAttrHash
);
return
ret
;
}
...
...
@@ -1222,11 +1225,8 @@ static HCRYPTMSG CSignedEncodeMsg_Open(DWORD dwFlags,
&
info
->
rgSigners
[
i
]);
if
(
ret
)
{
ret
=
CSignerHandles_Construct
(
&
msg
->
msg_data
.
signerHandles
[
i
],
info
->
rgSigners
[
i
].
hCryptProv
,
&
info
->
rgSigners
[
i
].
HashAlgorithm
,
info
->
rgSigners
[
i
].
cAuthAttr
>
0
);
ret
=
CSignedMsgData_ConstructSignerHandles
(
&
msg
->
msg_data
,
i
,
info
->
rgSigners
[
i
].
hCryptProv
);
if
(
dwFlags
&
CMSG_CRYPT_RELEASE_CONTEXT_FLAG
)
CryptReleaseContext
(
info
->
rgSigners
[
i
].
hCryptProv
,
0
);
...
...
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