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
bfde05d8
Commit
bfde05d8
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 updating a hash a member of signed message data, not signed message.
parent
0080d3d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
msg.c
dlls/crypt32/msg.c
+14
-16
No files found.
dlls/crypt32/msg.c
View file @
bfde05d8
...
...
@@ -819,6 +819,18 @@ static void CSignedMsgData_CloseHandles(CSignedMsgData *msg_data)
CryptMemFree
(
msg_data
->
signerHandles
);
}
static
BOOL
CSignedMsgData_UpdateHash
(
CSignedMsgData
*
msg_data
,
const
BYTE
*
pbData
,
DWORD
cbData
)
{
DWORD
i
;
BOOL
ret
=
TRUE
;
for
(
i
=
0
;
ret
&&
i
<
msg_data
->
info
->
cSignerInfo
;
i
++
)
ret
=
CryptHashData
(
msg_data
->
signerHandles
[
i
].
contentHash
,
pbData
,
cbData
,
0
);
return
ret
;
}
static
void
CSignedEncodeMsg_Close
(
HCRYPTMSG
hCryptMsg
)
{
CSignedEncodeMsg
*
msg
=
(
CSignedEncodeMsg
*
)
hCryptMsg
;
...
...
@@ -928,20 +940,6 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType,
return
ret
;
}
static
BOOL
CSignedEncodeMsg_UpdateHash
(
CSignedEncodeMsg
*
msg
,
const
BYTE
*
pbData
,
DWORD
cbData
)
{
DWORD
i
;
BOOL
ret
=
TRUE
;
TRACE
(
"(%p, %p, %d)
\n
"
,
msg
,
pbData
,
cbData
);
for
(
i
=
0
;
ret
&&
i
<
msg
->
msg_data
.
info
->
cSignerInfo
;
i
++
)
ret
=
CryptHashData
(
msg
->
msg_data
.
signerHandles
[
i
].
contentHash
,
pbData
,
cbData
,
0
);
return
ret
;
}
static
BOOL
CRYPT_AppendAttribute
(
CRYPT_ATTRIBUTES
*
out
,
const
CRYPT_ATTRIBUTE
*
in
)
{
...
...
@@ -1099,7 +1097,7 @@ static BOOL CSignedEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
if
(
msg
->
base
.
streamed
||
(
msg
->
base
.
open_flags
&
CMSG_DETACHED_FLAG
))
{
ret
=
CSigned
EncodeMsg_UpdateHash
(
msg
,
pbData
,
cbData
);
ret
=
CSigned
MsgData_UpdateHash
(
&
msg
->
msg_data
,
pbData
,
cbData
);
if
(
ret
&&
fFinal
)
{
ret
=
CSignedEncodeMsg_UpdateAuthenticatedAttributes
(
msg
);
...
...
@@ -1128,7 +1126,7 @@ static BOOL CSignedEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
else
ret
=
TRUE
;
if
(
ret
)
ret
=
CSigned
EncodeMsg_UpdateHash
(
msg
,
pbData
,
cbData
);
ret
=
CSigned
MsgData_UpdateHash
(
&
msg
->
msg_data
,
pbData
,
cbData
);
if
(
ret
)
ret
=
CSignedEncodeMsg_UpdateAuthenticatedAttributes
(
msg
);
if
(
ret
)
...
...
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