mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Made curl recognize the environment variables Lynx (and others?) support for
pointing out the CA cert path/file: SSL_CERT_DIR and SSL_CERT_FILE. If CURL_CA_BUNDLE is not set, they are checked afterwards.
This commit is contained in:
parent
d12b44204b
commit
ad66fc6cc2
15
src/main.c
15
src/main.c
@ -3127,10 +3127,21 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
!config->capath &&
|
||||
!config->insecure_ok) {
|
||||
env = curlx_getenv("CURL_CA_BUNDLE");
|
||||
if(env) {
|
||||
if(env)
|
||||
GetStr(&config->cacert, env);
|
||||
curl_free(env);
|
||||
else {
|
||||
env = curlx_getenv("SSL_CERT_DIR");
|
||||
if(env)
|
||||
GetStr(&config->capath, env);
|
||||
else {
|
||||
env = curlx_getenv("SSL_CERT_FILE");
|
||||
if(env)
|
||||
GetStr(&config->cacert, env);
|
||||
}
|
||||
}
|
||||
|
||||
if(env)
|
||||
curl_free(env);
|
||||
#if defined(WIN32) && !defined(__CYGWIN32__)
|
||||
else
|
||||
FindWin32CACert(config, "curl-ca-bundle.crt");
|
||||
|
Loading…
Reference in New Issue
Block a user