Don't ignore config_name parameter passed to OPENSSL_config(). Use
[openssl.git] / crypto / conf / conf_sap.c
index 97fb17430382e9b7a8f08d6c333ded30a3858209..9c53bac1a8c12e6b9d45c45e7fcc4df6a458819e 100644 (file)
@@ -63,7 +63,9 @@
 #include <openssl/dso.h>
 #include <openssl/x509.h>
 #include <openssl/asn1.h>
+#ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
+#endif
 
 /* This is the automatic configuration loader: it is called automatically by
  * OpenSSL when any of a number of standard initialisation functions are called,
@@ -78,14 +80,16 @@ void OPENSSL_config(const char *config_name)
                return;
 
        OPENSSL_load_builtin_modules();
+#ifndef OPENSSL_NO_ENGINE
        /* Need to load ENGINEs */
        ENGINE_load_builtin_engines();
+#endif
        /* Add others here? */
 
 
        ERR_clear_error();
-       if (CONF_modules_load_file(NULL, NULL,
-                                       CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0)
+       if (CONF_modules_load_file(NULL, config_name,
+       CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0)
                {
                BIO *bio_err;
                ERR_load_crypto_strings();