Huw Davies : crypt32/tests: Add a test for streamed, detached updates.

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


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Aug 28 14:54:24 2008 +0100

crypt32/tests: Add a test for streamed, detached updates.

---

 dlls/crypt32/tests/msg.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c
index c734e6f..e9e2018 100644
--- a/dlls/crypt32/tests/msg.c
+++ b/dlls/crypt32/tests/msg.c
@@ -2241,6 +2241,22 @@ static void test_decode_msg_update(void)
     ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR,
      "expected CRYPT_E_MSG_ERROR, got %08x\n", GetLastError());
     CryptMsgClose(msg);
+
+    msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, CMSG_DETACHED_FLAG, 0, 0, NULL, &streamInfo);
+    ret = CryptMsgUpdate(msg, detachedSignedContent, sizeof(detachedSignedContent), FALSE);
+    ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
+    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());
+
+    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,




More information about the wine-cvs mailing list