# File lib/rhc-common.rb, line 242
  def self.get_ssh_keys(libra_server, rhlogin, password, net_http)
    data = {'rhlogin' => rhlogin, 'action' => 'list-keys'}
    if @mydebug
      data[:debug] = true
    end
    print_post_data(data)
    json_data = generate_json(data)

    url = URI.parse("https://#{libra_server}/broker/ssh_keys")
    response = http_post(net_http, url, json_data, password)

    unless response.code == '200'
      if response.code == '401'
        puts "Invalid user credentials"
        exit 97
      else
        print_response_err(response)
      end
      exit 1
    end
    begin
      json_resp = JSON.parse(response.body)
    rescue JSON::ParserError
      exit 1
    end
    update_server_api_v(json_resp)
    begin
      ssh_keys = (JSON.parse(json_resp['data'].to_s))
    rescue JSON::ParserError
      exit 1
    end
    ssh_keys
  end