Skip to content

Commit

Permalink
src: remove process.binding('config').fipsForced
Browse files Browse the repository at this point in the history
Instead use `require('internal/options').getOptionValue` to
query to value of `--force-fips`.

PR-URL: #26178
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
joyeecheung authored and rvagg committed Feb 28, 2019
1 parent 633c1ea commit a39cd45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions lib/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions src/node_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ static void Initialize(Local<Object> 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
Expand Down

0 comments on commit a39cd45

Please sign in to comment.