From a9baa25c8c43f6cf9b0373f273ba01d533ae53fa Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Mon, 19 Nov 2018 11:06:18 +0300 Subject: [PATCH] crypt32: Make sure that the provider supports the specified public key algorithm. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- 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 faf70de607c..2d7ef42d3c3 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);