End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Security::Policy#verify_signatures
verify_signatures(spec, digests, signatures)
lib/rubygems/security/policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/security/policy.rb, line 280
def verify_signatures(spec, digests, signatures)
chain = spec.cert_chain.map do |cert_pem|
OpenSSL::X509::Certificate.new cert_pem
end
verify chain, nil, digests, signatures, spec.full_name
true
end
Extracts the certificate chain from the spec and calls verify to ensure the signatures and certificate chain is valid according to the policy..