[PATCH] crypt32: Make sure that the provider supports the specified public key algorithm.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- 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 faf70de607..2d7ef42d3c 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -1329,7 +1329,7 @@ DWORD WINAPI CertGetPublicKeyLength(DWORD dwCertEncodingType, TRACE("public key algid %#x (%s)\n", info->u.Algid, debugstr_a(pPublicKey->Algorithm.pszObjId)); - ret = CryptImportPublicKeyInfo(I_CryptGetDefaultCryptProv(0), dwCertEncodingType, pPublicKey, &key); + ret = CryptImportPublicKeyInfo(I_CryptGetDefaultCryptProv(info->u.Algid), dwCertEncodingType, pPublicKey, &key); if (ret) { size = sizeof(len); -- 2.17.1
participants (1)
-
Dmitry Timoshkov