diff options
author | djm <> | 2008-09-06 12:17:54 +0000 |
---|---|---|
committer | djm <> | 2008-09-06 12:17:54 +0000 |
commit | 38ce604e3cc97706b876b0525ddff0121115456d (patch) | |
tree | 7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/conf/conf_mod.c | |
parent | 12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff) | |
download | openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2 openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/conf/conf_mod.c')
-rw-r--r-- | src/lib/libcrypto/conf/conf_mod.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c index 812e60dc70..58b23ba992 100644 --- a/src/lib/libcrypto/conf/conf_mod.c +++ b/src/lib/libcrypto/conf/conf_mod.c | |||
@@ -126,17 +126,18 @@ int CONF_modules_load(const CONF *cnf, const char *appname, | |||
126 | { | 126 | { |
127 | STACK_OF(CONF_VALUE) *values; | 127 | STACK_OF(CONF_VALUE) *values; |
128 | CONF_VALUE *vl; | 128 | CONF_VALUE *vl; |
129 | char *vsection; | 129 | char *vsection = NULL; |
130 | 130 | ||
131 | int ret, i; | 131 | int ret, i; |
132 | 132 | ||
133 | if (!cnf) | 133 | if (!cnf) |
134 | return 1; | 134 | return 1; |
135 | 135 | ||
136 | if (appname == NULL) | 136 | if (appname) |
137 | appname = "openssl_conf"; | 137 | vsection = NCONF_get_string(cnf, NULL, appname); |
138 | 138 | ||
139 | vsection = NCONF_get_string(cnf, NULL, appname); | 139 | if (!appname || (!vsection && (flags & CONF_MFLAGS_DEFAULT_SECTION))) |
140 | vsection = NCONF_get_string(cnf, NULL, "openssl_conf"); | ||
140 | 141 | ||
141 | if (!vsection) | 142 | if (!vsection) |
142 | { | 143 | { |
@@ -231,7 +232,7 @@ static int module_run(const CONF *cnf, char *name, char *value, | |||
231 | if (!(flags & CONF_MFLAGS_SILENT)) | 232 | if (!(flags & CONF_MFLAGS_SILENT)) |
232 | { | 233 | { |
233 | char rcode[DECIMAL_SIZE(ret)+1]; | 234 | char rcode[DECIMAL_SIZE(ret)+1]; |
234 | CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR); | 235 | CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR); |
235 | BIO_snprintf(rcode, sizeof rcode, "%-8d", ret); | 236 | BIO_snprintf(rcode, sizeof rcode, "%-8d", ret); |
236 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); | 237 | ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); |
237 | } | 238 | } |
@@ -254,7 +255,7 @@ static CONF_MODULE *module_load_dso(const CONF *cnf, char *name, char *value, | |||
254 | path = NCONF_get_string(cnf, value, "path"); | 255 | path = NCONF_get_string(cnf, value, "path"); |
255 | if (!path) | 256 | if (!path) |
256 | { | 257 | { |
257 | ERR_get_error(); | 258 | ERR_clear_error(); |
258 | path = name; | 259 | path = name; |
259 | } | 260 | } |
260 | dso = DSO_load(NULL, path, NULL, 0); | 261 | dso = DSO_load(NULL, path, NULL, 0); |
@@ -431,7 +432,7 @@ void CONF_modules_unload(int all) | |||
431 | if (((md->links > 0) || !md->dso) && !all) | 432 | if (((md->links > 0) || !md->dso) && !all) |
432 | continue; | 433 | continue; |
433 | /* Since we're working in reverse this is OK */ | 434 | /* Since we're working in reverse this is OK */ |
434 | sk_CONF_MODULE_delete(supported_modules, i); | 435 | (void)sk_CONF_MODULE_delete(supported_modules, i); |
435 | module_free(md); | 436 | module_free(md); |
436 | } | 437 | } |
437 | if (sk_CONF_MODULE_num(supported_modules) == 0) | 438 | if (sk_CONF_MODULE_num(supported_modules) == 0) |