crypto: disable crypto.createCipher in FIPS mode
authorStefan Budeanu <stefan@budeanu.com>
Mon, 9 Nov 2015 05:00:56 +0000 (00:00 -0500)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:14 +0000 (11:52 -0800)
commitb7c3fb7f758dd698f93127e0f6505b22e5ef8f86
tree667cd562f729322f9db59784ed22f83d01ed5735
parent8c5b847f5b293c730cf340d604d9231c40777c43
crypto: disable crypto.createCipher in FIPS mode

FIPS 140-2 disallows use of MD5, which is used to derive the
initialization vector and key for createCipher(). Modify
all tests to expect exceptions in FIPS mode when disallowed
API is used, or to avoid testing such API in FIPS Mode.

PR-URL: https://github.com/nodejs/node/pull/3754
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: James M Snell <jasnell@gmail.com>
src/node_crypto.cc
test/parallel/test-crypto-authenticated.js
test/parallel/test-crypto-binary-default.js
test/parallel/test-crypto-cipher-decipher.js
test/parallel/test-crypto-cipheriv-decipheriv.js [new file with mode: 0644]
test/parallel/test-crypto-dh.js
test/parallel/test-crypto.js