summaryrefslogtreecommitdiff
path: root/lib/rubygems/security/policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/security/policy.rb')
-rw-r--r--lib/rubygems/security/policy.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/rubygems/security/policy.rb b/lib/rubygems/security/policy.rb
index 3c3cb647ee..06eae073f4 100644
--- a/lib/rubygems/security/policy.rb
+++ b/lib/rubygems/security/policy.rb
@@ -115,11 +115,9 @@ class Gem::Security::Policy
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
+ signer.check_private_key(key)
true
end