Module: wine Branch: master Commit: 3617819bf6d6ed0f7564f5546e705504ac534f26 URL: http://source.winehq.org/git/wine.git/?a=commit;h=3617819bf6d6ed0f7564f5546e...
Author: Juan Lang juan.lang@gmail.com Date: Tue Mar 25 11:01:12 2008 -0700
crypt32: Test updates after the final update to a detached message.
---
dlls/crypt32/tests/msg.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index ab35b3a..fb71540 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -2052,6 +2052,24 @@ static void test_decode_msg_update(void) sizeof(signedWithCertAndCrlBareContent), TRUE); ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); CryptMsgClose(msg); + + msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, + NULL, NULL); + /* The first update succeeds.. */ + ret = CryptMsgUpdate(msg, detachedSignedContent, + sizeof(detachedSignedContent), TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + /* as does a second (probably to update the detached portion).. */ + ret = CryptMsgUpdate(msg, detachedSignedContent, + sizeof(detachedSignedContent), TRUE); + todo_wine + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + /* while a third fails. */ + ret = CryptMsgUpdate(msg, detachedSignedContent, + sizeof(detachedSignedContent), TRUE); + ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, + "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError()); + CryptMsgClose(msg); }
static const BYTE hashParam[] = { 0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,