Skip to content

Commit

Permalink
backend: add ssl to packet for HandshakeHandler (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
djshow832 authored Mar 1, 2023
1 parent 7561e08 commit 61c436c
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 61c436c

Please sign in to comment.