aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/security/signer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/security/signer.rb')
-rw-r--r--lib/rubygems/security/signer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rubygems/security/signer.rb b/lib/rubygems/security/signer.rb
index 1c9d9b7d3b..0c6ef60a9a 100644
--- a/lib/rubygems/security/signer.rb
+++ b/lib/rubygems/security/signer.rb
@@ -102,6 +102,8 @@ class Gem::Security::Signer
def sign data
return unless @key
+ raise Gem::Security::Exception, 'no certs provided' if @cert_chain.empty?
+
if @cert_chain.length == 1 and @cert_chain.last.not_after < Time.now then
re_sign_key
end