summaryrefslogtreecommitdiff
path: root/src/node_config.cc
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-10-23 22:44:52 -0700
committerJames M Snell <jasnell@gmail.com>2017-10-27 08:13:01 -0700
commitee76f3153b51c60c74e7e4b0882a99f3a3745294 (patch)
tree50dd105ac937cdbb4dbfd64676a304e3093fa147 /src/node_config.cc
parenta0f7ae6c4110cca75793964dc9dbbf457071dad8 (diff)
downloadnode-new-ee76f3153b51c60c74e7e4b0882a99f3a3745294.tar.gz
crypto: migrate setFipsCrypto to internal/errors
With the exception of ThrowCryptoError, use internal/errors to report fips unavailable or forced PR-URL: https://github.com/nodejs/node/pull/16428 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src/node_config.cc')
-rw-r--r--src/node_config.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_config.cc b/src/node_config.cc
index 38ce2a47bb..8af3472b0f 100644
--- a/src/node_config.cc
+++ b/src/node_config.cc
@@ -44,6 +44,12 @@ static void InitConfig(Local<Object> target,
Environment* env = Environment::GetCurrent(context);
Isolate* isolate = env->isolate();
+#ifdef NODE_FIPS_MODE
+ READONLY_BOOLEAN_PROPERTY("fipsMode");
+ if (force_fips_crypto)
+ READONLY_BOOLEAN_PROPERTY("fipsForced");
+#endif
+
#ifdef NODE_HAVE_I18N_SUPPORT
READONLY_BOOLEAN_PROPERTY("hasIntl");