int ret, i;
- if (!cnf || !appname)
+ if (!cnf)
return 1;
+ if (appname == NULL)
+ appname = "openssl_conf";
vsection = NCONF_get_string(cnf, NULL, appname);
int CONF_modules_load_file(const char *filename, const char *appname,
unsigned long flags)
{
- char *file;
+ char *file = NULL;
CONF *conf = NULL;
int ret = 0;
conf = NCONF_new(NULL);
}
else
file = (char *)filename;
- if (appname == NULL)
- appname = "openssl_conf";
if (NCONF_load(conf, file, NULL) <= 0)
{
{
if (!(flags & CONF_MFLAGS_SILENT))
{
- char rcode[10];
+ char rcode[DECIMAL_SIZE(ret)+1];
CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR);
sprintf(rcode, "%-8d", ret);
ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
{
int i;
CONF_MODULE *md;
+ CONF_modules_finish();
/* unload modules in reverse order */
for (i = sk_CONF_MODULE_num(supported_modules) - 1; i >= 0; i--)
{