diff options
author | Ben Laurie <ben@openssl.org> | 2009-03-03 15:14:33 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2009-03-03 15:14:33 +0000 |
commit | 73bfcf2226b3f20869b7d5ca06df0650d0a06723 (patch) | |
tree | 9e2bf33638bb0ebe1b04d723ceff7ac7b5190987 /apps/enc.c | |
parent | 2121f15dafc99cb04a0f714b2c26bde51487ac2d (diff) |
Don't ask for -iv for ciphers that need no IV.
Diffstat (limited to 'apps/enc.c')
-rw-r--r-- | apps/enc.c | 3 |
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, |