> This PR improves the exceptions thrown from HttpClient.send when the QUIC TLS 
> handshake fails on the client side, for example because the server 
> certificate is not trusted.
> 
> Before the changes we would throw the following exception chain:
> 
> javax.net.ssl.SSLHandshakeException: QUIC connection establishment failed
> Caused by: javax.net.ssl.SSLHandshakeException: QUIC connection establishment 
> failed
> Caused by: java.io.IOException: certificate_unknown
> 
> After the changes the following exception chain is thrown:
> 
> javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX path building 
> failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to 
> find valid certification path to requested target
> Caused by: javax.net.ssl.SSLHandshakeException: (certificate_unknown) PKIX 
> path building failed: 
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
> valid certification path to requested target
> Caused by: sun.security.validator.ValidatorException: PKIX path building 
> failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to 
> find valid certification path to requested target
> Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable 
> to find valid certification path to requested target
> 
> The new exception chain matches the one observed with HTTP 1/2.
> 
> I updated a preexisting test to cover HTTP3, and added assertions to verify 
> the exception message. HttpClient tests continue to pass.

Daniel Jeliński has updated the pull request incrementally with two additional 
commits since the last revision:

 - Use createClientBuilderForH3
 - Import HttpTestServer

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/30563/files
  - new: https://git.openjdk.org/jdk/pull/30563/files/c907be81..1df3a339

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=30563&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30563&range=00-01

  Stats: 6 lines in 1 file changed: 1 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/30563.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30563/head:pull/30563

PR: https://git.openjdk.org/jdk/pull/30563

Reply via email to