Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: remove sharedCreds in Server constructor #20491

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ function Server(options, listener) {
// Handle option defaults:
this.setOptions(options);

var sharedCreds = tls.createSecureContext({
this._sharedCreds = tls.createSecureContext({
pfx: this.pfx,
key: this.key,
passphrase: this.passphrase,
Expand All @@ -891,7 +891,6 @@ function Server(options, listener) {
crl: this.crl,
sessionIdContext: this.sessionIdContext
});
this._sharedCreds = sharedCreds;

this[kHandshakeTimeout] = options.handshakeTimeout || (120 * 1000);
this[kSNICallback] = options.SNICallback;
Expand All @@ -902,11 +901,11 @@ function Server(options, listener) {
}

if (this.sessionTimeout) {
sharedCreds.context.setSessionTimeout(this.sessionTimeout);
this._sharedCreds.context.setSessionTimeout(this.sessionTimeout);
}

if (this.ticketKeys) {
sharedCreds.context.setTicketKeys(this.ticketKeys);
this._sharedCreds.context.setTicketKeys(this.ticketKeys);
}

// constructor call
Expand Down