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#check_chain
check_chain(chain, time)
lib/rubygems/security/policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/rubygems/security/policy.rb, line 55
def check_chain(chain, time)
raise Gem::Security::Exception, "missing signing chain" unless chain
raise Gem::Security::Exception, "empty signing chain" if chain.empty?
begin
chain.each_cons 2 do |issuer, cert|
check_cert cert, issuer, time
end
true
rescue Gem::Security::Exception => e
raise Gem::Security::Exception, "invalid signing chain: #{e.message}"
end
end
Verifies each certificate in chain has signed the following certificate and is valid for the given time.