Hi David,

Sorry - I missed your initial email. I've no issue with you taking this request. I would caution that any change in this area will need review/discussion around whether disclosing network resources in an Exception is suitable for all scenarios. The enhancement might have to be controlled via the jdk.includeInExceptions JDK property. Again - something that probably warrants discussion.

I'd also highlight that the application level code has opportunity to do better handling here. In this JBS issue,  Jetty didn't appear to add any such details regards connection, even though Jetty would have initiated the connection.

Caused by: javax.ws.rs.ProcessingException: java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem at org.glassfish.jersey.jetty.connector.JettyConnector.apply(JettyConnector.java:273)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:278)

regards,
Sean.

On 19/11/2026 20:25, David Vieira wrote:
Hi,

I'd like to fix JDK-8199652 [1]: a client-side TLS handshake failure doesn't say which peer it was talking to. The reporter had hundreds of async SSLEngine requests and no way to tell which one failed.

With the change, the message ends with the peer:

SSLHandshakeException: (certificate_unknown) PKIX path building failed: ... (peer: https://www.google.com/url?q=http://api.example.com:443&source=gmail&ust=1795206345123000&sa=E <https://www.google.com/url?q=http://api.example.com:443&source=gmail&ust=1795206345123000&sa=E>)

It's about 35 lines in TransportContext.fatal(), so SSLSocket and SSLEngine both get it. It only applies in client mode and uses the host and port the application supplied, with no lookup. The text goes through jdk.internal.util.Exceptions as hostInfoExclSocket, like HttpsClient's "Wrong HTTPS hostname" message, so -Djdk.includeInExceptions= turns it off.

Two questions:
1. Sean, the issue is assigned to you. OK if I take it?
2. This changes the default exception text. Is a CSR or release note needed, or would you prefer it opt-in under hostInfo?

The patch and a jtreg test are ready. My OCA is approved (GitHub: davidhsv).

Thanks,
David Vieira

[1] https://www.google.com/url?q=https://bugs.openjdk.org/browse/JDK-8199652&source=gmail&ust=1795206345124000&sa=E <https://www.google.com/url?q=https://bugs.openjdk.org/browse/JDK-8199652&source=gmail&ust=1795206345124000&sa=E>

Reply via email to