On Mon, 18 May 2026 19:20:39 GMT, Volkan Yazici <[email protected]> wrote:

>> Per [RFC 6066 "3. Server Name Indication"], disallow IP literals in 
>> `SNIHostName::new`.
>> 
>> While the following two call-sites could be simplified by removing IP 
>> literal checks, I've refrained from doing so because delegating some of the 
>> checks to an exception catching mechanism would impact the performance:
>> 
>>     sun.security.ssl.Utilities::rawToSNIHostName
>>     sun.net.www.protocol.https.HttpsClient::afterConnect
>> 
>> [RFC 6066 "3. Server Name Indication"]: 
>> https://www.rfc-editor.org/rfc/rfc6066.html#page-6
>> 
>> ---------
>> - [X] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Volkan Yazici has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Apply review feedback

test/jdk/javax/net/ssl/ServerName/SNIHostNameNegativeTest.java line 1:

> 1: /*

We generally try to avoid having separate test classes for positive and for 
negative cases. I suggest combining these 2 tests into one, especially since 
there is a duplicated code between them.

test/jdk/javax/net/ssl/ServerName/SNIHostNamePositiveTest.java line 78:

> 76:                 new Arg<>(false, "123.com"),
> 77:                 new Arg<>(false, "a-b-c.com"),
> 78:                 new Arg<>(false, "\u00ebxample.com"),

Nit: our current convention is to use UTF-8 in tests instead of Unicode escape 
sequences.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30747#discussion_r3261793056
PR Review Comment: https://git.openjdk.org/jdk/pull/30747#discussion_r3261807561

Reply via email to