mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02: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. 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:
parent
160ac0f325
commit
f512f5ea13
14 changed files with 327 additions and 45 deletions
|
@ -186,6 +186,14 @@ Agent.prototype.getName = function getName(options) {
|
|||
if (options.servername && options.servername !== options.host)
|
||||
name += options.servername;
|
||||
|
||||
name += ':';
|
||||
if (options.minVersion)
|
||||
name += options.minVersion;
|
||||
|
||||
name += ':';
|
||||
if (options.maxVersion)
|
||||
name += options.maxVersion;
|
||||
|
||||
name += ':';
|
||||
if (options.secureProtocol)
|
||||
name += options.secureProtocol;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue