Skip to content

Commit

Permalink
backend: add ssl to packet for HandshakeHandler (pingcap#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
djshow832 authored and xhebox committed Mar 13, 2023
1 parent fa2a683 commit 6e2e764
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/proxy/backend/authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ func (auth *Authenticator) handshakeFirstTime(logger *zap.Logger, cctx ConnConte
if frontendCapability != frontendCapabilityResponse {
common := frontendCapability & frontendCapabilityResponse
logger.Warn("frontend capabilities differs between SSL request and handshake response", zap.Stringer("common", common), zap.Stringer("ssl", frontendCapability^common), zap.Stringer("resp", frontendCapabilityResponse^common))
// Some drivers don't set ClientSSL in the second packet, but the HandshakeHandler wants the real capability.
binary.LittleEndian.PutUint32(pkt, frontendCapability.Uint32())
}
}
if commonCaps := frontendCapability & requiredFrontendCaps; commonCaps != requiredFrontendCaps {
Expand Down

0 comments on commit 6e2e764

Please sign in to comment.