From: Dr. David von Oheimb Date: Thu, 3 Aug 2023 14:52:49 +0000 (+0200) Subject: apps.c: fix error messages (newline and needless text) in load_key_certs_crls() X-Git-Tag: openssl-3.1.3~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87099df97a6689c5bb2cd42132d06576119ea679;p=thirdparty%2Fopenssl.git apps.c: fix error messages (newline and needless text) in load_key_certs_crls() Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/21659) (cherry picked from commit 81d037b8adb0232c8a4d4654f79c883dafb102bc) --- diff --git a/apps/lib/apps.c b/apps/lib/apps.c index bbaecb8c724..9d65333ec4b 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -940,7 +940,7 @@ int load_key_certs_crls(const char *uri, int format, int maybe_stdin, BIO *bio; if (!maybe_stdin) { - BIO_printf(bio_err, "No filename or uri specified for loading"); + BIO_printf(bio_err, "No filename or uri specified for loading\n"); goto end; } uri = ""; @@ -956,10 +956,8 @@ int load_key_certs_crls(const char *uri, int format, int maybe_stdin, ctx = OSSL_STORE_open_ex(uri, libctx, propq, get_ui_method(), &uidata, params, NULL, NULL); } - if (ctx == NULL) { - BIO_printf(bio_err, "Could not open file or uri for loading"); + if (ctx == NULL) goto end; - } if (expect > 0 && !OSSL_STORE_expect(ctx, expect)) goto end;