Update from main branch.

This commit is contained in:
Dr. Stephen Henson 2002-02-23 01:47:59 +00:00
parent 63dc69fef6
commit 3f7cf29124
2 changed files with 12 additions and 12 deletions

View 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;

View 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.