From 69120ad199e20816b7e5180e2455017c9426f9f6 Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Tue, 3 Mar 2009 15:07:35 +0000 Subject: [PATCH] Only require -iv for ciphers that use an IV! --- apps/enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/enc.c b/apps/enc.c index 47c6eb604d..f4f9a4c4a4 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -533,7 +533,8 @@ bad: BIO_printf(bio_err,"invalid hex iv value\n"); goto end; } - if ((hiv == NULL) && (str == NULL)) + if ((hiv == NULL) && (str == NULL) + && EVP_CIPHER_iv_length(cipher) != 0) { /* No IV was explicitly set and no IV was generated * during EVP_BytesToKey. Hence the IV is undefined, -- 2.40.0