Move openssl.cnf out of lib/.
[openssl.git] / apps / ca.c
index efcd817311f21ec27678a8300b65877346bfc3e3..0ee8559c972f20c79bc69724516b1fa9a4771307 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -83,7 +83,7 @@
 #define PROG ca_main
 
 #define BASE_SECTION   "ca"
-#define CONFIG_FILE "lib/openssl.cnf"
+#define CONFIG_FILE "openssl.cnf"
 
 #define ENV_DEFAULT_CA         "default_ca"
 
@@ -390,6 +390,8 @@ bad:
        ERR_load_crypto_strings();
 
        /*****************************************************************/
+       if (configfile == NULL) configfile = getenv("OPENSSL_CONF");
+       if (configfile == NULL) configfile = getenv("SSLEAY_CONF");
        if (configfile == NULL)
                {
                /* We will just use 'buf[0]' as a temporary buffer.  */