浏览代码

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)
Mathieu Tortuyaux 8 月之前
父节点
当前提交
0e138b7b59
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      apps/enc.c

+ 4 - 1
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;
     }