mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
tls: add min/max protocol version options
The existing secureProtocol option only allows setting the allowed protocol to a specific version, or setting it to "all supported versions". It also used obscure strings based on OpenSSL C API functions. Directly setting the min or max is easier to use and explain. Backport-PR-URL: https://github.com/nodejs/node/pull/24676 PR-URL: https://github.com/nodejs/node/pull/24405 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
This commit is contained in:
1 parent
bfec6a4eb3
commit
acb73518b7
12 files changed
+294
-43
No files matched your search
@@ -12,7 +12,7 @@ const agent = new https.Agent();
|
||||
// empty options
|
||||
assert.strictEqual(
|
||||
agent.getName({}),
|
||||
'localhost:::::::::::::::::'
|
||||
'localhost:::::::::::::::::::'
|
||||
);
|
||||
|
||||
// pass all options arguments
|
||||
@@ -40,5 +40,5 @@ const options = {
|
||||
assert.strictEqual(
|
||||
agent.getName(options),
|
||||
'0.0.0.0:443:192.168.1.1:ca:cert:dynamic:ciphers:key:pfx:false:localhost:' +
|
||||
'secureProtocol:c,r,l:false:ecdhCurve:dhparam:0:sessionIdContext'
|
||||
'::secureProtocol:c,r,l:false:ecdhCurve:dhparam:0:sessionIdContext'
|
||||
);
|
||||
Reference in new issue
Block a user