class Gem::Commands::CertCommand

def build_key # :nodoc:

:nodoc:
def build_key # :nodoc:
  return options[:key] if options[:key]
  passphrase = ask_for_password 'Passphrase for your Private Key:'
  say "\n"
  passphrase_confirmation = ask_for_password 'Please repeat the passphrase for your Private Key:'
  say "\n"
  raise Gem::CommandLineError,
        "Passphrase and passphrase confirmation don't match" unless passphrase == passphrase_confirmation
  key      = Gem::Security.create_key
  key_path = Gem::Security.write key, "gem-private_key.pem", 0600, passphrase
  return key, key_path
end