crypt32: store crypt provider in decode message

Juan Lang juan.lang at gmail.com
Fri Jul 13 13:50:23 CDT 2007


or, fix an oops
--Juan
-------------- next part --------------
From a23be262908628d4031c8cfa22dfe408cd6ba088 Mon Sep 17 00:00:00 2001
From: Juan Lang <juanlang at juan.corp.google.com>
Date: Fri, 13 Jul 2007 10:58:10 -0700
Subject: [PATCH] Store crypt provider in decode message
---
 dlls/crypt32/msg.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index e97aa0c..78130d2 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -666,6 +666,13 @@ HCRYPTMSG WINAPI CryptMsgOpenToDecode(DW
         CryptMsgBase_Init((CryptMsgBase *)msg, dwFlags, pStreamInfo,
          CDecodeMsg_Close, CDecodeMsg_GetParam, CDecodeMsg_Update);
         msg->type = dwMsgType;
+        if (hCryptProv)
+            msg->crypt_prov = hCryptProv;
+        else
+        {
+            msg->crypt_prov = CRYPT_GetDefaultProvider();
+            msg->base.open_flags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
+        }
     }
     return msg;
 }
-- 
1.4.1


More information about the wine-patches mailing list