Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 69080f5

Browse files
committed
tls: enforce secureOptions on incoming clients
Reuse the secureProtocol and secureOptions of the server when creating the secure context for incoming clients.
1 parent b9283cf commit 69080f5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/tls.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,12 @@ function Server(/* [options], listener */) {
11451145

11461146
// constructor call
11471147
net.Server.call(this, function(socket) {
1148-
var creds = crypto.createCredentials(null, sharedCreds.context);
1148+
var connOps = {
1149+
secureProtocol: self.secureProtocol,
1150+
secureOptions: self.secureOptions
1151+
};
1152+
1153+
var creds = crypto.createCredentials(connOps, sharedCreds.context);
11491154

11501155
var pair = new SecurePair(creds,
11511156
true,

0 commit comments

Comments
 (0)