Skip to content

Backport 4.1 Fix propagation of startTls for client SslContext handler - #17020

Merged
chrisvest merged 1 commit into
netty:4.1from
skyguard1:fix_ssl_context_start_tls
Jun 30, 2026
Merged

chrisvest merged 1 commit into
netty:4.1from
skyguard1:fix_ssl_context_start_tls

Conversation

@skyguard1

Copy link
Copy Markdown
Contributor

Motivation:
SslContextBuilder.startTls(true) is not consistently propagated when creating client-side SslContext instances. As a result, a handler created via newHandler(...), especially through the executor-based overloads and the OPENSSL_REFCNT provider path, may behave as if startTls was false.
This is inconsistent with the builder configuration and with the existing SslHandler STARTTLS semantics.
Modifications:
• Propagate the configured startTls flag from SslContextBuilder into client context creation.
• Add compatibility-preserving internal overloads for client context constructors instead of replacing the existing signatures.
• Pass startTls through ReferenceCountedOpenSslContext.newHandler(..., Executor) instead of hard-coding false.
Result:
Client-side handlers created from SslContextBuilder.startTls(true) now preserve STARTTLS behavior across OpenSSL ref-counted providers, including executor-based handler creation.

@chrisvest
chrisvest enabled auto-merge (squash) June 30, 2026 02:28
@chrisvest
chrisvest merged commit b12bd11 into netty:4.1 Jun 30, 2026
18 checks passed
@chrisvest chrisvest added this to the 4.1.136.Final milestone Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants