Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backend/direct_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ func (dc *DirectConnection) writeAuthSwitchPacket(scrPasswd []byte) error {
// Caching sha2 authentication. Public key request and send encrypted password
func (dc *DirectConnection) writePublicKeyAuthPacketSha256(authData []byte, scramble []byte) error {
block, _ := pem.Decode(authData)
if block == nil {
return fmt.Errorf("failed to decode PEM block from auth data")
}
pub, err := x509.ParsePKIXPublicKey(block.Bytes)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions backend/pooled_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func (pc *pooledConnectImpl) WriteSetStatement() error {
func (pc *pooledConnectImpl) GetConnectionID() int64 {
if pc.directConnection.conn == nil {
log.Warn("GetConnectionID failed conn is nil, conn closed = %v, pc address = %v", pc.directConnection.IsClosed(), &(pc.directConnection))
return 0
}
return int64(pc.directConnection.conn.ConnectionID)
}
Expand Down