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
)

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

Reply via email to