End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::Security::Policy#check_key
check_key(signer, key)
lib/rubygems/security/policy.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/security/policy.rb, line 111
def check_key(signer, key)
unless signer and key
return true unless @only_signed
raise Gem::Security::Exception, 'missing key or signature'
end
public_key = Gem::Security.get_public_key(key)
raise Gem::Security::Exception,
"certificate #{signer.subject} does not match the signing key" unless
signer.public_key.to_pem == public_key.to_pem
true
end
Ensures the public key of key matches the public key in signer
See also
#check_data
#check_root
#check_chain
#check_trust
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1