-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tls: support TLS min/max protocol defaults in CLI
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: #27946 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
- Loading branch information
1 parent
f1a8791
commit 1cfb457
Showing
12 changed files
with
174 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Flags: --tls-min-v1.1 | ||
'use strict'; | ||
const common = require('../common'); | ||
if (!common.hasCrypto) common.skip('missing crypto'); | ||
|
||
// Check that node `--tls-v1.1` 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.1'); | ||
|
||
// Check the min-max version protocol versions against these CLI settings. | ||
require('./test-tls-min-max-version.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// 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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters