summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2009-03-03 15:07:35 +0000
committerBen Laurie <ben@openssl.org>2009-03-03 15:07:35 +0000
commit69120ad199e20816b7e5180e2455017c9426f9f6 (patch)
tree467fa57a69dee54f0133939aa4f1662c429e49a7 /apps
parent1eee8a42264cac21063ee7e9e546186afe996efc (diff)
Only require -iv for ciphers that use an IV!
Diffstat (limited to 'apps')
-rw-r--r--apps/enc.c3
1 files changed, 2 insertions, 1 deletions
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,