aboutsummaryrefslogtreecommitdiffstats
path: root/apps/ts.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2023-05-16 10:17:03 +0200
committerDr. David von Oheimb <dev@ddvo.net>2023-05-25 09:04:35 +0200
commitda7f81d39308f9ecab6fde1f9116ff673ef3f3b3 (patch)
tree3f1b8310b685dc306c3ff266e552d96829ea1db0 /apps/ts.c
parentc8aec16383c7a9aec76b28e6eb95d36bef6f7e56 (diff)
downloadopenssl-da7f81d39308f9ecab6fde1f9116ff673ef3f3b3.tar.gz
APPS: replace awkward and error-prone pattern by calls to new app_conf_try_string()
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/20971)
Diffstat (limited to 'apps/ts.c')
-rw-r--r--apps/ts.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/ts.c b/apps/ts.c
index 78c3aacced..a4218c9bf2 100644
--- a/apps/ts.c
+++ b/apps/ts.c
@@ -375,7 +375,7 @@ static CONF *load_config_file(const char *configfile)
const char *p;
BIO_printf(bio_err, "Using configuration from %s\n", configfile);
- p = NCONF_get_string(conf, NULL, ENV_OID_FILE);
+ p = app_conf_try_string(conf, NULL, ENV_OID_FILE);
if (p != NULL) {
BIO *oid_bio = BIO_new_file(p, "r");
if (!oid_bio)
@@ -384,8 +384,7 @@ static CONF *load_config_file(const char *configfile)
OBJ_create_objects(oid_bio);
BIO_free_all(oid_bio);
}
- } else
- ERR_clear_error();
+ }
if (!add_oid_section(conf))
ERR_print_errors(bio_err);
}