crypto: fix faulty logic in iv size check
@TheAlphaNerd can you point me to another PR like this, so I can structure it the right way (explain its a backport, etc).
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
Description of change
Fix a regression introduced in commit 2996b5c9 ("crypto: Allow GCM ciphers to have a longer IV length") from April 2016 where a misplaced parenthesis in a 'is ECB cipher?' check made it possible to use empty IVs with non-ECB ciphers.
Also fix some exit bugs in test/parallel/test-crypto-authenticated.js that were introduced in commit 4a408321 ("test: cleanup IIFE tests") where removing the IFFEs made the test exit prematurely instead of just skipping subtests.
PR-URL: https://github.com/nodejs/node/pull/9032 Refs: https://github.com/nodejs/node/pull/6376 Refs: https://github.com/nodejs/node/issues/9024 Reviewed-By: Anna Henningsen anna@addaleax.net Reviewed-By: Fedor Indutny fedor@indutny.com Reviewed-By: Shigeki Ohtsu ohtsu@ohtsu.org