mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
test,benchmark: use OpenSSL feature helpers
Add isBoringSSL to the test crypto helpers and use it in tests and benchmarks. Replace hasOpenSSL3 call sites with hasOpenSSL(3). Assisted-by: Codex Signed-off-by: Filip Skokan <panva.ip@gmail.com> PR-URL: https://github.com/nodejs/node/pull/65762 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
This commit is contained in:
1 parent
c58a4e0ba7
commit
f8cdf05586
159 files changed
+561
-437
No files matched your search
@@ -6,7 +6,7 @@ if (!common.hasCrypto)
|
||||
const assert = require('assert');
|
||||
const crypto = require('crypto');
|
||||
const https = require('https');
|
||||
const { hasFIPS } = require('../common/crypto');
|
||||
const { hasFIPS, isBoringSSL } = require('../common/crypto');
|
||||
const fixtures = require('../common/fixtures');
|
||||
const fips3 = hasFIPS(3);
|
||||
|
||||
@@ -17,7 +17,7 @@ const options = {
|
||||
minVersion: fips3 ? 'TLSv1.2' : 'TLSv1.1',
|
||||
};
|
||||
|
||||
if (!process.features.openssl_is_boringssl) {
|
||||
if (!isBoringSSL) {
|
||||
options.ciphers = fips3 ?
|
||||
'ECDHE-RSA-AES256-GCM-SHA384' : 'ALL@SECLEVEL=0';
|
||||
}
|
||||
@@ -36,7 +36,7 @@ function getBaseOptions(port) {
|
||||
servername: 'agent1',
|
||||
};
|
||||
|
||||
if (!process.features.openssl_is_boringssl) {
|
||||
if (!isBoringSSL) {
|
||||
baseOptions.ciphers = fips3 ?
|
||||
'ECDHE-RSA-AES256-GCM-SHA384' : 'ALL@SECLEVEL=0';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user