mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
Backport CLI switches for default TLS versions: - `--tls-max-v1.2` - `--tls-min-v1.0` - `--tls-min-v1.1` - `--tls-min-v1.2` PR-URL: https://github.com/nodejs/node/pull/27946 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
16 lines
473 B
JavaScript
16 lines
473 B
JavaScript
// Flags: --tls-max-v1.2
|
|
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto) common.skip('missing crypto');
|
|
|
|
// Check that node `--tls-max-v1.2` is supported.
|
|
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
assert.strictEqual(tls.DEFAULT_MAX_VERSION, 'TLSv1.2');
|
|
assert.strictEqual(tls.DEFAULT_MIN_VERSION, 'TLSv1');
|
|
|
|
// Check the min-max version protocol versions against these CLI settings.
|
|
require('./test-tls-min-max-version.js');
|