Skip to content

Commit 3207061

Browse files
committed
Fix ciphers test
Fixes #2085
1 parent 461b3d4 commit 3207061

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/https.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ test.skip('client certificate PFX', withHttpsServer(), async (t, server, got) =>
462462
t.is(response.peerCertificate.issuer.CN, 'authority');
463463
});
464464

465-
const ciphers = tls.getCiphers().map(cipher => cipher.toUpperCase());
465+
const ciphers = tls.getCiphers().map(cipher => cipher.toUpperCase()).filter(cipher => cipher.startsWith('TLS_')).slice(0, 3);
466466

467-
test('https request with `ciphers` option', withHttpsServer({ciphers: `${ciphers[0]!}:${ciphers[1]!}:${ciphers[2]!}`}), async (t, server, got) => {
467+
test('https request with `ciphers` option', withHttpsServer({ciphers: ciphers.join(':')}), async (t, server, got) => {
468468
server.get('/', (request, response) => {
469469
response.json({
470470
cipher: (request.socket as any).getCipher().name,

0 commit comments

Comments
 (0)