crypt32: Allow updating data messages with no content.
This commit is contained in:
parent
07297ea9d0
commit
2910cf9660
|
@ -276,14 +276,10 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
|||
SetLastError(CRYPT_E_MSG_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg->base.state = MsgStateFinalized;
|
||||
if (!cbData)
|
||||
SetLastError(E_INVALIDARG);
|
||||
else
|
||||
{
|
||||
CRYPT_DATA_BLOB blob = { cbData, (LPBYTE)pbData };
|
||||
|
||||
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.
|
||||
*/
|
||||
|
@ -292,7 +288,6 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
|
|||
&msg->bare_content_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue