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 <fedor.indutny@gmail.com> Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
20cd932ce0
commit
8ac852fec0
@ -137,9 +137,17 @@ Object.defineProperty(exports, 'opensslCli', {get: function() {
|
|||||||
return opensslCli;
|
return opensslCli;
|
||||||
}, enumerable: true });
|
}, enumerable: true });
|
||||||
|
|
||||||
Object.defineProperty(exports, 'hasCrypto', {get: function() {
|
Object.defineProperty(exports, 'hasCrypto', {
|
||||||
return process.versions.openssl ? true : false;
|
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) {
|
if (exports.isWindows) {
|
||||||
exports.PIPE = '\\\\.\\pipe\\libuv-test';
|
exports.PIPE = '\\\\.\\pipe\\libuv-test';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user