Skip to content

Make TLSv1.2 a minimum, add tls_min_version and tls_max_version - #761

Open
eglitobias wants to merge 3 commits into
mainfrom
tls-default-min-version
Open

eglitobias wants to merge 3 commits into
mainfrom
tls-default-min-version

Conversation

@eglitobias

@eglitobias eglitobias commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #760.

Without an explicit tls_protocol, the :TLSv1_2 default was applied as both min and max version, so brokers that only accept TLSv1.3 failed the handshake. TLSv1.2 is now only the lower bound.

The second commit adds tls_min_version and tls_max_version to set the range of versions to negotiate. tls_protocol keeps pinning both bounds but is deprecated, so it could go in the next major release. Version names are now accepted as strings too (e.g. "TLSv1_3" from YAML or ENV), which used to raise ArgumentError.

The third commit warns when tls_protocol is used, in the same style as the warning for :ack.

If you would rather keep this PR to the fix, the second and third commits can be dropped.

The pinning goes back to 2.18.0 (7ec9ee8), not 2.20: ctx.ssl_version = :TLSv1_2 also sets min and max to the same version.

@eglitobias
eglitobias force-pushed the tls-default-min-version branch 2 times, most recently from 2b7261d to cee8d6a Compare November 4, 2026 08:39
@eglitobias eglitobias changed the title Negotiate TLSv1.3 when no tls_protocol is given Negotiate TLSv1.3 by default, add tls_min_version and tls_max_version Nov 4, 2026
@eglitobias
eglitobias force-pushed the tls-default-min-version branch from 6c83fbf to 67a33d2 Compare November 4, 2026 10:16
@eglitobias eglitobias changed the title Negotiate TLSv1.3 by default, add tls_min_version and tls_max_version Make TLSv1.2 a minimum, add tls_min_version and tls_max_version Nov 4, 2026
@eglitobias
eglitobias force-pushed the tls-default-min-version branch from 67a33d2 to d2e4525 Compare November 4, 2026 10:43
The TLSv1.2 default was applied as both min and max version. Fixes #760
Version names are now also accepted as strings.
@eglitobias
eglitobias force-pushed the tls-default-min-version branch from d2e4525 to 7e05971 Compare November 4, 2026 10:47
@eglitobias eglitobias added this to the 3.6.0 milestone Nov 4, 2026
@eglitobias
eglitobias marked this pull request as ready for review November 4, 2026 10:50

This branch has not been deployed

No deployments
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.

Default tls_protocol of :TLSv1_2 is applied as max_version, preventing TLS 1.3

1 participant