File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -1472,9 +1472,7 @@ Server.prototype.setSecureContext = function(options) {
1472
1472
if ( options . sessionIdContext ) {
1473
1473
this . sessionIdContext = options . sessionIdContext ;
1474
1474
} else {
1475
- this . sessionIdContext = crypto . createHash ( 'sha1' )
1476
- . update ( process . argv . join ( ' ' ) )
1477
- . digest ( 'hex' )
1475
+ this . sessionIdContext = crypto . hash ( 'sha1' , process . argv . join ( ' ' ) , 'hex' )
1478
1476
. slice ( 0 , 32 ) ;
1479
1477
}
1480
1478
@@ -1570,9 +1568,7 @@ Server.prototype.setOptions = deprecate(function(options) {
1570
1568
if ( options . sessionIdContext ) {
1571
1569
this . sessionIdContext = options . sessionIdContext ;
1572
1570
} else {
1573
- this . sessionIdContext = crypto . createHash ( 'sha1' )
1574
- . update ( process . argv . join ( ' ' ) )
1575
- . digest ( 'hex' )
1571
+ this . sessionIdContext = crypto . hash ( 'sha1' , process . argv . join ( ' ' ) , 'hex' )
1576
1572
. slice ( 0 , 32 ) ;
1577
1573
}
1578
1574
if ( options . pskCallback ) this [ kPskCallback ] = options . pskCallback ;
You can’t perform that action at this time.
0 commit comments