@@ -59,8 +59,8 @@ function FakeConnection(socket) {
59
59
this . database = null ;
60
60
this . user = null ;
61
61
62
+ this . _cipher = null ;
62
63
this . _socket = socket ;
63
- this . _ssl = null ;
64
64
this . _stream = socket ;
65
65
this . _parser = new Parser ( { onPacket : this . _parsePacket . bind ( this ) } ) ;
66
66
@@ -261,7 +261,7 @@ FakeConnection.prototype._handleQueryPacket = function _handleQueryPacket(packet
261
261
262
262
var writer = new PacketWriter ( ) ;
263
263
writer . writeLengthCodedString ( 'Ssl_cipher' ) ;
264
- writer . writeLengthCodedString ( this . _ssl ? this . _ssl . getCurrentCipher ( ) . name : '' ) ;
264
+ writer . writeLengthCodedString ( this . _cipher ? this . _cipher . name : '' ) ;
265
265
this . _stream . write ( writer . toBuffer ( this . _parser ) ) ;
266
266
267
267
this . _sendPacket ( new Packets . EofPacket ( ) ) ;
@@ -343,7 +343,7 @@ FakeConnection.prototype._determinePacket = function _determinePacket() {
343
343
var Packet = this . _expectedNextPacket ;
344
344
345
345
if ( Packet === Packets . ClientAuthenticationPacket ) {
346
- return ! this . _ssl && ( this . _parser . peak ( 1 ) << 8 ) & ClientConstants . CLIENT_SSL
346
+ return ! this . _cipher && ( this . _parser . peak ( 1 ) << 8 ) & ClientConstants . CLIENT_SSL
347
347
? Packets . SSLRequestPacket
348
348
: Packets . ClientAuthenticationPacket ;
349
349
}
@@ -443,7 +443,7 @@ if (tls.TLSSocket) {
443
443
444
444
var conn = this ;
445
445
secureSocket . on ( 'secure' , function ( ) {
446
- conn . _ssl = this . ssl ;
446
+ conn . _cipher = this . getCipher ( ) ;
447
447
} ) ;
448
448
449
449
// resume
@@ -472,7 +472,7 @@ if (tls.TLSSocket) {
472
472
473
473
var conn = this ;
474
474
securePair . on ( 'secure' , function ( ) {
475
- conn . _ssl = this . ssl ;
475
+ conn . _cipher = securePair . cleartext . getCipher ( ) ;
476
476
} ) ;
477
477
478
478
// resume
0 commit comments