mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
For 11.x, the default minimum is TLSv1, so it needs a CLI switch to change the default to the more secure minimum of TLSv1.2. PR-URL: https://github.com/nodejs/node/pull/26951 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.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.2');
|
|
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');
|