Commit 3617819b authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Test updates after the final update to a detached message.

parent 19ed9729
...@@ -2052,6 +2052,24 @@ static void test_decode_msg_update(void) ...@@ -2052,6 +2052,24 @@ static void test_decode_msg_update(void)
sizeof(signedWithCertAndCrlBareContent), TRUE); sizeof(signedWithCertAndCrlBareContent), TRUE);
ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
CryptMsgClose(msg); 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, static const BYTE hashParam[] = { 0x08,0xd6,0xc0,0x5a,0x21,0x51,0x2a,0x79,0xa1,
......
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