On Thu, 27 Aug 2026 16:29:37 GMT, Artur Barashev <[email protected]> wrote:

> Main changes:
> - Adding `(SSLEngine | SSLSocket | 
> SSLServerSocket).getSupportedNamedGroups()` public API methods.
> - Adding `ExtendedSSLSession.getNegotiatedNamedGroup()` public API method.
> 
> Additional side-issues being addressed:
> - Repurpose currently unused NamedGroup.namesOf() method
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java line 98:

> 96: 
> 97:     /**
> 98:      * Returns the key exchange named group name negotiated for this 
> session.

I think you can remove "name", it is implied.

src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java line 107:

> 105:      *
> 106:      * @implSpec The default implementation throws
> 107:      *           {@code UnsupportedOperationException}

Add period to end of sentence.

src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java line 108:

> 106:      * @implSpec The default implementation throws
> 107:      *           {@code UnsupportedOperationException}
> 108:      * @return The negotiated key exchange named group name, or {@code 
> null}

s/The/the/ 
(return statements generally start with lower-case letter)
Remove "name" (implied).

src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java line 110:

> 108:      * @return The negotiated key exchange named group name, or {@code 
> null}
> 109:      *         if no named group was negotiated or the handshake has not
> 110:      *         completed

Is it possible to get an `SSLSession` if the handshake has not completed? Other 
methods like `getCipherSuite` don't say they return null if the handshake has 
not completed.

src/java.base/share/classes/javax/net/ssl/ExtendedSSLSession.java line 116:

> 114:      * @since 28
> 115:      */
> 116:     public String getNegotiatedNamedGroup() {

I am thinking we can just call this `getNamedGroup` which would be consistent 
with `getCipherSuite`. This is a session, so what is being returned implicitly 
represents what was negotiated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32560#discussion_r3936926322
PR Review Comment: https://git.openjdk.org/jdk/pull/32560#discussion_r3936958282
PR Review Comment: https://git.openjdk.org/jdk/pull/32560#discussion_r3936946169
PR Review Comment: https://git.openjdk.org/jdk/pull/32560#discussion_r3936999168
PR Review Comment: https://git.openjdk.org/jdk/pull/32560#discussion_r3936935942

Reply via email to