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

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2019-01-23 17:27:44 +08:00 committed by Alexandre Julliard
parent 34a89805e3
commit ca683382e0

View file

@ -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)