test: leverage process.features.openssl_is_boringssl in test · nodejs/node@5fc4706 · GitHub
Skip to content

Commit 5fc4706

Browse files
codebyteretargos
authored andcommitted
test: leverage process.features.openssl_is_boringssl in test
PR-URL: #58421 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4629b18 commit 5fc4706

6 files changed

Lines changed: 50 additions & 23 deletions

test/parallel/test-crypto-x509.js

Lines changed: 21 additions & 12 deletions

test/parallel/test-https-agent-additional-options.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,31 @@ const options = {
1313
cert: fixtures.readKey('agent1-cert.pem'),
1414
ca: fixtures.readKey('ca1-cert.pem'),
1515
minVersion: 'TLSv1.1',
16-
ciphers: 'ALL@SECLEVEL=0'
1716
};
1817

18+
if (!process.features.openssl_is_boringssl) {
19+
options.ciphers = 'ALL@SECLEVEL=0';
20+
}
21+
1922
const server = https.Server(options, (req, res) => {
2023
res.writeHead(200);
2124
res.end('hello world\n');
2225
});
2326

2427
function getBaseOptions(port) {
25-
return {
28+
const baseOptions = {
2629
path: '/',
2730
port: port,
2831
ca: options.ca,
2932
rejectUnauthorized: true,
3033
servername: 'agent1',
31-
ciphers: 'ALL@SECLEVEL=0'
3234
};
35+
36+
if (!process.features.openssl_is_boringssl) {
37+
baseOptions.ciphers = 'ALL@SECLEVEL=0';
38+
}
39+
40+
return baseOptions;
3341
}
3442

3543
const updatedValues = new Map([

test/parallel/test-https-agent-session-eviction.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ const options = {
1717
key: readKey('agent1-key.pem'),
1818
cert: readKey('agent1-cert.pem'),
1919
secureOptions: SSL_OP_NO_TICKET,
20-
ciphers: 'RSA@SECLEVEL=0'
2120
};
2221

22+
if (!process.features.openssl_is_boringssl) {
23+
options.ciphers = 'RSA@SECLEVEL=0';
24+
}
25+
2326
// Create TLS1.2 server
2427
https.createServer(options, function(req, res) {
2528
res.writeHead(200, { 'Connection': 'close' });

test/parallel/test-webcrypto-derivebits.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ const { subtle } = globalThis.crypto;
123123
assert.deepStrictEqual(secret1, secret2);
124124
}
125125

126-
test('X25519').then(common.mustCall());
127-
test('X448').then(common.mustCall());
126+
if (!process.features.openssl_is_boringssl) {
127+
test('X25519').then(common.mustCall());
128+
test('X448').then(common.mustCall());
129+
}
128130
}

test/parallel/test-webcrypto-derivekey.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ const { KeyObject } = require('crypto');
206206
assert.deepStrictEqual(raw1, raw2);
207207
}
208208

209-
test('X25519').then(common.mustCall());
210-
test('X448').then(common.mustCall());
209+
if (!process.features.openssl_is_boringssl) {
210+
test('X25519').then(common.mustCall());
211+
test('X448').then(common.mustCall());
212+
}
211213
}

test/parallel/test-webcrypto-sign-verify.js

Lines changed: 6 additions & 3 deletions

0 commit comments

Comments
 (0)