diff --git a/lib/crypto.js b/lib/crypto.js index 5b83a669c643d7..0c956ecd107b0a 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -37,10 +37,8 @@ const { const constants = internalBinding('constants').crypto; const { getOptionValue } = require('internal/options'); const pendingDeprecation = getOptionValue('--pending-deprecation'); -const { - fipsMode, - fipsForced -} = internalBinding('config'); +const { fipsMode } = internalBinding('config'); +const fipsForced = getOptionValue('--force-fips'); const { getFipsCrypto, setFipsCrypto } = internalBinding('crypto'); const { randomBytes, diff --git a/src/node_config.cc b/src/node_config.cc index 6e443230f74df3..7ecf70fdb6256a 100644 --- a/src/node_config.cc +++ b/src/node_config.cc @@ -40,9 +40,6 @@ static void Initialize(Local target, #ifdef NODE_FIPS_MODE READONLY_TRUE_PROPERTY(target, "fipsMode"); - // TODO(addaleax): Use options parser variable instead. - if (per_process::cli_options->force_fips_crypto) - READONLY_TRUE_PROPERTY(target, "fipsForced"); #endif #ifdef NODE_HAVE_I18N_SUPPORT