mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 23:56:58 +00:00

Switch added in v11.x, add it to master/12.x for consistency and
compatibility.
See: https://github.com/nodejs/node/pull/26951, commit bf2c283555
PR-URL: https://github.com/nodejs/node/pull/27520
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
16 lines
475 B
JavaScript
16 lines
475 B
JavaScript
// Flags: --tls-min-v1.2
|
|
'use strict';
|
|
const common = require('../common');
|
|
if (!common.hasCrypto) common.skip('missing crypto');
|
|
|
|
// Check that node `--tls-min-v1.2` is supported.
|
|
|
|
const assert = require('assert');
|
|
const tls = require('tls');
|
|
|
|
assert.strictEqual(tls.DEFAULT_MAX_VERSION, 'TLSv1.3');
|
|
assert.strictEqual(tls.DEFAULT_MIN_VERSION, 'TLSv1.2');
|
|
|
|
// Check the min-max version protocol versions against these CLI settings.
|
|
require('./test-tls-min-max-version.js');
|