RFR: 8241372: Several test failures due to javax.net.ssl.SSLException: Connection reset [v2]
Fernando Guallini
fguallini at openjdk.java.net
Fri Feb 5 10:51:42 UTC 2021
On Thu, 4 Feb 2021 15:11:39 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Fernando Guallini has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Merge branch '8241372' of github.com:fguallini/jdk into 8241372
>> - remove not needed bug id from tests, run with preferIPv4Stack
>
> test/jdk/sun/security/ssl/SSLSocketImpl/ReverseNameLookup.java line 90:
>
>> 88: (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
>> 89: InetSocketAddress socketAddress =
>> 90: new InetSocketAddress(InetAddress.getLoopbackAddress(), serverPort);
>
> The client is using 127.0.0.1. InetAddress.getLoopbackAddress() might return ::1 (IPv6 loopback) on certain configurations.
> Two possibility:
> 1. run this test with -Djava.net.preferIPv4Stack to force usage of IPv4, but trivially pass if IPv4 is not available on the machine (see IPSupport in the test library)
> 2. use InetAddress.getLoopbackAddress().getHostAddress() on the client side instead of "127.0.0.1"
>
> If you choose 2. you may want to add an additional @run the test with -Djava.net.preferIPv6Address to verify that it works with IPv6 - as there are several ways to represent the IPv6 loopback as a string
Applied the first suggestion since, it is using 127.0.0.1 for verification later in the test. Thanks
-------------
PR: https://git.openjdk.java.net/jdk/pull/2405
More information about the security-dev
mailing list