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
2910cf96
Commit
2910cf96
authored
Feb 10, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Feb 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Allow updating data messages with no content.
parent
07297ea9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
msg.c
dlls/crypt32/msg.c
+8
-13
msg.c
dlls/crypt32/tests/msg.c
+0
-1
No files found.
dlls/crypt32/msg.c
View file @
2910cf96
...
...
@@ -277,20 +277,15 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
}
else
{
msg
->
base
.
state
=
MsgStateFinalized
;
if
(
!
cbData
)
SetLastError
(
E_INVALIDARG
);
else
{
CRYPT_DATA_BLOB
blob
=
{
cbData
,
(
LPBYTE
)
pbData
};
CRYPT_DATA_BLOB
blob
=
{
cbData
,
(
LPBYTE
)
pbData
};
/* non-streamed data messages don't allow non-final updates,
* don't bother checking whether data already exist, they can't.
*/
ret
=
CryptEncodeObjectEx
(
X509_ASN_ENCODING
,
X509_OCTET_STRING
,
&
blob
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
msg
->
bare_content
,
&
msg
->
bare_content_len
);
}
msg
->
base
.
state
=
MsgStateFinalized
;
/* non-streamed data messages don't allow non-final updates,
* don't bother checking whether data already exist, they can't.
*/
ret
=
CryptEncodeObjectEx
(
X509_ASN_ENCODING
,
X509_OCTET_STRING
,
&
blob
,
CRYPT_ENCODE_ALLOC_FLAG
,
NULL
,
&
msg
->
bare_content
,
&
msg
->
bare_content_len
);
}
}
return
ret
;
...
...
dlls/crypt32/tests/msg.c
View file @
2910cf96
...
...
@@ -394,7 +394,6 @@ static void test_data_msg_update(void)
NULL
);
/* Starting with Vista, can update a message with no data. */
ret
=
CryptMsgUpdate
(
msg
,
NULL
,
0
,
TRUE
);
todo_wine
ok
(
ret
||
broken
(
!
ret
),
"CryptMsgUpdate failed: %08x
\n
"
,
GetLastError
());
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