Huw Davies : crypt32: Fix streamed, detached updates.

Alexandre Julliard julliard at winehq.org
Fri Aug 29 07:29:05 CDT 2008


Module: wine
Branch: master
Commit: e8d834e02d0ee0d1b7fcc96f4dff1697457217a6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e8d834e02d0ee0d1b7fcc96f4dff1697457217a6

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Aug 28 15:28:26 2008 +0100

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 insertions(+), 2 deletions(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index 82bed31..449b944 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 e9e2018..aa969e1 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());




More information about the wine-cvs mailing list