crypt32: Fix streamed, detached updates.

Thanks to Juan for confirming this is the correct fix.
This commit is contained in:
Huw Davies 2008-08-28 15:28:26 +01:00 committed by Alexandre Julliard
parent 152a55eef2
commit e8d834e02d
2 changed files with 1 additions and 2 deletions

View file

@ -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 ==

View file

@ -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());