Skip to content

Commit a39cd45

Browse files
joyeecheungrvagg
authored andcommitted
src: remove process.binding('config').fipsForced
Instead use `require('internal/options').getOptionValue` to query to value of `--force-fips`. PR-URL: #26178 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 633c1ea commit a39cd45

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

lib/crypto.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,8 @@ const {
3737
const constants = internalBinding('constants').crypto;
3838
const { getOptionValue } = require('internal/options');
3939
const pendingDeprecation = getOptionValue('--pending-deprecation');
40-
const {
41-
fipsMode,
42-
fipsForced
43-
} = internalBinding('config');
40+
const { fipsMode } = internalBinding('config');
41+
const fipsForced = getOptionValue('--force-fips');
4442
const { getFipsCrypto, setFipsCrypto } = internalBinding('crypto');
4543
const {
4644
randomBytes,

src/node_config.cc

-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ static void Initialize(Local<Object> target,
4040

4141
#ifdef NODE_FIPS_MODE
4242
READONLY_TRUE_PROPERTY(target, "fipsMode");
43-
// TODO(addaleax): Use options parser variable instead.
44-
if (per_process::cli_options->force_fips_crypto)
45-
READONLY_TRUE_PROPERTY(target, "fipsForced");
4643
#endif
4744

4845
#ifdef NODE_HAVE_I18N_SUPPORT

0 commit comments

Comments
 (0)