From 6725b14171aca5a218df720d13bc009f6fd3bf1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Mon, 30 Nov 2020 13:08:01 +0100 Subject: [PATCH] Adjust tests for always-available FIPS options - The fipsMode constant (defined at compile time) was replaced by the new `TestFipsCrypto()`/`testFipsCrypto()` functions, which rely on the OpenSSL function `FIPS_selftest()`. This results in the FIPS mode being always checked on runtime and being informed purely by the OpenSSL implementation in use. --- doc/api/cli.md | 8 +-- lib/crypto.js | 22 ++---- test/parallel/test-crypto-fips.js | 71 +++++++++---------- ...rocess-env-allowed-flags-are-documented.js | 9 --- 4 files changed, 40 insertions(+), 70 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 22bea84fb72b46..b445493eca39c2 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -186,8 +186,8 @@ code from strings throw an exception instead. This does not affect the Node.js added: v6.0.0 --> -Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with -`./configure --openssl-fips`.) +Enable FIPS-compliant crypto at startup. (Requires Node.js to be built +against FIPS-compatible OpenSSL.) ### `--enable-source-maps` Load an OpenSSL configuration file on startup. Among other uses, this can be -used to enable FIPS-compliant crypto if Node.js is built with -`./configure --openssl-fips`. +used to enable FIPS-compliant crypto if Node.js is built +with against FIPS-enabled OpenSSL. ### `--pending-deprecation`