@@ -56,7 +56,7 @@ const kErrorEmitted = Symbol('error-emitted');
56
56
const kHandshakeTimeout = Symbol ( 'handshake-timeout' ) ;
57
57
const kRes = Symbol ( 'res' ) ;
58
58
const kSNICallback = Symbol ( 'snicallback' ) ;
59
- const kSSL = Symbol ( 'ssl' ) ;
59
+ const kHandle = Symbol ( 'ssl' ) ;
60
60
61
61
const noop = ( ) => { } ;
62
62
@@ -326,14 +326,14 @@ function TLSSocket(socket, opts) {
326
326
} ) ;
327
327
328
328
// Proxy for API compatibility
329
- this [ kSSL ] = this . _handle ;
329
+ this [ kHandle ] = this . _handle ;
330
330
Object . defineProperty ( this , 'ssl' , {
331
331
enumerable : true ,
332
332
configurable : true ,
333
- get : util . deprecate ( ( ) => this [ kSSL ] ,
333
+ get : util . deprecate ( ( ) => this [ kHandle ] ,
334
334
'The tlsSocket.ssl property is deprecated.' ,
335
335
'DEP00XX' ) ,
336
- set : util . deprecate ( ( val ) => this [ kSSL ] = val ,
336
+ set : util . deprecate ( ( val ) => this [ kHandle ] = val ,
337
337
'The tlsSocket.ssl property is deprecated.' ,
338
338
'DEP00XX' )
339
339
} ) ;
@@ -377,8 +377,8 @@ for (var n = 0; n < proxiedMethods.length; n++) {
377
377
tls_wrap . TLSWrap . prototype . close = function close ( cb ) {
378
378
let ssl ;
379
379
if ( this [ owner_symbol ] ) {
380
- ssl = this [ owner_symbol ] [ kSSL ] ;
381
- this [ owner_symbol ] [ kSSL ] = null ;
380
+ ssl = this [ owner_symbol ] [ kHandle ] ;
381
+ this [ owner_symbol ] [ kHandle ] = null ;
382
382
}
383
383
384
384
// Invoke `destroySSL` on close to clean up possibly pending write requests
@@ -468,13 +468,13 @@ function destroySSL(self) {
468
468
}
469
469
470
470
TLSSocket . prototype . _destroySSL = function _destroySSL ( ) {
471
- if ( ! this [ kSSL ] ) return ;
472
- this [ kSSL ] . destroySSL ( ) ;
473
- if ( this [ kSSL ] . _secureContext . singleUse ) {
474
- this [ kSSL ] . _secureContext . context . close ( ) ;
475
- this [ kSSL ] . _secureContext . context = null ;
471
+ if ( ! this [ kHandle ] ) return ;
472
+ this [ kHandle ] . destroySSL ( ) ;
473
+ if ( this [ kHandle ] . _secureContext . singleUse ) {
474
+ this [ kHandle ] . _secureContext . context . close ( ) ;
475
+ this [ kHandle ] . _secureContext . context = null ;
476
476
}
477
- this [ kSSL ] = null ;
477
+ this [ kHandle ] = null ;
478
478
} ;
479
479
480
480
TLSSocket . prototype . _init = function ( socket , wrap ) {
0 commit comments