File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -1622,6 +1622,11 @@ changes:
1622
1622
** Default:** none, see ` minVersion ` .
1623
1623
* ` sessionIdContext ` {string} Opaque identifier used by servers to ensure
1624
1624
session state is not shared between applications. Unused by clients.
1625
+ * ` ticketKeys ` : {Buffer} 48-bytes of cryptographically strong pseudo-random
1626
+ data. See [ Session Resumption] [ ] for more information.
1627
+ * ` sessionTimeout ` {number} The number of seconds after which a TLS session
1628
+ created by the server will no longer be resumable. See
1629
+ [ Session Resumption] [ ] for more information. ** Default:** ` 300 ` .
1625
1630
1626
1631
[ ` tls.createServer() ` ] [ ] sets the default value of the ` honorCipherOrder ` option
1627
1632
to ` true ` , other APIs that create secure contexts leave it unset.
Original file line number Diff line number Diff line change @@ -294,6 +294,14 @@ exports.createSecureContext = function createSecureContext(options) {
294
294
options . clientCertEngine ) ;
295
295
}
296
296
297
+ if ( options . ticketKeys ) {
298
+ c . context . setTicketKeys ( options . ticketKeys ) ;
299
+ }
300
+
301
+ if ( options . sessionTimeout ) {
302
+ c . context . setSessionTimeout ( options . sessionTimeout ) ;
303
+ }
304
+
297
305
return c ;
298
306
} ;
299
307
Original file line number Diff line number Diff line change @@ -1315,6 +1315,12 @@ Server.prototype.setSecureContext = function(options) {
1315
1315
. slice ( 0 , 32 ) ;
1316
1316
}
1317
1317
1318
+ if ( options . sessionTimeout )
1319
+ this . sessionTimeout = options . sessionTimeout ;
1320
+
1321
+ if ( options . ticketKeys )
1322
+ this . ticketKeys = options . ticketKeys ;
1323
+
1318
1324
this . _sharedCreds = tls . createSecureContext ( {
1319
1325
pfx : this . pfx ,
1320
1326
key : this . key ,
@@ -1332,16 +1338,10 @@ Server.prototype.setSecureContext = function(options) {
1332
1338
secureOptions : this . secureOptions ,
1333
1339
honorCipherOrder : this . honorCipherOrder ,
1334
1340
crl : this . crl ,
1335
- sessionIdContext : this . sessionIdContext
1341
+ sessionIdContext : this . sessionIdContext ,
1342
+ ticketKeys : this . ticketKeys ,
1343
+ sessionTimeout : this . sessionTimeout
1336
1344
} ) ;
1337
-
1338
- if ( this . sessionTimeout )
1339
- this . _sharedCreds . context . setSessionTimeout ( this . sessionTimeout ) ;
1340
-
1341
- if ( options . ticketKeys ) {
1342
- this . ticketKeys = options . ticketKeys ;
1343
- this . setTicketKeys ( this . ticketKeys ) ;
1344
- }
1345
1345
} ;
1346
1346
1347
1347
You can’t perform that action at this time.
0 commit comments