diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index c115555ce7a7ff..5c5370e09c19e0 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -19,7 +19,7 @@ const defaultSessionIdContext = getDefaultSessionIdContext(); function getDefaultSessionIdContext() { var defaultText = process.argv.join(' '); /* SSL_MAX_SID_CTX_LENGTH is 128 bits */ - if (process.config.variables.openssl_fips) { + if (process.binding('config').fipsMode) { return crypto.createHash('sha1') .update(defaultText) .digest('hex').slice(0, 32); diff --git a/src/node_config.cc b/src/node_config.cc index e50002bc64c202..6fe22a4f985dab 100644 --- a/src/node_config.cc +++ b/src/node_config.cc @@ -28,7 +28,10 @@ using v8::ReadOnly; void InitConfig(Local target, Local unused, Local context) { - // Environment* env = Environment::GetCurrent(context); +#ifdef NODE_FIPS_MODE + Environment* env = Environment::GetCurrent(context); + READONLY_BOOLEAN_PROPERTY("fipsMode"); +#endif } } // namespace node