On Mon, 8 Jun 2026 14:57:08 GMT, Artur Barashev <[email protected]> wrote:

> SunJSSE implementation of `SSLEngine` throws an IllegalStateException if 
> being used to start a handshake or wrap/unwrap bytes before calling 
> `setUseClientMode()`. Research shows that it's not necessarily needed and the 
> `server` default can be used. We do recommend users to set the desired mode 
> explicitly in `SSLContext` and `SSLContextSpi` javadocs.
> 
> ---------
> - [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/sun/security/ssl/TransportContext.java line 133:

> 131:     private TransportContext(SSLContextImpl sslContext, SSLTransport 
> transport,
> 132:             SSLConfiguration sslConfig, InputRecord inputRecord,
> 133:             OutputRecord outputRecord, boolean existingSSLConfig) {

Do you need the `existingSSLConfig` param? The previous code looked fine, where 
the config is cloned before calling the ctor.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31422#discussion_r3381295914

Reply via email to