kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: KAFKA-4301; Add more trace for SSL handshake
Date Tue, 25 Oct 2016 13:19:29 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 2ac332e9c -> a4413fc8a


KAFKA-4301; Add more trace for SSL handshake

Author: Rajini Sivaram <rajinisivaram@googlemail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #2027 from rajinisivaram/KAFKA-4301


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/a4413fc8
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/a4413fc8
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/a4413fc8

Branch: refs/heads/trunk
Commit: a4413fc8a42b0222107cad20835e4461141c2ea2
Parents: 2ac332e
Author: Rajini Sivaram <rajinisivaram@googlemail.com>
Authored: Tue Oct 25 13:11:04 2016 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Tue Oct 25 13:11:04 2016 +0100

----------------------------------------------------------------------
 .../org/apache/kafka/common/network/SslTransportLayer.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a4413fc8/clients/src/main/java/org/apache/kafka/common/network/SslTransportLayer.java
----------------------------------------------------------------------
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 7ce59f3..ffa980b 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());


Mime
View raw message