]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Made curl recognize the environment variables Lynx (and others?) support for
authorDaniel Stenberg <daniel@haxx.se>
Mon, 2 May 2005 07:53:25 +0000 (07:53 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 2 May 2005 07:53:25 +0000 (07:53 +0000)
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.

src/main.c

index feb16b5d928608cac1accb200fde351b60a4f5bd..1e263347832f2a6176011a223f4aff4b715bcf3a 100644 (file)
@@ -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");