diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2018-11-05 16:47:40 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2018-11-05 16:47:40 +0100 |
commit | 1c3afda78a9dcfa7e5aadc4c31910002a567ab8f (patch) | |
tree | 0b9164dc7096e26ffeccaf6a75628cd6fb4d68f0 /jrt | |
parent | f5eb888d310e546e2d98f9028e9c19833475ec5c (diff) |
Add more debug logging to TlsCryptoSocket
Diffstat (limited to 'jrt')
-rw-r--r-- | jrt/src/com/yahoo/jrt/TlsCryptoSocket.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jrt/src/com/yahoo/jrt/TlsCryptoSocket.java b/jrt/src/com/yahoo/jrt/TlsCryptoSocket.java index 96aca622af4..93403f188df 100644 --- a/jrt/src/com/yahoo/jrt/TlsCryptoSocket.java +++ b/jrt/src/com/yahoo/jrt/TlsCryptoSocket.java @@ -44,6 +44,7 @@ public class TlsCryptoSocket implements CryptoSocket { // Note: Dummy buffer as unwrap requires a full size application buffer even though no application data is unwrapped this.handshakeDummyBuffer = ByteBuffer.allocate(nullSession.getApplicationBufferSize()); this.handshakeState = HandshakeState.NOT_STARTED; + log.fine(() -> "Initialized with " + sslEngine.toString()); } // inject pre-read data into the read pipeline (typically called by MaybeTlsCryptoSocket) @@ -67,6 +68,7 @@ public class TlsCryptoSocket implements CryptoSocket { private HandshakeState processHandshakeState(HandshakeState state) throws IOException { switch (state) { case NOT_STARTED: + log.fine(() -> "Initiating handshake"); sslEngine.beginHandshake(); break; case NEED_WRITE: @@ -82,6 +84,7 @@ public class TlsCryptoSocket implements CryptoSocket { } while (true) { + log.fine(() -> "SSLEngine.getHandshakeStatus(): " + sslEngine.getHandshakeStatus()); switch (sslEngine.getHandshakeStatus()) { case NOT_HANDSHAKING: if (wrapBuffer.bytes() > 0) return HandshakeState.NEED_WRITE; @@ -90,6 +93,7 @@ public class TlsCryptoSocket implements CryptoSocket { SSLSession session = sslEngine.getSession(); sessionApplicationBufferSize = session.getApplicationBufferSize(); sessionPacketBufferSize = session.getPacketBufferSize(); + log.fine(() -> String.format("Handshake complete: protocol=%s, cipherSuite=%s", session.getProtocol(), session.getCipherSuite())); return HandshakeState.COMPLETED; case NEED_TASK: sslEngine.getDelegatedTask().run(); |