summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2014-10-22 12:14:10 -0700
committerTimothy J Fontaine <tjfontaine@gmail.com>2014-10-23 10:45:04 -0700
commit69080f5474369fc7fc4be7ab74ad2e1619eb2fbc (patch)
treee0e13bfa14caa2f356399fdf6fc42aec48d45560
parentb9283cf9d17a51f9654b438216ecb743ed69a7ce (diff)
downloadnode-69080f5474369fc7fc4be7ab74ad2e1619eb2fbc.tar.gz
tls: enforce secureOptions on incoming clients
Reuse the secureProtocol and secureOptions of the server when creating the secure context for incoming clients.
-rw-r--r--lib/tls.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/tls.js b/lib/tls.js
index adc8efa63..77a708921 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -1145,7 +1145,12 @@ function Server(/* [options], listener */) {
// constructor call
net.Server.call(this, function(socket) {
- var creds = crypto.createCredentials(null, sharedCreds.context);
+ var connOps = {
+ secureProtocol: self.secureProtocol,
+ secureOptions: self.secureOptions
+ };
+
+ var creds = crypto.createCredentials(connOps, sharedCreds.context);
var pair = new SecurePair(creds,
true,