You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
certificate verify failed (unable to get certificate CRL) (OpenSSL::SSL::SSLError) #949
The following example fails after installing "OpenSSL 3.6.0":
require'net/http'require'uri'uri=URI('https://example.com')# Creating a POST request, which is a subclass of Net::HTTPGenericRequestrequest=Net::HTTP::Post.new(uri)# Sending the requestNet::HTTP.start(uri.hostname,uri.port,use_ssl: true)do |http|
response=http.request(request)putsresponse.bodyend
With the following error:
/Users/[user]/.local/share/mise/installs/ruby/3.4.6/lib/ruby/3.4.0/net/protocol.rb:46:in 'OpenSSL::SSL::SSLSocket#connect_nonblock': SSL_connect returned=1 errno=0 peeraddr=[2600:1406:5e00:6::17ce:bc12]:443 state=error: certificate verify failed (unable to get certificate CRL) (OpenSSL::SSL::SSLError)
from /Users/bfolkens/.local/share/mise/installs/ruby/3.4.6/lib/ruby/3.4.0/net/protocol.rb:46:in 'Net::Protocol#ssl_socket_connect'
from /Users/bfolkens/.local/share/mise/installs/ruby/3.4.6/lib/ruby/3.4.0/net/http.rb:1736:in 'Net::HTTP#connect'
from /Users/bfolkens/.local/share/mise/installs/ruby/3.4.6/lib/ruby/3.4.0/net/http.rb:1636:in 'Net::HTTP#do_start'
from /Users/bfolkens/.local/share/mise/installs/ruby/3.4.6/lib/ruby/3.4.0/net/http.rb:1625:in 'Net::HTTP#start'
from /Users/bfolkens/.local/share/mise/installs/ruby/3.4.6/lib/ruby/3.4.0/net/http.rb:1064:in 'Net::HTTP.start'
from test.rb:10:in '<main>'
bundle doctor --ssl fails with:
The Gemfile's dependencies are satisfied
Here's your OpenSSL environment:
OpenSSL: 3.3.0
Compiled with: OpenSSL 3.6.0 1 Oct 2025
Loaded with: OpenSSL 3.6.0 1 Oct 2025
Trying connections to https://rubygems.org:
Bundler: success
RubyGems: success
Ruby net/http: failed
Unfortunately, this Ruby can't connect to rubygems.org.
Below affect only Ruby net/http connections:
SSL_CERT_FILE: exists /opt/homebrew/etc/openssl@3/cert.pem
SSL_CERT_DIR: exists /opt/homebrew/etc/openssl@3/certs
Your Ruby can't connect to rubygems.org because you are missing the certificate files OpenSSL needs to verify you are connecting to the genuine rubygems.org servers.
No issues found with the installed bundle
Reacted by Wojciech Wnętrzak, Leo Bergnéhr, Jason J. Liggayu, Djamal, Anton Maminov, Benoit Tigeot, Mohammed Sadiq, Dan Kim, Kirill Zvonov, Greg Wahl and 25 more
Reacted by Georg Ledermann, QUANON, Yuji Hanamura, André Cardoso, Gediminas Rapalavicius and Djamal
Reacted by danoetz, MarcLlobet, ebersoft, Maria Yasinets, jnoel974, PedroSena, Enrico Grillo, Joey kitman, Sanjar Kholmatov, Matt-Kaminski and 6 more
Reacted by Alexander Egorenkov, QUANON, Noah Singer, Mohammed Sadiq, Jon Sully, Benjamin Phillips, Yonk, indigotechtutorials, Thiago Youssef, Darpan Khatri and 1 more
Reacted by Brad Folkens, Miha Rekar, QUANON, Shunsuke Shiina, Alex Pafnutov, Ashton Young, Gio Lodi, jasonben, thoughtbot-summer, Carter Thaxton and 86 more
Reacted by Mir Bhatia, Fauzan Thokan, Andrés Ibáñez Ulloa, Lucas Grüner, Phil Brockwell, Jakub Kosmydel, indigotechtutorials, Prepsa Kayastha, otuo-nan, Ben Rexin and 5 more
Reacted by Shunsuke Shiina, Noah Singer, Kirill Zvonov, Benjamin Phillips, Yonk, indigotechtutorials, Yurii and Darpan Khatri
OpenSSL 3.6.0 appears to have changed the behavior in commit openssl/openssl@b1b4b15, which doesn't look intentional.
At the same time, ruby/openssl shouldn't set that flag by default. It previously had no effect, according to the man page for X509_VERIFY_PARAM_set_flags():
X509_V_FLAG_CRL_CHECK_ALL expands CRL checking to the entire certificate chain if X509_V_FLAG_CRL_CHECK has also been enabled, and is otherwise ignored.
Reacted by QUANON
Reacted by Yavor Dashev, cindyliu923 and Joshua Pinter
I've pushed v3.1.2, v3.2.2, and v3.3.1 to rubygems.org with the change in #950.
Reacted by Thiago Perrotta, Michael Brown, rjhornsby, Brad Folkens, Carter Thaxton, Nicolai Reuschling, Floris Huetink, Jarrett Lusso, Ivan Glushko, Dan Kim and 12 more
Reacted by Brad Folkens, Nicolai Reuschling, Eebs Kobeissi, Lucas Pickstone, Stefan Kroes, Lucas Brandt, Justin Toniazzo, Kev, Kornelius Kalnbach, David Neugebauer and 20 more
@DucNguyenTHT I don't understand what are you talking about. The Ruby OpenSSL (openssl gem) version 3.3.1 was released yesterday for the Ruby OpenSSL 3.3 series. What does the "3.3.4" mean?
I'm currently using OpenSSL 3.3.1 (latest version release) but still had to apply Ledermann's fix in order for this to work. I'm also using: OpenSSL 3.6.0 1 Oct 2025 (Library: OpenSSL 3.6.0 1 Oct 2025). I was under the impression that 3.3.1 fixed this but maybe not?
Reacted by David Crossley, Alex Robbin, Jonathon Taylor, wagnerius, Ivan Goshevski and cornettn
@bkuhlmann for me bundle doctor --ssl works after I installed ruby 3.4.5 with openssl 3.6.0 and openssl 3.3.1 gem
❯ bundle doctor --ssl
The Gemfile's dependencies are satisfied
Here's your OpenSSL environment:
OpenSSL: 3.3.1
Compiled with: OpenSSL 3.6.0 1 Oct 2025
Loaded with: OpenSSL 3.6.0 1 Oct 2025
Trying connections to https://rubygems.org:
Bundler: success
RubyGems: success
Ruby net/http: success
Hooray! This Ruby can connect to rubygems.org.
You are all set to use Bundler and RubyGems.
No issues found with the installed bundle
Oddly, while bundle doctor --ssl works without issue after installing openssl v3.3.1, I am still running into this issue during actual application use. @ledermann's temporary patch resolves it just like for @bkuhlmann.
If it helps, I'm running Ruby 3.4.6 via asdf, which has openssl 3.3.0 installed as the default version of the gem. When I start up a Rails console, the activated version of OpenSSL seems to be 3.3.0 rather than 3.3.1.
I'm currently using OpenSSL 3.3.1 (latest version release) but still had to apply Ledermann's fix in order for this to work. I'm also using: OpenSSL 3.6.0 1 Oct 2025 (Library: OpenSSL 3.6.0 1 Oct 2025). I was under the impression that 3.3.1 fixed this but maybe not?
It's fixed in v3.1.2/v3.2.2/v3.3.1. But you may still be picking up an older release. You can verify it with the OpenSSL::VERSION constant.
A common situation is when your project uses Bundler but openssl isn't listed in the dependency tree. In that case, Bundler will fall back to the original version bundled with Ruby.
I'd recommend adding gem "openssl" to your Gemfile.
FYI, this isn't specific to openssl, but it applies to all "default gems" (which are gradually being converted to bundled gems, and then they always need to be specified explicitly): https://docs.ruby-lang.org/en/master/standard_library_md.html
Reacted by Alex Robbin, Floris Huetink, Junya Ogura, Isaac Bowen, Georg Ledermann, Jarrett Lusso, Brendan Mulholland, Chris Thomson, Joshua Pinter and Jim Crate
Reacted by Alex Robbin and Isaac Bowen
Reacted by Alex Robbin, Csaba Szilveszter-Berei, Isaac Bowen, Jarrett Lusso, Lucas Brandt, Hugo Dornbierer, Chris Thomson and Camilo Vargas A
Reacted by Alex Robbin, David Crossley, Isaac Bowen and Jarrett Lusso
Running on openssl 3.6 installed by homebrew and ruby 3.4.2 via asdf
Reacted by Oleksiy Kovyrin, Fan Yang, Gokulavasan, Merul Patel, Igor Gonchar, Furkan Enes, Yusei Kaida, Martynas Rancys, CJ Howard, Gio Lodi and 1 more
Want to left here for other folks.
Note ruby MIGHT IGNORERUBY_CONFIGURE_OPTS on reinstall and will point to 3.6.0
Unless you will explicitly uninstall that version.
Depending on the version requirements and upgrade strategy you have in your projects, you might consider:
gem'openssl','~> 3.3','>= 3.3.1'
That's because ~> 3.3.1 means >= 3.3.1 and < 3.4.0 so only patch updates will be allowed. To also allow minor updates, we need to use ~> 3.3, followed by >= 3.3.1 to require the patch fix for the OpenSSL issue.
So if you need at least version 3.3.2 but want to continue receiving minor updates (3.4, 3.5, etc.), combining both constraints is the best approach.
Activity
ledermann commentedon Oct 4, 2025
Same here. It looks like
DEFAULT_CERT_STOREis initialized empty, so Ruby cannot verify any SSL connections. I found this temporary workaround:Create
~/.rubyopenssl_default_store.rb:Load it for all Ruby processes, e.g. in your shell config:
rhenium commentedon Oct 4, 2025
Thanks for your report.
OpenSSL::SSL::SSLContext#set_paramsuses the default cert store with theOpenSSL::X509::V_FLAG_CRL_CHECK_ALLflag (and no other flags):openssl/lib/openssl/ssl.rb
Lines 92 to 94 in 7f4886b
OpenSSL 3.6.0 appears to have changed the behavior in commit openssl/openssl@b1b4b15, which doesn't look intentional.
At the same time, ruby/openssl shouldn't set that flag by default. It previously had no effect, according to the man page for
X509_VERIFY_PARAM_set_flags():bfolkens commentedon Oct 4, 2025
Thank you @ledermann !! this worked
Thanks @rhenium for digging into this
ssl: remove OpenSSL::X509::V_FLAG_CRL_CHECK_ALL from the default store
miharekar commentedon Oct 6, 2025
Thanks @rhenium 🙏
rhenium commentedon Oct 6, 2025
I've pushed v3.1.2, v3.2.2, and v3.3.1 to rubygems.org with the change in #950.
[ruby/openssl] ssl: remove OpenSSL::X509::V_FLAG_CRL_CHECK_ALL from t…
junaruga commentedon Oct 7, 2025
@DucNguyenTHT I don't understand what are you talking about. The Ruby OpenSSL (openssl gem) version 3.3.1 was released yesterday for the Ruby OpenSSL 3.3 series. What does the "3.3.4" mean?
bkuhlmann commentedon Oct 7, 2025
Hey, all. 👋
I'm currently using OpenSSL 3.3.1 (latest version release) but still had to apply Ledermann's fix in order for this to work. I'm also using:
OpenSSL 3.6.0 1 Oct 2025 (Library: OpenSSL 3.6.0 1 Oct 2025). I was under the impression that 3.3.1 fixed this but maybe not?Aqualon commentedon Oct 8, 2025
@bkuhlmann for me
bundle doctor --sslworks after I installed ruby 3.4.5 with openssl 3.6.0 and openssl 3.3.1 gemagrobbin commentedon Oct 8, 2025
Oddly, while
bundle doctor --sslworks without issue after installing openssl v3.3.1, I am still running into this issue during actual application use. @ledermann's temporary patch resolves it just like for @bkuhlmann.If it helps, I'm running Ruby 3.4.6 via asdf, which has openssl 3.3.0 installed as the default version of the gem. When I start up a Rails console, the activated version of OpenSSL seems to be 3.3.0 rather than 3.3.1.
rhenium commentedon Oct 8, 2025
It's fixed in v3.1.2/v3.2.2/v3.3.1. But you may still be picking up an older release. You can verify it with the
OpenSSL::VERSIONconstant.A common situation is when your project uses Bundler but
opensslisn't listed in the dependency tree. In that case, Bundler will fall back to the original version bundled with Ruby.I'd recommend adding
gem "openssl"to your Gemfile.FYI, this isn't specific to
openssl, but it applies to all "default gems" (which are gradually being converted to bundled gems, and then they always need to be specified explicitly): https://docs.ruby-lang.org/en/master/standard_library_md.html[ruby/openssl] ssl: remove OpenSSL::X509::V_FLAG_CRL_CHECK_ALL from t…
25 remaining items
fix ssl crl error
fix ssl crl error
Pin to image for Ruby
add openssl dep at version new enough to fix ruby/openssl#949
add openssl dep at version new enough to fix ruby/openssl#949
add openssl dep at version new enough to fix ruby/openssl#949
add openssl dep at version new enough to fix ruby/openssl#949 (#6094)
add openssl dep at version new enough to fix ruby/openssl#949 (#195)
add openssl dep at version new enough to fix ruby/openssl#949 (#89)
Account for SSL Error
fabn commentedon Nov 19, 2025
This fixed that for me: https://www.rubyonmac.dev/certificate-verify-failed-unable-to-get-certificate-crl-openssl-ssl-sslerror
TLDR:
gem "openssl", "~> 3.3.1"in your GemfileRunning on openssl 3.6 installed by homebrew and ruby 3.4.2 via
asdfivanglushko commentedon Nov 26, 2025
Want to left here for other folks.
Note ruby MIGHT IGNORE
RUBY_CONFIGURE_OPTSon reinstall and will point to 3.6.0Unless you will explicitly uninstall that version.
What worked for me:
mokagio commentedon Dec 5, 2025
@fabn thank you for sharing this:
Depending on the version requirements and upgrade strategy you have in your projects, you might consider:
That's because
~> 3.3.1means>= 3.3.1and< 3.4.0so only patch updates will be allowed. To also allow minor updates, we need to use~> 3.3, followed by>= 3.3.1to require the patch fix for the OpenSSL issue.So if you need at least version 3.3.2 but want to continue receiving minor updates (3.4, 3.5, etc.), combining both constraints is the best approach.
jwhitcraft commentedon Dec 12, 2025
This was fixed in openssl yesterday (12/11/25) but not released yet: openssl/openssl@996d50d
monai commentedon Jan 7, 2026
I found another workaround/fix in case OpenSSL is installed via Homebrew:
Then reinstall Ruby: