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)
This commit is contained in:
Vladimir Kotal 2024-03-07 17:00:07 +01:00 committed by Tomas Mraz
parent a4cbffcd89
commit 6af739b79b
5 changed files with 17 additions and 6 deletions

View file

@ -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");
}