Skip to content
Advertisement

Apache HttpClient – Log version of TLS that’s negotiated in a request?

I’ve got lots of code that uses Apache’s HttpClient, and I’d like to log the version of TLS that’s being negotiated when a request is made.

Is this possible?

I’d prefer an approach that doesn’t requiring changing how the request is being built, if possible – something that inspects a response or views a log or something like that?

From my review, it appears this is only possible if we debug SSL at the VM level, or perhaps if a custom SSLContext is used?

Advertisement

Answer

If you turn on debug level logging for org.apache.http.conn.ssl category HttpClient will log quite a bit of details about the SSL session used including TLS/SSL protocol version.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement