From 3f7cf2912448b9c0f4475050091a72b2c570c321 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sat, 23 Feb 2002 01:47:59 +0000 Subject: [PATCH] Update from main branch. --- apps/apps.c | 22 ++++++++++------------ crypto/conf/conf.h | 2 ++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/apps.c b/apps/apps.c index cb04ede33e..8c9726ebd7 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -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; diff --git a/crypto/conf/conf.h b/crypto/conf/conf.h index 4e14cd000f..3c03fb19c0 100644 --- a/crypto/conf/conf.h +++ b/crypto/conf/conf.h @@ -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. -- 2.25.1