mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test: move crypto related common utilities in common/crypto
Since `common/crypto` already exists, it makes sense to keep crypto-related utilities there. The only exception being common.hasCrypto which is needed up front to determine if tests should be skipped. Eliminate the redundant check in hasFipsCrypto and just use crypto.getFips() directly where needed. PR-URL: https://github.com/nodejs/node/pull/56714 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
c7a132229f
commit
6edf04ee5e
89 files changed
+506
-289
No files matched your search
@@ -21,11 +21,15 @@
|
||||
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
if (!common.hasCrypto)
|
||||
if (!common.hasCrypto) {
|
||||
common.skip('missing crypto');
|
||||
}
|
||||
|
||||
if (!common.opensslCli)
|
||||
const { opensslCli } = require('../common/crypto');
|
||||
|
||||
if (!opensslCli) {
|
||||
common.skip('node compiled without OpenSSL CLI.');
|
||||
}
|
||||
|
||||
const assert = require('assert');
|
||||
const fixtures = require('../common/fixtures');
|
||||
@@ -67,7 +71,7 @@ server.listen(0, function() {
|
||||
'-cert', fixtures.path('keys/rsa_cert_foafssl_b.crt'),
|
||||
'-key', fixtures.path('keys/rsa_private_b.pem')];
|
||||
|
||||
const client = spawn(common.opensslCli, args);
|
||||
const client = spawn(opensslCli, args);
|
||||
|
||||
client.stdout.on('data', function(data) {
|
||||
console.log('response received');
|
||||
|
||||
Reference in new issue
Block a user