diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-10-22 12:14:10 -0700 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-10-23 10:45:04 -0700 |
commit | 69080f5474369fc7fc4be7ab74ad2e1619eb2fbc (patch) | |
tree | e0e13bfa14caa2f356399fdf6fc42aec48d45560 | |
parent | b9283cf9d17a51f9654b438216ecb743ed69a7ce (diff) | |
download | node-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.js | 7 |
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, |