Don't ask for -iv for ciphers that need no IV.

This commit is contained in:
Ben Laurie 2009-03-03 15:14:33 +00:00
parent 2121f15daf
commit 73bfcf2226

View 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,