mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 16:34:41 +00:00

This commit updates option ciphers from 'RC4' to 'no-such-cipher' in test/parallel/test-tls-handshake-error.js. The motivation for this change is that this test is verifying that a 'no ciphers match' error be thrown, but 'RC4' might be among the ciphers supported by the OpenSSL version when dynamically linking. I ran into this specific issue when dynamically linking against OpenSSL 1.1.1 on RHEL8 using https://github.com/nodejs/node/pull/25381. PR-URL: https://github.com/nodejs/node/pull/25534 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
28 lines
617 B
JavaScript
28 lines
617 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
common.skip('missing crypto');
|
|
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
const fixtures = require('../common/fixtures');
|
|
|
|
const server = tls.createServer({
|
|
key: fixtures.readKey('agent1-key.pem'),
|
|
cert: fixtures.readKey('agent1-cert.pem'),
|
|
rejectUnauthorized: true
|
|
}, function(c) {
|
|
}).listen(0, common.mustCall(function() {
|
|
assert.throws(() => {
|
|
tls.connect({
|
|
port: this.address().port,
|
|
ciphers: 'no-such-cipher'
|
|
}, common.mustNotCall());
|
|
}, /no cipher match/i);
|
|
|
|
server.close();
|
|
}));
|