diff options
author | Vladimir Kotal <vlada@kotalovi.cz> | 2024-03-07 17:00:07 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-03-26 15:09:49 +0100 |
commit | 8aa52c1185e5ec540c7f2f0cb3d5b1f9a0070871 (patch) | |
tree | dc548e39822a1dc7e30c4b6b655a294503eede2c /apps | |
parent | 89ffd5593124c90e36d8624ec269efa73add8d9e (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)
(cherry picked from commit 6af739b79ba50bd42ac8934747ab5c8b996f16b6)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/crl.c | 5 | ||||
-rw-r--r-- | apps/req.c | 5 |
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 8995453dca..4e1e5c71de 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"); } |