summaryrefslogtreecommitdiffstats
path: root/apps/enc.c
diff options
context:
space:
mode:
authorMathieu Tortuyaux <mathieu.tortuyaux@gmail.com>2023-09-18 16:02:21 +0200
committerPauli <pauli@openssl.org>2023-09-20 08:12:07 +1000
commit0e138b7b591f160a50aff22f662254d1b39c9cac (patch)
tree7dc182ff5da4b2ed346766c85cc16256e9293e4f /apps/enc.c
parente40d538ad72c8e496b1dfe7d93c6002ce48351f5 (diff)
enc: "bad decrypt" only in decryption
CLA: trivial Signed-off-by: Mathieu Tortuyaux <mathieu.tortuyaux@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22134)
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/enc.c b/apps/enc.c
index 26e009e437..d94f5236d7 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -701,7 +701,10 @@ int enc_main(int argc, char **argv)
break;
}
if (!BIO_flush(wbio)) {
- BIO_printf(bio_err, "bad decrypt\n");
+ if (enc)
+ BIO_printf(bio_err, "bad encrypt\n");
+ else
+ BIO_printf(bio_err, "bad decrypt\n");
goto end;
}