summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVladimir Kotal <vlada@kotalovi.cz>2024-03-07 17:00:07 +0100
committerTomas Mraz <tomas@openssl.org>2024-03-26 15:08:36 +0100
commit6af739b79ba50bd42ac8934747ab5c8b996f16b6 (patch)
treeef17337e58b25fee60951a46469234ff7f9b7c42 /apps
parenta4cbffcd8998180b98bb9f7ce6065ed37d079d8b (diff)
apps/req,crl: exit with 1 on verification failure
Fixes #23771 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/23773)
Diffstat (limited to 'apps')
-rw-r--r--apps/crl.c5
-rw-r--r--apps/req.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/crl.c b/apps/crl.c
index 09aec81cf7..53ece01594 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -248,9 +248,10 @@ int crl_main(int argc, char **argv)
EVP_PKEY_free(pkey);
if (i < 0)
goto end;
- if (i == 0)
+ if (i == 0) {
BIO_printf(bio_err, "verify failure\n");
- else
+ goto end;
+ } else
BIO_printf(bio_err, "verify OK\n");
}
diff --git a/apps/req.c b/apps/req.c
index 00ef231e11..9b85600e10 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -918,9 +918,10 @@ int req_main(int argc, char **argv)
if (i < 0)
goto end;
- if (i == 0)
+ if (i == 0) {
BIO_printf(bio_err, "Certificate request self-signature verify failure\n");
- else /* i > 0 */
+ goto end;
+ } else /* i > 0 */
BIO_printf(bio_out, "Certificate request self-signature verify OK\n");
}