Don't ask for -iv for ciphers that need no IV.
authorBen Laurie <ben@openssl.org>
Tue, 3 Mar 2009 15:14:33 +0000 (15:14 +0000)
committerBen Laurie <ben@openssl.org>
Tue, 3 Mar 2009 15:14:33 +0000 (15:14 +0000)
apps/enc.c

index a64c654..53de51a 100644 (file)
@@ -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,