]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
config2setopts: make --capath work in proxy disabled builds
authorDaniel Stenberg <daniel@haxx.se>
Sun, 22 Mar 2026 17:17:53 +0000 (18:17 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 23 Mar 2026 13:33:59 +0000 (14:33 +0100)
Follow-up to 95e8515ca0801c2b1aacbdad0

Spotted by Codex Security

Closes #21063

src/config2setopts.c

index 543322ba76293402fb85fbe53fc7a5dfa2d8a462..1a82edeb70c33d25a838dc9bfb975dcac03e9f61 100644 (file)
@@ -295,10 +295,11 @@ static CURLcode ssl_ca_setopts(struct OperationConfig *config, CURL *curl)
     MY_SETOPT_STR(curl, CURLOPT_PROXY_CAPATH,
                   (config->proxy_capath ? config->proxy_capath :
                    config->capath));
-    if(result && config->proxy_capath) {
+    if((result == CURLE_NOT_BUILT_IN) || (result == CURLE_UNKNOWN_OPTION)) {
       warnf("ignoring %s, not supported by libcurl with %s",
-            config->proxy_capath ? "--proxy-capath" : "--capath",
+            "setting the CA path for the proxy",
             ssl_backend());
+      result = CURLE_OK;
     }
   }
   if(result)