method
load_default_key
v2_5_5 -
Show latest stable
-
0 notes -
Class: CertCommand
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
load_default_key()
public
Hide source
# File lib/rubygems/commands/cert_command.rb, line 242 def load_default_key key_file = File.join Gem.default_key_path key = File.read key_file passphrase = ENV['GEM_PRIVATE_KEY_PASSPHRASE'] options[:key] = OpenSSL::PKey::RSA.new key, passphrase rescue Errno::ENOENT alert_error "--private-key not specified and ~/.gem/gem-private_key.pem does not exist" terminate_interaction 1 rescue OpenSSL::PKey::RSAError alert_error "--private-key not specified and ~/.gem/gem-private_key.pem is not valid" terminate_interaction 1 end