Repository navigation
Conversation
altruby
commented
Oct 20, 2026
| ) | ||
| fi | ||
| ;; | ||
| pkg) |
Author
There was a problem hiding this comment.
This might not be needed.
It was copied from the code just above this.
Author
There was a problem hiding this comment.
Not required on a default base install.
Removed it.
Fixes postmodern#529 FreeBSD provides OpenSSL as part of its base system and it is configured to use the certs that are also provided as part of the base system (/etc/ssl/cert.pem). The 'openssl' package that ruby-install currently uses does not ship any certs and after install a simple HTTPS request will fail: ``` ruby -rnet/http -e 'p Net::HTTP.get_response(URI.parse("https://google.com"))' /../4.0.0/net/protocol.rb:46:in 'OpenSSL::SSL::SSLSocket#connect_nonblock': SSL_connect returned=1 errno=0 peeraddr=142.250.219.206:443 state=error: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError) OpenSSL error queue reported 0 errors: ``` The 'ca_root_nss' package does provide certs, but not in a location that the OpenSSL package will look. It would require extra steps that are more complicated than depending on the base system's OpenSSL. This change was tested in isolation, on an empty jail that is based on 16-CURRENT. This is the script I used, and it might be useful for your own tests: ```sh set -ex jobs=$(sysctl -n hw.ncpu) if [ "$(id -u)" != "0" ]; then echo "you must be root" exit 1 fi if [ ! -e "/tmp/ruby-install" ]; then bsdinstall jail /tmp/ruby-install fi PREFIX=/usr/local DESTDIR=/tmp/ruby-install make install jail -n ruby-install -c path=/tmp/ruby-install \ host.hostname=ruby-install \ ip4=inherit \ persist \ mount.devfs \ devfs_ruleset=4 \ exec.start="/bin/sh /etc/rc" \ exec.stop="/bin/sh /etc/rc.shutdown jail" pkg -j ruby-install install -y bash curl jexec -u root ruby-install ruby-install "ruby" "4.0.7" "-j" "${jobs}" "--prefix" "/usr/local" jexec -u root ruby-install ruby -rnet/http -e 'p Net::HTTP.get_response(URI("https://ruby-lang.org"))' jail -r ruby-install ```
altruby
force-pushed
the
freebsd_openssl_fix
branch
from
October 20, 2026 09:32
7a9e8e4 to
e1ffea2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
About
Fixes #529
FreeBSD provides OpenSSL as part of its base
system and it is configured to use the certs
that are also provided as part of the base
system (/etc/ssl/cert.pem).
The 'openssl' package that ruby-install currently
uses does not ship any certs and after install a
simple HTTPS request will fail:
The 'ca_root_nss' package does provide certs, but
not in a location that the OpenSSL package will
look. It would require extra steps that are more
complicated than depending on the base system's
OpenSSL.
How I tested
This change was tested in isolation, on an empty
jail that is based on 16-CURRENT. This is the script I used,
and it might be useful for your own tests: