aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2007-04-09 11:47:17 +0000
committerDr. Stephen Henson <steve@openssl.org>2007-04-09 11:47:17 +0000
commitd8ebb4260fa83faa71b11dd4fe75c203d786f86d (patch)
tree8f723477f4a93f79599d9e55b754399756510b46
parent5ebdd02d40daa0dfbe72931f0b9ddc7268d73b89 (diff)
downloadopenssl-d8ebb4260fa83faa71b11dd4fe75c203d786f86d.tar.gz
Update from HEAD.
-rw-r--r--crypto/conf/conf.h1
-rw-r--r--crypto/conf/conf_mod.c9
-rw-r--r--crypto/conf/conf_sap.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/crypto/conf/conf.h b/crypto/conf/conf.h
index f4671442ab..907f1974c7 100644
--- a/crypto/conf/conf.h
+++ b/crypto/conf/conf.h
@@ -113,6 +113,7 @@ typedef void conf_finish_func(CONF_IMODULE *md);
#define CONF_MFLAGS_SILENT 0x4
#define CONF_MFLAGS_NO_DSO 0x8
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
+#define CONF_MFLAGS_DEFAULT_SECTION 0x20
int CONF_set_default_method(CONF_METHOD *meth);
void CONF_set_nconf(CONF *conf,LHASH *hash);
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c
index d45adea851..f4a8daad65 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)
{
diff --git a/crypto/conf/conf_sap.c b/crypto/conf/conf_sap.c
index e15c2e5546..a91895c6a5 100644
--- a/crypto/conf/conf_sap.c
+++ b/crypto/conf/conf_sap.c
@@ -89,7 +89,7 @@ void OPENSSL_config(const char *config_name)
ERR_clear_error();
if (CONF_modules_load_file(NULL, NULL,
- CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0)
+ CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0)
{
BIO *bio_err;
ERR_load_crypto_strings();