summaryrefslogtreecommitdiff
path: root/lib/https.js
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2018-05-06 13:52:34 +0900
committerSam Roberts <vieuxtech@gmail.com>2018-11-22 09:14:58 -0800
commitf512f5ea138fe86e47c0179d5733044daf6f4fe6 (patch)
tree944745196104118f057d4e0834b62422cf72480f /lib/https.js
parent160ac0f32513337214dc5a4cdb1fa8de3c2ed14c (diff)
downloadandroid-node-v8-f512f5ea138fe86e47c0179d5733044daf6f4fe6.tar.gz
android-node-v8-f512f5ea138fe86e47c0179d5733044daf6f4fe6.tar.bz2
android-node-v8-f512f5ea138fe86e47c0179d5733044daf6f4fe6.zip
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>
Diffstat (limited to 'lib/https.js')
-rw-r--r--lib/https.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/https.js b/lib/https.js
index 12db2f452c..66e76c1f05 100644
--- a/lib/https.js
+++ b/lib/https.js
@@ -187,6 +187,14 @@ Agent.prototype.getName = function getName(options) {
name += options.servername;
name += ':';
+ if (options.minVersion)
+ name += options.minVersion;
+
+ name += ':';
+ if (options.maxVersion)
+ name += options.maxVersion;
+
+ name += ':';
if (options.secureProtocol)
name += options.secureProtocol;