]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/storeutl: Add error output in case of parse/decryption/mac errors in input files
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Mon, 11 May 2020 13:50:36 +0000 (15:50 +0200)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 19 Nov 2020 10:36:02 +0000 (11:36 +0100)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/4930)

apps/storeutl.c

index fcd874ea5d5c7af19d4963093673cdd46fc6d14f..facbf633335902ad1d464ff016594fc83d9baa69 100644 (file)
@@ -395,18 +395,20 @@ static int process(const char *uri, const UI_METHOD *uimeth, PW_CB_DATA *uidata,
             info == NULL ? NULL : OSSL_STORE_INFO_type_string(type);
 
         if (info == NULL) {
-            if (OSSL_STORE_eof(store_ctx))
-                break;
-
             if (OSSL_STORE_error(store_ctx)) {
                 if (recursive)
                     ERR_clear_error();
                 else
                     ERR_print_errors(bio_err);
+                if (OSSL_STORE_eof(store_ctx))
+                    break;
                 ret++;
                 continue;
             }
 
+            if (OSSL_STORE_eof(store_ctx))
+                break;
+
             BIO_printf(bio_err,
                        "ERROR: OSSL_STORE_load() returned NULL without "
                        "eof or error indications\n");