summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2009-03-03 15:14:33 +0000
committerBen Laurie <ben@openssl.org>2009-03-03 15:14:33 +0000
commit73bfcf2226b3f20869b7d5ca06df0650d0a06723 (patch)
tree9e2bf33638bb0ebe1b04d723ceff7ac7b5190987
parent2121f15dafc99cb04a0f714b2c26bde51487ac2d (diff)
Don't ask for -iv for ciphers that need no IV.
-rw-r--r--apps/enc.c3
1 files changed, 2 insertions, 1 deletions
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,