aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-02 07:53:25 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-02 07:53:25 +0000
commitad66fc6cc2be6bb1918af84a523bab4459d36308 (patch)
treed1f1cafe6c5675e79a9b27d7663683593de686dc /src
parentd12b44204b0914d37cbc8508f2bfe304de946bc6 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/main.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index feb16b5d9..1e2633478 100644
--- a/src/main.c
+++ b/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");