Maintenance Ruby 3.4 gets fixes, but no new features. 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.4.1/lib/rubygems/security/policy.rb, line 112
def check_key(signer, key)
unless signer && key
return true unless @only_signed
raise Gem::Security::Exception, "missing key or signature"
end
raise Gem::Security::Exception,
"certificate #{signer.subject} does not match the signing key" unless
signer.check_private_key(key)
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.3 · 3.2 · 3.1 · 3.0