From 6007a9cc0e361d428123e4c0f74024c6cd7815f4 Mon Sep 17 00:00:00 2001 From: Jeff Principe Date: Mon, 16 Oct 2017 21:23:29 -0700 Subject: https: add extra options to Agent#getName() Adds the remaining options from tls.createSecureContext() to the string generated by Agent#getName(). This allows https.request() to accept the options and generate unique sockets appropriately. PR-URL: https://github.com/nodejs/node/pull/16402 Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Matteo Collina Reviewed-By: James M Snell --- lib/https.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/https.js') diff --git a/lib/https.js b/lib/https.js index 741ce84d2f..84ddeb5036 100644 --- a/lib/https.js +++ b/lib/https.js @@ -194,6 +194,30 @@ Agent.prototype.getName = function getName(options) { if (options.secureProtocol) name += options.secureProtocol; + name += ':'; + if (options.crl) + name += options.crl; + + name += ':'; + if (options.honorCipherOrder !== undefined) + name += options.honorCipherOrder; + + name += ':'; + if (options.ecdhCurve) + name += options.ecdhCurve; + + name += ':'; + if (options.dhparam) + name += options.dhparam; + + name += ':'; + if (options.secureOptions !== undefined) + name += options.secureOptions; + + name += ':'; + if (options.sessionIdContext) + name += options.sessionIdContext; + return name; }; -- cgit v1.2.1