From: Mathieu Tortuyaux Date: Mon, 18 Sep 2023 14:02:21 +0000 (+0200) Subject: enc: "bad decrypt" only in decryption X-Git-Tag: openssl-3.1.4~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff826e1a3d9a72cfdd16b46332b2a33d90da346e;p=thirdparty%2Fopenssl.git enc: "bad decrypt" only in decryption CLA: trivial Signed-off-by: Mathieu Tortuyaux Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/22134) (cherry picked from commit 0e138b7b591f160a50aff22f662254d1b39c9cac) --- diff --git a/apps/enc.c b/apps/enc.c index b3bf4cc2592..c275046cf57 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; }