8369950: TLS connection to IPv6 address fails with BCJSSE due to IllegalArgumentException#348
8369950: TLS connection to IPv6 address fails with BCJSSE due to IllegalArgumentException#348rm-gh-8 wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back rm-gh-8! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
|
/approval request for backport of JDK-8369950: TLS connection to IPv6 address fails with BCJSSE due to IllegalArgumentException. This PR fixes HttpsURLConnection to comply with RFC 6066 by preventing SNI hostname from being set when connecting to literal IPv4 or IPv6 addresses, resolving failures with external JSSE providers like BCJSSE that reject non-LDH ASCII characters in SNI hostnames, and aligning behavior with the existing SSLSocketImpl implementation that already skips SNI construction for IP address literals. This is a regression that last worked in Last worked in version 17.0.16. This is a prerequisite for JDK-8376031 (dependent PR #349), which is to be added for parity with Oracle JDK. Low risk - this is a standards compliance fix that resolves actual failures with external JSSE providers (BCJSSE) by |
|
HI @rm-gh-8 |
Backporting JDK-8369950: TLS connection to IPv6 address fails with BCJSSE due to IllegalArgumentException.
This PR fixes HttpsURLConnection to comply with RFC 6066 by preventing SNI hostname from being set when connecting to literal IPv4 or IPv6 addresses, resolving failures with external JSSE providers like BCJSSE that reject non-LDH ASCII characters in SNI hostnames, and aligning behavior with the existing SSLSocketImpl implementation that already skips SNI construction for IP address literals.
This is a regression that last worked in Last worked in version 17.0.16.
This is a prerequisite for JDK-8376031 (dependent PR #349), which is to be added for parity with Oracle JDK.
Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
make test TEST=test/jdk/javax/net/ssl/HttpsURLConnection/SubjectAltNameIP.java
make test TEST=test/jdk/javax/net/ssl/HttpsURLConnection
Results attached:
windows-x64-specific-test.log
windows-x64-specific-2-test.log
macos-aarch64-specific-test.log
macos-aarch64-specific-2-test.log
linux-x64-specific-test.log
linux-x64-specific-2-test.log
linux-aarch64-specific-test.log
linux-aarch64-specific-2-test.log
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/348/head:pull/348$ git checkout pull/348Update a local copy of the PR:
$ git checkout pull/348$ git pull https://git.openjdk.org/jdk25u-dev.git pull/348/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 348View PR using the GUI difftool:
$ git pr show -t 348Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/348.diff
Using Webrev
Link to Webrev Comment