Log protocol version during handshake (#10178)

Motivation:

Only cipher suite is logged during handshake. Picked protocol is interesting too.

Modification:

Log protocol as well.

Result:

More interesting information when debugging TLS handshakes.
This commit is contained in:
Stephane Landelle 2020-04-14 10:48:43 +02:00 committed by GitHub
parent 79ef0c4706
commit d5e42f8553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1788,7 +1788,12 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
handshakePromise.trySuccess(ctx.channel()); handshakePromise.trySuccess(ctx.channel());
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("{} HANDSHAKEN: {}", ctx.channel(), engine.getSession().getCipherSuite()); SSLSession session = engine.getSession();
logger.debug(
"{} HANDSHAKEN: protocol:{} cipher suite:{}",
ctx.channel(),
session.getProtocol(),
session.getCipherSuite());
} }
ctx.fireUserEventTriggered(SslHandshakeCompletionEvent.SUCCESS); ctx.fireUserEventTriggered(SslHandshakeCompletionEvent.SUCCESS);