mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 15:35:41 +00:00

Do not allow the minimum protocol level to be set higher than the max
protocol level.
See: https://github.com/nodejs/node/pull/26951, 109c097797
PR-URL: https://github.com/nodejs/node/pull/27521
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
15 lines
446 B
JavaScript
15 lines
446 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto) common.skip('missing crypto');
|
|
|
|
// Check that conflicting TLS protocol versions are not allowed
|
|
|
|
const assert = require('assert');
|
|
const child_process = require('child_process');
|
|
|
|
const args = ['--tls-min-v1.3', '--tls-max-v1.2', '-p', 'process.version'];
|
|
child_process.execFile(process.argv[0], args, (err) => {
|
|
assert(err);
|
|
assert(/not both/.test(err.message));
|
|
});
|