From: Ben Laurie Date: Tue, 3 Mar 2009 15:14:33 +0000 (+0000) Subject: Don't ask for -iv for ciphers that need no IV. X-Git-Tag: OpenSSL_0_9_8k^2~21 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=73bfcf2226b3f20869b7d5ca06df0650d0a06723 Don't ask for -iv for ciphers that need no IV. --- diff --git a/apps/enc.c b/apps/enc.c index a64c654d4d..53de51ad72 100644 --- a/apps/enc.c +++ b/apps/enc.c @@ -560,7 +560,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,