Commit e8d834e0 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

crypt32: Fix streamed, detached updates.

Thanks to Juan for confirming this is the correct fix.
parent 152a55ee
......@@ -1880,7 +1880,7 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData,
}
}
}
if (ret &&
if (ret && fFinal &&
((msg->base.open_flags & CMSG_DETACHED_FLAG && msg->base.state ==
MsgStateDataFinalized) ||
(!(msg->base.open_flags & CMSG_DETACHED_FLAG) && msg->base.state ==
......
......@@ -2248,7 +2248,6 @@ static void test_decode_msg_update(void)
ret = CryptMsgUpdate(msg, NULL, 0, TRUE);
ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE);
todo_wine
ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
ret = CryptMsgUpdate(msg, NULL, 0, TRUE);
ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment