diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index e340e4a041b6ee..28e4171c30ede4 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -19,7 +19,13 @@ 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.config && + 'variables' in process.config && + process.config.variables && + 'openssl_fips' in process.config.variables && + process.config.variables.openssl_fips + ) { return crypto.createHash('sha1') .update(defaultText) .digest('hex').slice(0, 32);