diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2002-02-22 15:01:21 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2002-02-22 15:01:21 +0100 |
commit | 3647bee263ebfef8694f7df07498a17b03ad883d (patch) | |
tree | 8d424b9291b1bb64b2dfd5924797912593f7cad6 /crypto/conf | |
parent | We have AES support in openssl speed (diff) | |
download | openssl-3647bee263ebfef8694f7df07498a17b03ad883d.tar.xz openssl-3647bee263ebfef8694f7df07498a17b03ad883d.zip |
Config code updates.
CONF_modules_unload() now calls CONF_modules_finish()
automatically.
Default use of section openssl_conf moved to
CONF_modules_load()
Load config file in several openssl utilities.
Most utilities now load modules from the config file,
though in a few (such as version) this isn't done
because it couldn't be used for anything.
In the case of ca and req the config file used is
the same as the utility itself: that is the -config
command line option can be used to specify an
alternative file.
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf.h | 2 | ||||
-rw-r--r-- | crypto/conf/conf_mod.c | 7 |
2 files changed, 6 insertions, 3 deletions
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. diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index 7e88cfb625..459a2d7df1 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -130,9 +130,11 @@ int CONF_modules_load(const CONF *cnf, const char *appname, int ret, i; - if (!cnf || !appname) + if (!cnf) return 1; + if (appname == NULL) + appname = "openssl_conf"; vsection = NCONF_get_string(cnf, NULL, appname); @@ -178,8 +180,6 @@ int CONF_modules_load_file(const char *filename, const char *appname, } else file = (char *)filename; - if (appname == NULL) - appname = "openssl_conf"; if (NCONF_load(conf, file, NULL) <= 0) { @@ -422,6 +422,7 @@ void CONF_modules_unload(int all) { 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--) { |