From e8d834e02d0ee0d1b7fcc96f4dff1697457217a6 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 28 Aug 2008 15:28:26 +0100 Subject: [PATCH] crypt32: Fix streamed, detached updates. Thanks to Juan for confirming this is the correct fix. --- dlls/crypt32/msg.c | 2 +- dlls/crypt32/tests/msg.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 82bed31c21f..449b944a154 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -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 == diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index e9e20180172..aa969e1251a 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -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());