summaryrefslogtreecommitdiff
path: root/lib/rubygems/security
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-03-16 13:48:03 +0900
committerHiroshi SHIBATA <[email protected]>2023-03-17 18:50:55 +0900
commit70164eec0f48a691dd039f55ac897036aa32e5cf ()
treee991dceeb7aa2d730d60ae8ca8ce512fa7517823 /lib/rubygems/security
parentfef0313ec79beab2383e30062803a0f21b198b21 (diff)
[rubygems/rubygems] util/rubocop -A --only Style/RescueModifier
https://.com/rubygems/rubygems/commit/b490379eab
-rw-r--r--lib/rubygems/security/signer.rb12
1 files changed, 10 insertions, 2 deletions
@@ -174,10 +174,18 @@ class Gem::Security::Signer
old_cert = @cert_chain.last
disk_cert_path = File.join(Gem.default_cert_path)
- disk_cert = File.read(disk_cert_path) rescue nil
disk_key_path = File.join(Gem.default_key_path)
- disk_key = OpenSSL::PKey.read(File.read(disk_key_path), @passphrase) rescue nil
return unless disk_key