config2setopts: make --capath work in proxy disabled builds

Follow-up to 95e8515ca0

Spotted by Codex Security

Closes #21063
This commit is contained in:
Daniel Stenberg 2026-03-22 18:17:53 +01:00
parent 07d109b7c6
commit d3fa54a243
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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)