whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: default to format used by sks-keyserver pool members
Date Tue, 17 Mar 2020 14:39:20 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new c5fff44  default to format used by sks-keyserver pool members
c5fff44 is described below

commit c5fff4407787024f00fe115eb428dab434b4ff73
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Mar 17 14:39:13 2020 +0000

    default to format used by sks-keyserver pool members
---
 www/secretary/workbench/views/actions/check-signature.json.rb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/www/secretary/workbench/views/actions/check-signature.json.rb b/www/secretary/workbench/views/actions/check-signature.json.rb
index 99882ec..b0d27dd 100644
--- a/www/secretary/workbench/views/actions/check-signature.json.rb
+++ b/www/secretary/workbench/views/actions/check-signature.json.rb
@@ -21,12 +21,11 @@ def getServerURI(server, keyid)
     else
       uri = "https://#{server}/vks/v1/by-keyid/#{keyid}"
     end
-  elsif server == 'sks-keyservers.net' or server == 'pgpkeys.uk' or server == 'pgp.ocf.berkeley.edu'
-    uri = "https://#{server}/pks/lookup?search=0x#{keyid}&exact=on&options=mr&op=get"
   elsif server == 'keyserver.ubuntu.com'
     uri = "https://#{server}/pks/lookup?search=0x#{keyid}&op=get"
   else
-    raise ArgumentError, "Don't know how to get key from #{server}"
+    # default to format used by sks-keyserver pool members
+    uri = "https://#{server}/pks/lookup?search=0x#{keyid}&exact=on&options=mr&op=get"
   end
   Wunderbar.warn uri
   return uri
@@ -42,7 +41,7 @@ def getURI(uri,file)
   Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |https|
     https.request_get(uri.request_uri) do |res|
       unless res.code == "200"
-        raise Exception.new "Get #{uri} failed with #{res.code}: #{res.message}"
+        raise Exception.new("Get #{uri} failed with #{res.code}: #{res.message}")
       end
       cl = res.content_length
       Wunderbar.warn "Content-Length: #{cl}"


Mime
View raw message