RT2943: Check sizes if -iv and -K arguments
authorRichard Levitte <levitte@openssl.org>
Mon, 4 May 2015 15:34:40 +0000 (17:34 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 4 May 2015 19:18:43 +0000 (21:18 +0200)
commit4b771121f2b657f50e8c7a27e9fab0bb043f91bc
tree62c01da3b207e26281a8128ef9972d59504f7449
parentee827adf0483e8e66e3c447c42308bf8bc96c43f
RT2943: Check sizes if -iv and -K arguments

RT2943 only complains about the incorrect check of -K argument size,
we might as well do the same thing with the -iv argument.

Before this, we only checked that the given argument wouldn't give a
bitstring larger than EVP_MAX_KEY_LENGTH.  we can be more precise and
check against the size of the actual cipher used.

(cherry picked from commit 8920a7cd04f43b1a090d0b0a8c9e16b94c6898d4)

Reviewed-by: Rich Salz <rsalz@openssl.org>
apps/enc.c