Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1170db

Browse filesBrowse files
danbevMylesBorins
authored andcommitted
tls: remove sharedCreds in Server constructor
This commit removes the var sharedCreds which is just reassigned to this._sharedCreds in the following line. PR-URL: #20491 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent e362e06 commit e1170db
Copy full SHA for e1170db

File tree

Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-4
lines changed
Open diff view settings
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ function Server(options, listener) {
871871
// Handle option defaults:
872872
this.setOptions(options);
873873

874-
var sharedCreds = tls.createSecureContext({
874+
this._sharedCreds = tls.createSecureContext({
875875
pfx: this.pfx,
876876
key: this.key,
877877
passphrase: this.passphrase,
@@ -887,7 +887,6 @@ function Server(options, listener) {
887887
crl: this.crl,
888888
sessionIdContext: this.sessionIdContext
889889
});
890-
this._sharedCreds = sharedCreds;
891890

892891
this[kHandshakeTimeout] = options.handshakeTimeout || (120 * 1000);
893892
this[kSNICallback] = options.SNICallback;
@@ -898,11 +897,11 @@ function Server(options, listener) {
898897
}
899898

900899
if (this.sessionTimeout) {
901-
sharedCreds.context.setSessionTimeout(this.sessionTimeout);
900+
this._sharedCreds.context.setSessionTimeout(this.sessionTimeout);
902901
}
903902

904903
if (this.ticketKeys) {
905-
sharedCreds.context.setTicketKeys(this.ticketKeys);
904+
this._sharedCreds.context.setTicketKeys(this.ticketKeys);
906905
}
907906

908907
// constructor call

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.