]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: only try engine/provider if a certificate file/name is provided
authorDaniel Stenberg <daniel@haxx.se>
Wed, 22 Oct 2025 22:53:09 +0000 (00:53 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 23 Oct 2025 05:54:34 +0000 (07:54 +0200)
Bug: https://issues.oss-fuzz.com/issues/435278402

Closes #19197

lib/vtls/openssl.c

index f62f99cc86c1fc00d02fc0f7af3be6a81a1d238e..336902b95105d7c8e7236d126a23318686534cf3 100644 (file)
@@ -1721,12 +1721,12 @@ static CURLcode client_cert(struct Curl_easy *data,
       break;
 
     case SSL_FILETYPE_ENGINE:
-      if(!engineload(data, ctx, cert_file))
+      if(!cert_file || !engineload(data, ctx, cert_file))
         return CURLE_SSL_CERTPROBLEM;
       break;
 
     case SSL_FILETYPE_PROVIDER:
-      if(!providerload(data, ctx, cert_file))
+      if(!cert_file || !providerload(data, ctx, cert_file))
         return CURLE_SSL_CERTPROBLEM;
       break;