Skip to content

Commit

Permalink
Fix ciphers test
Browse files Browse the repository at this point in the history
Fixes #2085
  • Loading branch information
szmarczak committed Jul 23, 2022
1 parent 461b3d4 commit 3207061
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/https.ts
Expand Up @@ -462,9 +462,9 @@ test.skip('client certificate PFX', withHttpsServer(), async (t, server, got) =>
t.is(response.peerCertificate.issuer.CN, 'authority');
});

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

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

0 comments on commit 3207061

Please sign in to comment.