From 0aa341b7c98887b1f03199f5c3b780bed126b614 Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Thu, 12 Nov 2015 17:28:04 -0500 Subject: [PATCH] test: add hasFipsCrypto to test/common.js Utility function for tests to check if OpenSSL is using a FIPS verified cryptographic provider. PR-URL: https://github.com/nodejs/node/pull/3756 Reviewed-By: Fedor Indutny Reviewed-By: Shigeki Ohtsu Reviewed-By: James M Snell --- test/common.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/common.js b/test/common.js index eb802cc..a017275 100644 --- a/test/common.js +++ b/test/common.js @@ -137,9 +137,17 @@ Object.defineProperty(exports, 'opensslCli', {get: function() { return opensslCli; }, enumerable: true }); -Object.defineProperty(exports, 'hasCrypto', {get: function() { - return process.versions.openssl ? true : false; -}}); +Object.defineProperty(exports, 'hasCrypto', { + get: function() { + return process.versions.openssl ? true : false; + } +}); + +Object.defineProperty(exports, 'hasFipsCrypto', { + get: function() { + return process.config.variables.openssl_fips ? true : false; + } +}); if (exports.isWindows) { exports.PIPE = '\\\\.\\pipe\\libuv-test'; -- 2.7.4