Dmitry Timoshkov : crypt32: Make sure that the provider supports the specified hash algorithm.

Alexandre Julliard julliard at winehq.org
Wed Jan 23 17:11:34 CST 2019


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Wed Jan 23 17:27:44 2019 +0800

crypt32: Make sure that the provider supports the specified hash algorithm.

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

---

 dlls/crypt32/cert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index b532936..eb646cd 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -2195,7 +2195,7 @@ BOOL WINAPI CryptHashCertificate(HCRYPTPROV_LEGACY hCryptProv, ALG_ID Algid,
      pbEncoded, cbEncoded, pbComputedHash, pcbComputedHash);
 
     if (!hCryptProv)
-        hCryptProv = I_CryptGetDefaultCryptProv(0);
+        hCryptProv = I_CryptGetDefaultCryptProv(Algid);
     if (!Algid)
         Algid = CALG_SHA1;
     if (ret)




More information about the wine-cvs mailing list