summaryrefslogtreecommitdiff
path: root/test/parallel
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2019-01-18 13:05:43 +0100
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-01-30 12:37:38 +0100
commitfeebdc5bc5a44779069a2269f4d3f15d4e36a277 (patch)
tree5f5fafceab0cf52ace60681cb96db56c9b76b851 /test/parallel
parentdd682cef29b5c44b0d1ef20df97d36a0e4615ce9 (diff)
downloadandroid-node-v8-feebdc5bc5a44779069a2269f4d3f15d4e36a277.tar.gz
android-node-v8-feebdc5bc5a44779069a2269f4d3f15d4e36a277.tar.bz2
android-node-v8-feebdc5bc5a44779069a2269f4d3f15d4e36a277.zip
test: use fipsMode in test-crypto-fips
This commit updates test/parallel/test-crypto-fips.js to use fipsMode instead of process.config.variables.openssl_fips. The motivation for this is that since the addition of the --openssl-is-fips configuration flag, it is possible to dynamically link with a FIPS compliant OpenSSL library. Using fipsMode allows for determining if there is FIPS support when statically or dynamically linking against a FIPS compatible OpenSSL library. PR-URL: https://github.com/nodejs/node/pull/25563 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test/parallel')
-rw-r--r--test/parallel/test-crypto-fips.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/parallel/test-crypto-fips.js b/test/parallel/test-crypto-fips.js
index a231db2c1a..fa4b809689 100644
--- a/test/parallel/test-crypto-fips.js
+++ b/test/parallel/test-crypto-fips.js
@@ -1,3 +1,4 @@
+// Flags: --expose-internals
'use strict';
const common = require('../common');
if (!common.hasCrypto)
@@ -7,6 +8,8 @@ const assert = require('assert');
const spawnSync = require('child_process').spawnSync;
const path = require('path');
const fixtures = require('../common/fixtures');
+const { internalBinding } = require('internal/test/binding');
+const { fipsMode } = internalBinding('config');
const FIPS_ENABLED = 1;
const FIPS_DISABLED = 0;
@@ -24,7 +27,7 @@ const CNF_FIPS_OFF = fixtures.path('openssl_fips_disabled.cnf');
let num_children_ok = 0;
function compiledWithFips() {
- return process.config.variables.openssl_fips ? true : false;
+ return fipsMode ? true : false;
}
function sharedOpenSSL() {