-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Unable to share ticketKeys in secureContextΒ #20908
Copy link
Copy link
Closed
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Metadata
Metadata
Assignees
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I am trying to share the TLS
ticketKeysamong several servers running in cluster in order to enable the reuse of sessions regardless of the particular server receiving the request. SharingticketKeysamong servers is quite straightforward when you create the servers usingtls.createServer(), but in my case, I need to create the servers usingnet.createServer()and then wrap the incoming plain sockets withnew TLSSocket().The
optionsparameter innew TLSSocket()allows you to enter asecureContext, but unfortunately there is no (published) way to shareticketKeysthroughsecureContexts. I've peeked into the code, and discovered that there is an undocumented way to do it throughsecureContext.context.setTicketKeys(). I've even tested it and assessed that it works. But I don't dare to use it since it is not documented and could disappear with no previous notice. Could you please add aticketKeysoption totls.createSecureContext()to enable the reuse of TLS sessions in cluster mode?