node/test/parallel/test-tls-cli-min-version-1.0.js
Sam Roberts 109c097797
tls: revert default max to TLSv1.2
TLSv1.3 is still supported when explicitly configured, but it is not the
default.

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>
2019-04-15 13:31:57 +01:00

16 lines
510 B
JavaScript

// Flags: --tls-min-v1.0 --tls-min-v1.1
'use strict';
const common = require('../common');
if (!common.hasCrypto) common.skip('missing crypto');
// Check that `node --tls-v1.0` is supported, and overrides --tls-v1.1.
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');