mirror of
https://github.com/nodejs/node.git
synced 2025-05-08 16:29:55 +00:00

PR-URL: https://github.com/nodejs/node/pull/21557 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
23 lines
616 B
JavaScript
23 lines
616 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 options = {
|
|
key: fixtures.readKey('agent2-key.pem'),
|
|
cert: fixtures.readKey('agent2-cert.pem'),
|
|
ciphers: 'aes256-sha'
|
|
};
|
|
assert.throws(() => tls.createServer(options, common.mustNotCall()),
|
|
/no cipher match/i);
|
|
options.ciphers = 'FOOBARBAZ';
|
|
assert.throws(() => tls.createServer(options, common.mustNotCall()),
|
|
/no cipher match/i);
|
|
}
|