From: Martxel Date: Thu, 6 Mar 2025 10:54:49 +0000 (+0100) Subject: openssl: fix pkcs11 URI checking for key files. X-Git-Tag: curl-8_13_0~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5cb83e4931687e4fe4a9e34b3e35939277a7279;p=thirdparty%2Fcurl.git openssl: fix pkcs11 URI checking for key files. Closes #16591 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index e10324ec13..ae3f4ab710 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1612,9 +1612,9 @@ fail: case SSL_FILETYPE_PROVIDER: { /* Implicitly use pkcs11 provider if none was provided and the - * cert_file is a PKCS#11 URI */ + * key_file is a PKCS#11 URI */ if(!data->state.provider) { - if(is_pkcs11_uri(cert_file)) { + if(is_pkcs11_uri(key_file)) { if(ossl_set_provider(data, "pkcs11") != CURLE_OK) { return 0; }