File tree 3 files changed +22
-9
lines changed
3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -1685,6 +1685,11 @@ changes:
1685
1685
** Default:** none, see ` minVersion ` .
1686
1686
* ` sessionIdContext ` {string} Opaque identifier used by servers to ensure
1687
1687
session state is not shared between applications. Unused by clients.
1688
+ * ` ticketKeys ` : {Buffer} 48-bytes of cryptographically strong pseudo-random
1689
+ data. See [ Session Resumption] [ ] for more information.
1690
+ * ` sessionTimeout ` {number} The number of seconds after which a TLS session
1691
+ created by the server will no longer be resumable. See
1692
+ [ Session Resumption] [ ] for more information. ** Default:** ` 300 ` .
1688
1693
1689
1694
[ ` tls.createServer() ` ] [ ] sets the default value of the ` honorCipherOrder ` option
1690
1695
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 @@ -1317,6 +1317,12 @@ Server.prototype.setSecureContext = function(options) {
1317
1317
. slice ( 0 , 32 ) ;
1318
1318
}
1319
1319
1320
+ if ( options . sessionTimeout )
1321
+ this . sessionTimeout = options . sessionTimeout ;
1322
+
1323
+ if ( options . ticketKeys )
1324
+ this . ticketKeys = options . ticketKeys ;
1325
+
1320
1326
this . _sharedCreds = tls . createSecureContext ( {
1321
1327
pfx : this . pfx ,
1322
1328
key : this . key ,
@@ -1334,16 +1340,10 @@ Server.prototype.setSecureContext = function(options) {
1334
1340
secureOptions : this . secureOptions ,
1335
1341
honorCipherOrder : this . honorCipherOrder ,
1336
1342
crl : this . crl ,
1337
- sessionIdContext : this . sessionIdContext
1343
+ sessionIdContext : this . sessionIdContext ,
1344
+ ticketKeys : this . ticketKeys ,
1345
+ sessionTimeout : this . sessionTimeout
1338
1346
} ) ;
1339
-
1340
- if ( this . sessionTimeout )
1341
- this . _sharedCreds . context . setSessionTimeout ( this . sessionTimeout ) ;
1342
-
1343
- if ( options . ticketKeys ) {
1344
- this . ticketKeys = options . ticketKeys ;
1345
- this . setTicketKeys ( this . ticketKeys ) ;
1346
- }
1347
1347
} ;
1348
1348
1349
1349
You can’t perform that action at this time.
0 commit comments