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 <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
stefanmb authored and Fishrock123 committed Nov 17, 2015
1 parent 828b786 commit de707f0
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 de707f0

Please sign in to comment.