@@ -257,6 +257,7 @@ function callALPNCallback(protocolsBuffer) {
257257  } 
258258
259259  const  selectedProtocol  =  socket [ kALPNCallback ] ( { 
260+     __proto__ : null , 
260261    servername, 
261262    protocols, 
262263  } ) ; 
@@ -436,7 +437,7 @@ function onPskClientCallback(hint, maxPskLen, maxIdentityLen) {
436437    ) ; 
437438  } 
438439
439-   return  {  psk : ret . psk ,  identity : ret . identity  } ; 
440+   return  {  __proto__ :  null ,   psk : ret . psk ,  identity : ret . identity  } ; 
440441} 
441442
442443function  onkeylog ( line )  { 
@@ -510,7 +511,7 @@ function initRead(tlsSocket, socket) {
510511 */ 
511512
512513function  TLSSocket ( socket ,  opts )  { 
513-   const  tlsOptions  =  {  ...opts  } ; 
514+   const  tlsOptions  =  {  __proto__ :  null ,   ...opts  } ; 
514515  let  enableTrace  =  tlsOptions . enableTrace ; 
515516
516517  if  ( enableTrace  ==  null )  { 
@@ -563,6 +564,7 @@ function TLSSocket(socket, opts) {
563564  this . encrypted  =  true ; 
564565
565566  ReflectApply ( net . Socket ,  this ,  [ { 
567+     __proto__ : null , 
566568    handle : this . _wrapHandle ( wrap ) , 
567569    allowHalfOpen : socket  ? socket . allowHalfOpen  : tlsOptions . allowHalfOpen , 
568570    pauseOnCreate : tlsOptions . pauseOnConnect , 
@@ -843,7 +845,7 @@ TLSSocket.prototype._init = function(socket, wrap) {
843845        'by writing secret key material to file '  +  tlsKeylog ) ; 
844846    } 
845847    this . on ( 'keylog' ,  ( line )  =>  { 
846-       appendFile ( tlsKeylog ,  line ,  {  mode : 0o600  } ,  ( err )  =>  { 
848+       appendFile ( tlsKeylog ,  line ,  {  __proto__ :  null ,   mode : 0o600  } ,  ( err )  =>  { 
847849        if  ( err  &&  warnOnTlsKeylogError )  { 
848850          warnOnTlsKeylogError  =  false ; 
849851          process . emitWarning ( 'Failed to write TLS keylog (this warning '  + 
@@ -1078,7 +1080,7 @@ TLSSocket.prototype.setSession = function(session) {
10781080TLSSocket . prototype . getPeerCertificate  =  function ( detailed )  { 
10791081  if  ( this . _handle )  { 
10801082    return  common . translatePeerCertificate ( 
1081-       this . _handle . getPeerCertificate ( detailed ) )  ||  { } ; 
1083+       this . _handle . getPeerCertificate ( detailed ) )  ||  {   __proto__ :  null   } ; 
10821084  } 
10831085
10841086  return  null ; 
@@ -1088,7 +1090,7 @@ TLSSocket.prototype.getCertificate = function() {
10881090  if  ( this . _handle )  { 
10891091    // It's not a peer cert, but the formatting is identical. 
10901092    return  common . translatePeerCertificate ( 
1091-       this . _handle . getCertificate ( ) )  ||  { } ; 
1093+       this . _handle . getCertificate ( ) )  ||  {   __proto__ :  null   } ; 
10921094  } 
10931095
10941096  return  null ; 
@@ -1179,6 +1181,7 @@ function onSocketClose(err) {
11791181function  tlsConnectionListener ( rawSocket )  { 
11801182  debug ( 'net.Server.on(connection): new TLSSocket' ) ; 
11811183  const  socket  =  new  TLSSocket ( rawSocket ,  { 
1184+     __proto__ : null , 
11821185    secureContext : this . _sharedCreds , 
11831186    isServer : true , 
11841187    server : this , 
@@ -1437,6 +1440,7 @@ Server.prototype.setSecureContext = function(options) {
14371440  this . privateKeyEngine  =  options . privateKeyEngine ; 
14381441
14391442  this . _sharedCreds  =  tls . createSecureContext ( { 
1443+     __proto__ : null , 
14401444    pfx : this . pfx , 
14411445    key : this . key , 
14421446    passphrase : this . passphrase , 
@@ -1464,7 +1468,7 @@ Server.prototype.setSecureContext = function(options) {
14641468
14651469Server . prototype . _getServerData  =  function ( )  { 
14661470  return  { 
1467-     ticketKeys : this . getTicketKeys ( ) . toString ( 'hex' ) , 
1471+     __proto__ :  null ,   ticketKeys : this . getTicketKeys ( ) . toString ( 'hex' ) , 
14681472  } ; 
14691473} ; 
14701474
@@ -1698,6 +1702,7 @@ exports.connect = function connect(...args) {
16981702  const  allowUnauthorized  =  getAllowUnauthorized ( ) ; 
16991703
17001704  options  =  { 
1705+     __proto__ : null , 
17011706    rejectUnauthorized : ! allowUnauthorized , 
17021707    ciphers : tls . DEFAULT_CIPHERS , 
17031708    checkServerIdentity : tls . checkServerIdentity , 
@@ -1718,6 +1723,7 @@ exports.connect = function connect(...args) {
17181723  const  context  =  options . secureContext  ||  tls . createSecureContext ( options ) ; 
17191724
17201725  const  tlssock  =  new  TLSSocket ( options . socket ,  { 
1726+     __proto__ : null , 
17211727    allowHalfOpen : options . allowHalfOpen , 
17221728    pipe : ! ! options . path , 
17231729    secureContext : context , 
0 commit comments