How to send a key to a keyserver?

Helmut Waitzmann ml.throttle at xoxy.net
Mon Mar 2 02:45:09 CET 2015


Kristian Fiskerstrand <kristian.fiskerstrand at sumptuouscapital.com> writes:

>On 02/27/2015 12:57 PM, Philip Jackson wrote:
>> On 26/02/15 18:15, Helmut Waitzmann wrote:
>>> I tried
>>> 
>>> gpg2 --verbose --keyserver hkp://pool.sks-keyservers.net
>>> --send-keys -- 72ABFF0923A87CF22D0ED7C4FDEE765D017077F1
>>> 
>>> and got the message
>>> 
>>> gpg: sending key FDEE765D017077F1 to hkp server
>>> pool.sks-keyservers.net gpgkeys: HTTP post error 22: The
>>> requested URL returned error: 417 gpg: keyserver internal error 
>>> gpg: keyserver send failed: Keyserver error

>417 really shouldn't happen for any of the servers in the pool, as it
>is explicitly checked that this return code should not be used.

>For 1.4/2.0, please use --keyserver-options debug,verbose to get more
>information about the interaction from the curl helpers, this will be
>useful for debugging.

+ gpg2 --version
gpg (GnuPG) 2.0.14
libgcrypt 1.4.5
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/helmut/helmut/private/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, 
        CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

+ gpg2 --verbose --keyserver-options debug,verbose --keyserver hkp://pool.sks-keyservers.net --send-keys -- 72ABFF0923A87CF22D0ED7C4FDEE765D017077F1
gpg: sending key FDEE765D017077F1 to hkp server pool.sks-keyservers.net
gpgkeys: curl version = libcurl/7.21.0 GnuTLS/2.8.6 zlib/1.2.3.4 libidn/1.15
* About to connect() to proxy proxy.zuhause.test port 3128 (#0)
*   Trying 192.168.0.1... * connected
* Connected to proxy.zuhause.test (192.168.0.1) port 3128 (#0)
> POST http://pool.sks-keyservers.net:11371/pks/add HTTP/1.1
Host: pool.sks-keyservers.net:11371
Accept: */*
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 3239
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

* The requested URL returned error: 417
* Closing connection #0
gpgkeys: HTTP post error 22: The requested URL returned error: 417
gpg: keyserver internal error
gpg: keyserver send failed: Keyserver error
+ printf 'exit code: %s\n' 2
exit code: 2

Ah!  gpg is using my http proxy.  proxy.zuhause.test is only known to my
own DNS service, resolving (after following an alias) to IP address
192.168.0.1.

Issuing same gpg2-command again, after unsetting the environment
variable http_proxy:

+ gpg2 --verbose --keyserver-options debug,verbose --keyserver hkp://pool.sks-keyservers.net --send-keys -- 72ABFF0923A87CF22D0ED7C4FDEE765D017077F1
gpg: sending key FDEE765D017077F1 to hkp server pool.sks-keyservers.net
gpgkeys: curl version = libcurl/7.21.0 GnuTLS/2.8.6 zlib/1.2.3.4 libidn/1.15
* About to connect() to pool.sks-keyservers.net port 11371 (#0)
*   Trying 23.226.129.243... * connected
* Connected to pool.sks-keyservers.net (23.226.129.243) port 11371 (#0)
> POST /pks/add HTTP/1.1
Host: pool.sks-keyservers.net:11371
Accept: */*
Pragma: no-cache
Cache-Control: no-cache
Content-Length: 3239
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Date: Mon, 02 Mar 2015 01:31:08 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 129
< Connection: keep-alive
< Server: sks_www/1.1.5
< Cache-Control: no-cache
< Pragma: no-cache
< Expires: 0
< X-HKP-Results-Count: 1
< Access-Control-Allow-Origin: *
< Via: 1.1 keys.jhcloos.com:11371 (nginx)
< 
* Connection #0 to host pool.sks-keyservers.net left intact
* Closing connection #0
+ printf 'exit code: %s\n' 0
exit code: 0

So it's a problem with my http proxy?



More information about the Gnupg-users mailing list