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 18:21:21 +0000 (20:21 +0200)
commit3cf40601b7d164ab48addbb0456d7aa59fa38c88
tree7af4a2a1b97e4e20874b9c6f9d3b4fcbf9b5e4cb
parent82e586a90b18fa91fb2756af4c36cc70ff097f6d
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