]> granicus.if.org Git - php/commit
Abort on missing IV if the enc_mode requires it
authorNikita Popov <nikic@php.net>
Sat, 1 Mar 2014 14:42:07 +0000 (15:42 +0100)
committerNikita Popov <nikic@php.net>
Wed, 5 Mar 2014 14:32:31 +0000 (15:32 +0100)
commit25d801f97ec3f4bcac8977efd50f843eba9b19e1
tree2d6fad9a23051add3dec3fd6088578ae0a23d039
parentc4b7cdb41e6c4f2f4afe6fb35d585e1f5fe15b70
Abort on missing IV if the enc_mode requires it

Previously the code fell back on using a NUL IV if no IV was
passed and the encryption mode required it. This is dangerous and
makes no sense from a practical point of view (as you could just
as well use ECB then).
ext/mcrypt/mcrypt.c
ext/mcrypt/tests/mcrypt_cbc.phpt
ext/mcrypt/tests/mcrypt_cfb.phpt
ext/mcrypt/tests/mcrypt_decrypt.phpt