aboutsummaryrefslogtreecommitdiff
path: root/crypto/conf/conf_mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/conf/conf_mod.c')
-rw-r--r--crypto/conf/conf_mod.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c
index 587211a59c19..628e8333a6d6 100644
--- a/crypto/conf/conf_mod.c
+++ b/crypto/conf/conf_mod.c
@@ -126,17 +126,18 @@ int CONF_modules_load(const CONF *cnf, const char *appname,
{
STACK_OF(CONF_VALUE) *values;
CONF_VALUE *vl;
- char *vsection;
+ char *vsection = NULL;
int ret, i;
if (!cnf)
return 1;
- if (appname == NULL)
- appname = "openssl_conf";
+ if (appname)
+ vsection = NCONF_get_string(cnf, NULL, appname);
- vsection = NCONF_get_string(cnf, NULL, appname);
+ if (!appname || (!vsection && (flags & CONF_MFLAGS_DEFAULT_SECTION)))
+ vsection = NCONF_get_string(cnf, NULL, "openssl_conf");
if (!vsection)
{
@@ -431,7 +432,7 @@ void CONF_modules_unload(int all)
if (((md->links > 0) || !md->dso) && !all)
continue;
/* Since we're working in reverse this is OK */
- sk_CONF_MODULE_delete(supported_modules, i);
+ (void)sk_CONF_MODULE_delete(supported_modules, i);
module_free(md);
}
if (sk_CONF_MODULE_num(supported_modules) == 0)