diff options
Diffstat (limited to 'lib/nickserver/hkp')
-rw-r--r-- | lib/nickserver/hkp/fetch_key.rb | 4 | ||||
-rw-r--r-- | lib/nickserver/hkp/fetch_key_info.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/nickserver/hkp/fetch_key.rb b/lib/nickserver/hkp/fetch_key.rb index c24b2c7..44621d3 100644 --- a/lib/nickserver/hkp/fetch_key.rb +++ b/lib/nickserver/hkp/fetch_key.rb @@ -26,8 +26,8 @@ module Nickserver; module HKP # fetches ascii armored OpenPGP public key from the keyserver # def get_key_by_fingerprint(key_id) - params = {:op => 'get', :search => "0x" + key_id, :exact => 'on', :options => 'mr'} - http = EventMachine::HttpRequest.new(Config.hkp_url).get(:query => params) + params = {op: 'get', search: "0x" + key_id, exact: 'on', options: 'mr'} + http = EventMachine::HttpRequest.new(Config.hkp_url).get(query: params) http.callback { if http.response_header.status != 200 self.fail http.response_header.status, "HKP Request failed" diff --git a/lib/nickserver/hkp/fetch_key_info.rb b/lib/nickserver/hkp/fetch_key_info.rb index bc12488..2448bb1 100644 --- a/lib/nickserver/hkp/fetch_key_info.rb +++ b/lib/nickserver/hkp/fetch_key_info.rb @@ -10,8 +10,8 @@ module Nickserver; module HKP def search(uid) # in practice, exact=on seems to have no effect - params = {:op => 'vindex', :search => uid, :exact => 'on', :options => 'mr', :fingerprint => 'on'} - EventMachine::HttpRequest.new(Config.hkp_url).get(:query => params).callback {|http| + params = {op: 'vindex', search: uid, exact: 'on', options: 'mr', fingerprint: 'on'} + EventMachine::HttpRequest.new(Config.hkp_url).get(query: params).callback {|http| parser = ParseKeyInfo.new http.response_header, http.response keys = parser.keys(uid) if keys.any? |