From d3fa54a2435593187c6d271b126dd33ec6dd491f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 22 Mar 2026 18:17:53 +0100 Subject: [PATCH] config2setopts: make --capath work in proxy disabled builds Follow-up to 95e8515ca0801c2b1aacbdad0 Spotted by Codex Security Closes #21063 --- src/config2setopts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config2setopts.c b/src/config2setopts.c index 543322ba76..1a82edeb70 100644 --- a/src/config2setopts.c +++ b/src/config2setopts.c @@ -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)