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

Alexandre Julliard julliard at winehq.org
Mon Nov 19 15:59:38 CST 2018


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Nov 19 11:06:18 2018 +0300

crypt32: Make sure that the provider supports the specified public key 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 faf70de..2d7ef42 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);




More information about the wine-cvs mailing list