Skip to content

Allow OpenSSL 4 for Rubies that support it - #2647

Merged
hsbt merged 1 commit into
rbenv:masterfrom
p-linnane:openssl4-support
Oct 22, 2026
Merged

hsbt merged 1 commit into
rbenv:masterfrom
p-linnane:openssl4-support

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

Ruby/OpenSSL 3.2.4, 3.3.3 and 4.0.2 added OpenSSL 4 support and are bundled with Ruby 3.3.12, 3.4.10 and 4.0.6. This widens the needs_openssl upper bound to 4.x.x for those releases and later, including 3.3-dev, 3.4-dev, 4.0-dev, 4.1-dev and ruby-dev, so an installed OpenSSL 4 from the system, pkg-config or Homebrew is used instead of vendoring OpenSSL 3. When both openssl@3 and openssl@4 are installed from Homebrew, these Rubies now link to openssl@4. Older definitions keep their existing bounds and vendored fallbacks.

script/update-cruby applies the same boundaries to new definitions, and two tests in test/build.bats cover a 4.x.x bound.

Verified by building 3.3.12, 3.4.10, 4.0.6 and 4.1.0-preview1 against OpenSSL 4.0.3 on macOS (Homebrew openssl@4) and Ubuntu 24.04 (pkg-config). Each loaded OpenSSL 4.0.3 at runtime and passed its bundled openssl test suite.

Ruby/OpenSSL 3.2.4, 3.3.3 and 4.0.2 added OpenSSL 4 support and ship
with Ruby 3.3.12, 3.4.10 and 4.0.6. Widen the needs_openssl upper
bound to 4.x.x for those releases and later, including the matching
development definitions, so an installed OpenSSL 4 is used instead of
vendoring OpenSSL 3. Make update-cruby apply the same boundaries to
new definitions, and cover a 4.x.x upper bound in the build tests.

Signed-off-by: Patrick Linnane <patrick@linnane.io>

@mislav mislav left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me. Thanks for the heads up and for the changeset!

@hsbt hsbt self-assigned this Oct 16, 2026
@hsbt

hsbt commented Oct 16, 2026

Copy link
Copy Markdown
Member

I will look this at next week 👌

@hsbt

hsbt commented Oct 21, 2026

Copy link
Copy Markdown
Member

I built 3.3.12, 3.4.10, 3.4.11, 4.0.6, 4.0.7 and 4.1.0-preview1 from this branch on macOS (arm64) with both openssl@3 and openssl@4 installed from Homebrew, and each one picked openssl@4, loaded OpenSSL 4.0.3 and passed its bundled openssl tests. Forcing OpenSSL 4 onto 3.3.11, 3.4.9 and 4.0.5 fails to compile ext/openssl, so the boundaries look right to me.

@hsbt hsbt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hsbt
hsbt merged commit 1d2189d into rbenv:master Oct 22, 2026
4 checks passed
@p-linnane
p-linnane deleted the openssl4-support branch October 22, 2026 01:18
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.

3 participants