mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge rubygems master branch from github.com/rubygems/rubygems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ff31b35f6a
commit
615ac35934
62 changed files with 386 additions and 410 deletions
|
@ -149,15 +149,15 @@ class Gem::Commands::CertCommand < Gem::Command
|
|||
end
|
||||
|
||||
def build_cert email, key # :nodoc:
|
||||
expiration_length_days = options[:expiration_length_days]
|
||||
age =
|
||||
if expiration_length_days.nil? || expiration_length_days == 0
|
||||
Gem::Security::ONE_YEAR
|
||||
else
|
||||
Gem::Security::ONE_DAY * expiration_length_days
|
||||
end
|
||||
expiration_length_days = options[:expiration_length_days] ||
|
||||
Gem.configuration.cert_expiration_length_days
|
||||
|
||||
cert = Gem::Security.create_cert_email(
|
||||
email,
|
||||
key,
|
||||
(Gem::Security::ONE_DAY * expiration_length_days)
|
||||
)
|
||||
|
||||
cert = Gem::Security.create_cert_email email, key, age
|
||||
Gem::Security.write cert, "gem-public_cert.pem"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue