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
44f25173
Commit
44f25173
authored
Mar 25, 2008
by
Juan Lang
Committed by
Alexandre Julliard
Mar 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Allow one update to a decode message after the final update if it's a detached message.
parent
85627097
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
msg.c
dlls/crypt32/msg.c
+38
-3
msg.c
dlls/crypt32/tests/msg.c
+0
-1
No files found.
dlls/crypt32/msg.c
View file @
44f25173
...
...
@@ -52,6 +52,7 @@ BOOL CRYPT_DefaultMsgControl(HCRYPTMSG hCryptMsg, DWORD dwFlags,
typedef
enum
_CryptMsgState
{
MsgStateInit
,
MsgStateUpdated
,
MsgStateDataFinalized
,
MsgStateFinalized
}
CryptMsgState
;
...
...
@@ -1663,10 +1664,30 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
SetLastError
(
CRYPT_E_MSG_ERROR
);
else
if
(
msg
->
base
.
streamed
)
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
FIXME
(
"(%p, %p, %d, %d): streamed update stub
\n
"
,
hCryptMsg
,
pbData
,
cbData
,
fFinal
);
msg
->
base
.
state
=
fFinal
?
MsgStateFinalized
:
MsgStateUpdated
;
if
(
fFinal
)
{
if
(
msg
->
base
.
open_flags
&
CMSG_DETACHED_FLAG
&&
msg
->
base
.
state
!=
MsgStateDataFinalized
)
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
msg
->
base
.
state
=
MsgStateDataFinalized
;
}
else
{
FIXME
(
"(%p, %p, %d, %d): detached update stub
\n
"
,
hCryptMsg
,
pbData
,
cbData
,
fFinal
);
ret
=
TRUE
;
msg
->
base
.
state
=
MsgStateFinalized
;
}
}
else
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
if
(
msg
->
base
.
state
==
MsgStateInit
)
msg
->
base
.
state
=
MsgStateUpdated
;
}
}
else
{
...
...
@@ -1674,12 +1695,26 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
SetLastError
(
CRYPT_E_MSG_ERROR
);
else
{
if
(
msg
->
base
.
state
==
MsgStateInit
)
{
ret
=
CDecodeMsg_CopyData
(
msg
,
pbData
,
cbData
);
if
(
ret
)
ret
=
CDecodeMsg_DecodeContent
(
msg
,
&
msg
->
msg_data
,
msg
->
type
);
ret
=
CDecodeMsg_DecodeContent
(
msg
,
&
msg
->
msg_data
,
msg
->
type
);
if
(
msg
->
base
.
open_flags
&
CMSG_DETACHED_FLAG
)
msg
->
base
.
state
=
MsgStateDataFinalized
;
else
msg
->
base
.
state
=
MsgStateFinalized
;
}
else
if
(
msg
->
base
.
state
==
MsgStateDataFinalized
)
{
FIXME
(
"(%p, %p, %d, %d): detached update stub
\n
"
,
hCryptMsg
,
pbData
,
cbData
,
fFinal
);
ret
=
TRUE
;
msg
->
base
.
state
=
MsgStateFinalized
;
}
}
}
return
ret
;
}
...
...
dlls/crypt32/tests/msg.c
View file @
44f25173
...
...
@@ -2062,7 +2062,6 @@ static void test_decode_msg_update(void)
/* as does a second (probably to update the detached portion).. */
ret
=
CryptMsgUpdate
(
msg
,
detachedSignedContent
,
sizeof
(
detachedSignedContent
),
TRUE
);
todo_wine
ok
(
ret
,
"CryptMsgUpdate failed: %08x
\n
"
,
GetLastError
());
/* while a third fails. */
ret
=
CryptMsgUpdate
(
msg
,
detachedSignedContent
,
...
...
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