forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tls: disallow conflicting TLS protocol options
Do not allow the minimum protocol level to be set higher than the max protocol level. See: nodejs#26951, 109c097
- Loading branch information
1 parent
495822f
commit 918c0ed
Showing
2 changed files
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
if (!common.hasCrypto) common.skip('missing crypto'); | ||
|
||
// Check that conflicting TLS protocol versions are not allowed | ||
|
||
const assert = require('assert'); | ||
const child_process = require('child_process'); | ||
|
||
const args = ['--tls-min-v1.3', '--tls-max-v1.2', '-p', 'process.version']; | ||
child_process.execFile(process.argv[0], args, (err) => { | ||
assert(err); | ||
assert(/not both/.test(err.message)); | ||
}); |