tool_operate: fix condition for loading curl-ca-bundle.crt (Windows)

It was incorrecly loaded with env `CURL_CA_BUNDLE` unset +
`SSL_CERT_DIR` set + `SSL_CERT_FILE` unset.

Found by Codex Security

Follow-up to 29bce9857a #11325 #11531

Closes #20989
This commit is contained in:
Viktor Szakats 2026-03-18 20:27:24 +01:00
parent 2bb3643bc1
commit fc222ec11f
No known key found for this signature in database

View file

@ -2119,7 +2119,7 @@ static CURLcode cacertpaths(struct OperationConfig *config)
}
#ifdef _WIN32
if(!env) {
if(!config->capath && !config->cacert) {
#ifdef CURL_CA_SEARCH_SAFE
char *cacert = NULL;
FILE *cafile = tool_execpath("curl-ca-bundle.crt", &cacert);