summaryrefslogtreecommitdiffstats
path: root/apps
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:29 +1000
commitff826e1a3d9a72cfdd16b46332b2a33d90da346e (patch)
treef05cc31af23ff8eea273029bc09597b43e35fb2f /apps
parentc9e75c1daf0772ac29b9f679b54d6ba1c3972605 (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) (cherry picked from commit 0e138b7b591f160a50aff22f662254d1b39c9cac)
Diffstat (limited to 'apps')
-rw-r--r--apps/enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/enc.c b/apps/enc.c
index b3bf4cc259..c275046cf5 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -624,7 +624,10 @@ int enc_main(int argc, char **argv)
}
}
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;
}