macOS Rubies need Homebrew openssl@4 >= 4.1 since #980; an older 4.x segfaults instead of erroring

Đang mở Phù hợp với người mới
#981 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
82/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, macos, ruby
Lĩnh vực
devops, documentation

Hướng nghiên cứu

Tìm phần về self-hosted runner trong README và đọc hướng dẫn hiện có về việc khớp libssl với image của GitHub. Cập nhật phần này để nêu rõ các bản dựng Ruby 4.0.10 cho macOS arm64 yêu cầu Homebrew openssl@4 phiên bản 4.1.0 trở lên; công việc hoàn tất khi phiên bản tối thiểu được ghi trong tài liệu khớp với phiên bản được báo cáo là hoạt động trong issue. Issue cũng đề xuất thông báo lỗi rõ ràng hơn của setup-ruby khi OpenSSL cũ hơn được tải, nhưng không nêu điểm bắt đầu để triển khai thay đổi đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What changed: since the builds added in #980, the macOS arm64 Rubies link Homebrew openssl@4 instead of openssl@3 (I checked 3.4.13 and 4.0.10). 4.0.10 is built against openssl@4 4.1.0; 4.0.9 linked openssl@3.

What happens with ruby/setup-ruby@v1 and Ruby 4.0.10 on a third-party macOS 26 arm64 runner:

openssl@4 on the machine Result
None gem install bundler fails: OpenSSL is not available
4.0.1 Ruby loads, then OpenSSL::PKCS7#verify([], …) segfaults (backtrace below)
4.1.0 (local repro) Works

Ask: I know the README asks self-hosted runners to match the GitHub image's libssl, so this is expected. Could the self-hosted section mention that macOS builds now need Homebrew openssl@4 at least as new as the one they were built with? A clear error from setup-ruby when the loaded OpenSSL is older than the build's would also have saved a lot of debugging.

Backtrace and repro
[BUG] Segmentation fault at 0x0000000000000000
ruby 4.0.10 (2026-11-19 revision a704b7cd95) +PRISM [arm64-darwin24]
openssl.bundle(ossl_x509_ary2sk0+0x50) ext/openssl/ossl.c:66
openssl.bundle(ossl_pkcs7_verify+0x12c) ext/openssl/ossl_pkcs7.c:797

Reproduced locally with the released 4.0.10 tarball and the script below: it passes with openssl@4 4.1.0, and with the 4.0.1 bottle it segfaults in ossl_x509_ary2sk0 (ossl.c:66) already at OpenSSL::PKCS7.sign(…, [], …).

require 'openssl'

puts "ruby #{RUBY_VERSION}, #{OpenSSL::OPENSSL_LIBRARY_VERSION}, openssl gem #{OpenSSL::VERSION}"

key = OpenSSL::PKey::RSA.new(2048)
cert = OpenSSL::X509::Certificate.new
cert.version = 2
cert.serial = 1
cert.subject = cert.issuer = OpenSSL::X509::Name.parse('/CN=repro')
cert.public_key = key
cert.not_before = Time.now
cert.not_after = Time.now + 3600
cert.sign(key, OpenSSL::Digest.new('SHA256'))

der = OpenSSL::PKCS7.sign(cert, key, '<plist/>', [], OpenSSL::PKCS7::BINARY).to_der

# Same call as fastlane_core/provisioning_profile.rb:115
profile = OpenSSL::PKCS7.new(der)
result = profile.verify([], OpenSSL::X509::Store.new, nil, OpenSSL::PKCS7::NOVERIFY)
puts "verify returned #{result}, data=#{profile.data}"
Ngôn ngữ chính
JavaScript
Star
1k
Fork
381
Merge trung bình
17 giờ 39 phút
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby/setup-ruby

Tất cả issue của ruby/setup-ruby

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.