tls: enforce secureOptions on incoming clients

Reuse the secureProtocol and secureOptions of the server when creating
the secure context for incoming clients.
This commit is contained in:
Timothy J Fontaine committed 2014-10-23 10:45:04 -07:00
1 parent b9283cf9d1
commit 69080f5474
1 file changed
+6 -1
+6 -1
View File
@@ -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,