mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
8e42d8c7bf
PR-URL: https://github.com/nodejs/node/pull/46429 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
26 lines
782 B
JavaScript
26 lines
782 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);
|
|
options.ciphers = 'TLS_not_a_cipher';
|
|
assert.throws(() => tls.createServer(options, common.mustNotCall()),
|
|
/no[_ ]cipher[_ ]match/i);
|
|
}
|