openssl: fix pkcs11 URI checking for key files.

Closes #16591
This commit is contained in:
Martxel 2025-03-06 11:54:49 +01:00 committed by Daniel Stenberg
parent 64ba75ca90
commit f5cb83e493
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;
}