Skip to content

Commit

Permalink
test: add hasFipsCrypto to test/common.js
Browse files Browse the repository at this point in the history
Utility function for tests to check if OpenSSL is using
a FIPS verified cryptographic provider.

PR-URL: #3756
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
stefanmb authored and jasnell committed Nov 14, 2015
1 parent 20cd932 commit 8ac852f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 8ac852f

Please sign in to comment.