Update from main branch.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 23 Feb 2002 01:47:59 +0000 (01:47 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 23 Feb 2002 01:47:59 +0000 (01:47 +0000)
apps/apps.c
crypto/conf/conf.h

index cb04ede33ee51d0f74bf3aabefbea8abd645e359..8c9726ebd7b060fc6e28a4feed712a8e03e6cf94 100644 (file)
@@ -1315,21 +1315,19 @@ ENGINE *setup_engine(BIO *err, const char *engine, int debug)
         return e;
         }
 
-int load_config(char *filename, BIO *err)
+int load_config(BIO *err, CONF *cnf)
        {
-       unsigned long flags;
-       if (filename)
-               flags = 0;
-       else
-               flags = CONF_MFLAGS_IGNORE_MISSING_FILE;
+       if (!cnf)
+               cnf = config;
+       if (!cnf)
+               return 1;
 
-       if (CONF_modules_load_file(filename, NULL, flags) <= 0)
+       OPENSSL_load_builtin_modules();
+
+       if (CONF_modules_load(cnf, NULL, 0) <= 0)
                {
-               if (err)
-                       {
-                       BIO_printf(err, "Error loading config file\n");
-                       ERR_print_errors(err);
-                       }
+               BIO_printf(err, "Error configuring OpenSSL\n");
+               ERR_print_errors(err);
                return 0;
                }
        return 1;
index 4e14cd000f1683f076b8f4bd55d1f07ec19345ad..3c03fb19c0250993040fad7ab18c2a64530f2a6a 100644 (file)
@@ -194,6 +194,8 @@ char *CONF_get1_default_config_file(void);
 int CONF_parse_list(const char *list, int sep, int nospc,
        int (*list_cb)(const char *elem, int len, void *usr), void *arg);
 
+void OPENSSL_load_builtin_modules(void);
+
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
  * made after this point may be overwritten when the script is next run.