diff options
Diffstat (limited to 'lib/rubygems/security/signer.rb')
-rw-r--r-- | lib/rubygems/security/signer.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/security/signer.rb b/lib/rubygems/security/signer.rb index 4e835e5b80..5e4ba6ebba 100644 --- a/lib/rubygems/security/signer.rb +++ b/lib/rubygems/security/signer.rb @@ -85,7 +85,6 @@ class Gem::Security::Signer @digest_name = Gem::Security::DIGEST_NAME if @key && !@key.is_a?(OpenSSL::PKey::RSA) - @passphrase ||= ask_for_password("Enter PEM pass phrase:") @key = OpenSSL::PKey::RSA.new(File.read(@key), @passphrase) end @@ -144,6 +143,8 @@ class Gem::Security::Signer raise Gem::Security::Exception, 'no certs provided' if @cert_chain.empty? if @cert_chain.length == 1 and @cert_chain.last.not_after < Time.now + alert("Your certificate has expired, trying to re-sign it...") + re_sign_key( expiration_length: (Gem::Security::ONE_DAY * options[:expiration_length_days]) ) |