mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
tool_operate: allow SSL_CERT_FILE and SSL_CERT_DIR
... used at once. Reported-by: Gabriel Corona Fixes #11325 Closes #11531
This commit is contained in:
parent
42697e377e
commit
29bce9857a
@ -2595,16 +2595,16 @@ static CURLcode transfer_per_config(struct GlobalConfig *global,
|
||||
}
|
||||
capath_from_env = true;
|
||||
}
|
||||
else {
|
||||
env = curlx_getenv("SSL_CERT_FILE");
|
||||
if(env) {
|
||||
config->cacert = strdup(env);
|
||||
if(!config->cacert) {
|
||||
curl_free(env);
|
||||
curl_easy_cleanup(curltls);
|
||||
errorf(global, "out of memory");
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
env = curlx_getenv("SSL_CERT_FILE");
|
||||
if(env) {
|
||||
config->cacert = strdup(env);
|
||||
if(!config->cacert) {
|
||||
curl_free(env);
|
||||
if(capath_from_env)
|
||||
free(config->capath);
|
||||
curl_easy_cleanup(curltls);
|
||||
errorf(global, "out of memory");
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user