Skip to content

Commit

Permalink
tls: enforce secureOptions on incoming clients
Browse files Browse the repository at this point in the history
Reuse the secureProtocol and secureOptions of the server when creating
the secure context for incoming clients.
  • Loading branch information
tjfontaine committed Oct 23, 2014
1 parent b9283cf commit 69080f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 69080f5

Please sign in to comment.