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:48 +1000
commit27eb4faa95d5a2ea1ae1fca211039d33d398e66b (patch)
tree5599fc38b518a4e06350f451b76e7cd053d0b93e /apps
parent40f8e57e1690a86665610c8236230b87e7eeda01 (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;
}