crypt32(10/25): Test updating hash messages with NULL stream output function

Juan Lang juan.lang at gmail.com
Thu Jul 12 17:19:28 CDT 2007


--Juan
-------------- next part --------------
From 8f266398e23c8e2df2877696615e48b6a7cd5c26 Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Thu, 12 Jul 2007 14:48:13 -0700
Subject: [PATCH] Test updating hash messages with NULL stream output function
---
 dlls/crypt32/tests/msg.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c
index 8874d8e..3e1ed81 100644
--- a/dlls/crypt32/tests/msg.c
+++ b/dlls/crypt32/tests/msg.c
@@ -745,6 +745,16 @@ static void test_hash_msg_update(void)
     todo_wine
     ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError());
     CryptMsgClose(msg);
+    /* Setting pfnStreamOutput to NULL results in no error.  (In what appears
+     * to be a bug, it isn't actually used - see encoding tests.)
+     */
+    streamInfo.pfnStreamOutput = NULL;
+    msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo,
+     NULL, &streamInfo);
+    ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE);
+    todo_wine
+    ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError());
+    CryptMsgClose(msg);
 }
 
 static const BYTE emptyHashParam[] = {
-- 
1.4.1


More information about the wine-patches mailing list