Request to add port number to --send-key and --recv-key output

Daniel Roesler diafygi at gmail.com
Sun Jan 11 01:11:56 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Howdy all,

Previously discussed on moderncrypto[1], I'd like to request that output for
- --send-key and --recv-key contain the port number for keys.gnupg.net. Many of
the servers in the sks pool don't mirror the keyserver interface on port 80[2],
so if you copy and paste keys.gnupg.net in a browser, sometimes you see a random
site (which confused and worried me until I figured it out). If the port number
were include, copying and pasting into a browser would have resulted in the
normal sks keyserver HTTP interface.

Here's the requested change:

From:
$ gpg --recv-key "72EFEE3D"
gpg: requesting key 72EFEE3D from hkp server keys.gnupg.net

To:
$ gpg --recv-key "72EFEE3D"
gpg: requesting key 72EFEE3D from hkp server keys.gnupg.net:11371

AND

From:
$ gpg --send-key "72EFEE3D"
gpg: sending key 72EFEE3D to hkp server keys.gnupg.net

To:
$ gpg --send-key "72EFEE3D"
gpg: sending key 72EFEE3D to hkp server keys.gnupg.net:11371

Untested diff from Andy Isaacson:

diff --git a/g10/keyserver.c b/g10/keyserver.c
index 1b2e128..48d0e07 100644
- --- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1746,9 +1746,10 @@ keyserver_put (ctrl_t ctrl, strlist_t keyspecs,
       else
         {
           if (keyserver->host)
- -            log_info (_("sending key %s to %s server %s\n"),
+            log_info (_("sending key %s to %s server %s:%s\n"),
                       keystr (keyblock->pkt->pkt.public_key->keyid),
- -                      keyserver->scheme, keyserver->host);
+                      keyserver->scheme, keyserver->host,
+                      keyserver->port ? keyserver->port : "");
           else
             log_info (_("sending key %s to %s\n"),
                       keystr (keyblock->pkt->pkt.public_key->keyid),

Cheers!
Daniel

[1]: https://moderncrypto.org/mail-archive/messaging/2014/000992.html
[2]: https://sks-keyservers.net/status/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUsb8HAAoJEOf2+tFy7+49wFcQAI1YTW1UXI5PhgLBxcDF3q9E
aXIpVFsg9MDpo/DP0m6cub/tU47fX+0ZT6lVHWtsAcen2RUUeQ+Rbj1Te+TTcuNO
wXT83LgJq/BTYKPWXf+rvUVpFZgOYZbLjY1PIgR3qnM3oBDIDEwGk0Ov2QXIZWhJ
snb6KRQxcxE/tUUNL4MR1zsQk3r4q2pOtV3Q5BTot81jjFFjhdSGEGIpsxyN/12P
ZrV/HHLeINQpfJjcfsduZ8VMTl6X5WZue0uj1RHSM52/WKC57enL+CYudFNFlapj
bBoNw+nR0tKIdTnsF3mNOZVsuD1XoEEv8DvCTaLFWyoQIgv9pGJHDTJPlYJ5/43U
GSd/hd5qUXkPfqwfJ/pP7fvL+wa270M83EAua7ll7aNSMc4ByxEvnYYGD1I3zwzY
gq+X9hAcXTdAGpMfE6nRn0V/Z9BpHofL48ESG55UbqWnawU99uRqv6fJXJwtOhI9
2JxYzA5/EVFMQbKVrsac0lV6wa6qCWf3IKO8BFG0ZPdnjutuUSX3GMpsMUEtjRSe
FzK88woWim9119fvJb4unf1PksbfVu3dQsZr/6jgqoq2WIUmTvMncJc/jYqtgNMv
ILguOcVIIJsuAXNjKkyMmIuhXjkjXT13ySwMfQ9l4LYB059Yopj4DzD4qAEU7QlC
fxUG7fCy20J4Nb68p0TU
=mzlX
-----END PGP SIGNATURE-----



More information about the Gnupg-devel mailing list