From da7f81d39308f9ecab6fde1f9116ff673ef3f3b3 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Tue, 16 May 2023 10:17:03 +0200 Subject: APPS: replace awkward and error-prone pattern by calls to new app_conf_try_string() Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: David von Oheimb (Merged from https://github.com/openssl/openssl/pull/20971) --- apps/ts.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'apps/ts.c') 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); } -- cgit v1.2.3