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: How to use new servers
Date Thu, 12 Mar 2020 13:57:56 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 620b810  How to use new servers
620b810 is described below

commit 620b81020aa421456d22f79726ffee58ce50665f
Author: Sebb <sebb@apache.org>
AuthorDate: Thu Mar 12 13:57:46 2020 +0000

    How to use new servers
---
 ks.sh                                                    |  4 ++++
 .../workbench/views/actions/check-signature.json.rb      | 16 ++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/ks.sh b/ks.sh
new file mode 100644
index 0000000..2f7d4d3
--- /dev/null
+++ b/ks.sh
@@ -0,0 +1,4 @@
+SERVER=$1
+curl -s "https://${SERVER}/pks/lookup?search=0x865A0B217CA5AC14&exact=on&options=mr&op=get"
+
+curl -s "https://${SERVER}/pks/lookup?search=0x865A0B217CA5AC14&op=get"
\ No newline at end of file
diff --git a/www/secretary/workbench/views/actions/check-signature.json.rb b/www/secretary/workbench/views/actions/check-signature.json.rb
index 76de085..28b166e 100644
--- a/www/secretary/workbench/views/actions/check-signature.json.rb
+++ b/www/secretary/workbench/views/actions/check-signature.json.rb
@@ -7,10 +7,14 @@ ENV['GNUPGHOME'] = GNUPGHOME if GNUPGHOME
 #KEYSERVER = 'pgpkeys.mit.edu'
 # Perhaps also try keyserver.pgp.com
 # see WHIMSY-274 for secure servers
+# ** N.B. ensure the keyserver URI is known below **
+
 # Removed keys.openpgp.org as it does not return data such as email unless user specifically
allows this 
 #KEYSERVERS = %w{sks-keyservers.net keyserver.ubuntu.com} # don't seem to be working: bad
gateway
 KEYSERVERS = %w{pgp.ocf.berkeley.edu pgpkeys.uk}
-# N.B. ensure the keyserver URI is known below
+
+# ** N.B. ensure the keyserver URI is known below **
+
 MAX_KEY_SIZE = 20700 # don't import if the ascii keyfile is larger than this
 
 message = Mailbox.find(@message)
@@ -82,14 +86,14 @@ begin
       found = false
       if server == 'keys.openpgp.org'
         if keyid.length == 40
-          uri = "https://keys.openpgp.org/vks/v1/by-fingerprint/#{keyid}"
+          uri = "https://#{server}/vks/v1/by-fingerprint/#{keyid}"
         else
-          uri = "https://keys.openpgp.org/vks/v1/by-keyid/#{keyid}"
+          uri = "https://#{server}/vks/v1/by-keyid/#{keyid}"
         end
-      elsif server == 'sks-keyservers.net'
-        uri = "https://sks-keyservers.net/pks/lookup?search=0x#{keyid}&exact=on&options=mr&op=get"
+      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://keyserver.ubuntu.com/pks/lookup?search=0x#{keyid}&op=get"
+        uri = "https://#{server}/pks/lookup?search=0x#{keyid}&op=get"
       else
         raise ArgumentError, "Don't know how to get key from #{server}"
       end


Mime
View raw message