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.2.0-alpha2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e138b7b591f160a50aff22f662254d1b39c9cac;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) --- diff --git a/apps/enc.c b/apps/enc.c index 26e009e4379..d94f5236d7b 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; }