diff --git a/clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java b/clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java index 7ce59f325c7..ffa980b566b 100644 --- a/clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java +++ b/clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java @@ -352,8 +352,12 @@ public class SslTransportLayer implements TransportLayer { //remove OP_WRITE if we are complete, otherwise we still have data to write if (!handshakeComplete) key.interestOps(key.interestOps() | SelectionKey.OP_WRITE); - else + else { key.interestOps(key.interestOps() & ~SelectionKey.OP_WRITE); + SSLSession session = sslEngine.getSession(); + log.debug("SSL handshake completed successfully with peerHost '{}' peerPort {} peerPrincipal '{}' cipherSuite '{}'", + session.getPeerHost(), session.getPeerPort(), peerPrincipal(), session.getCipherSuite()); + } log.trace("SSLHandshake FINISHED channelId {}, appReadBuffer pos {}, netReadBuffer pos {}, netWriteBuffer pos {} ", channelId, appReadBuffer.position(), netReadBuffer.position(), netWriteBuffer.position());