Dmitry Timoshkov : crypt32: Look for the provider that supports the specified content OID in CryptMsgOpenToEncode (CMSG_HASHED).

Alexandre Julliard julliard at winehq.org
Tue Nov 6 15:10:05 CST 2018


Module: wine
Branch: master
Commit: fa713c3d235e0780bffda8d22738561c52b630fd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fa713c3d235e0780bffda8d22738561c52b630fd

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Nov  6 13:41:05 2018 +0300

crypt32: Look for the provider that supports the specified content OID in CryptMsgOpenToEncode(CMSG_HASHED).

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/crypt32/msg.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c
index f37c462..26f2616 100644
--- a/dlls/crypt32/msg.c
+++ b/dlls/crypt32/msg.c
@@ -567,7 +567,12 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo,
         prov = info->hCryptProv;
     else
     {
-        prov = I_CryptGetDefaultCryptProv(0);
+        prov = I_CryptGetDefaultCryptProv(algID);
+        if (!prov)
+        {
+            SetLastError(E_INVALIDARG);
+            return NULL;
+        }
         dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG;
     }
     msg = CryptMemAlloc(sizeof(CHashEncodeMsg));




More information about the wine-cvs mailing list