End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Security::TrustDir#each_certificate
each_certificate() { |certificate, certificate_file| ... }
lib/rubygems/security/trust_dir.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rubygems/security/trust_dir.rb, line 41
def each_certificate
return enum_for __method__ unless block_given?
glob = File.join @dir, "*.pem"
Dir[glob].each do |certificate_file|
begin
certificate = load_certificate certificate_file
yield certificate, certificate_file
rescue OpenSSL::X509::CertificateError
next # HACK warn
end
end
end
Enumerates trusted certificates.