Error when trying to locate key via WKD

Ingo Klöcker kloecker at kde.org
Wed Oct 27 20:54:28 CEST 2021


On Mittwoch, 27. Oktober 2021 18:16:14 CEST Christoph Klassen via Gnupg-users wrote:
> Hello,
> 
> I tried to get a key via WKD (using the command --locate-keys), but it
> didn't work as expected. The error message I got was:
> 
> gpg: using pgp trust model
> gpg: error retrieving 'christoph-klassen at mail.de' via Local: No public key
> gpg: Note: WKD uses a cached result
> gpg: error retrieving 'christoph-klassen at mail.de' via WKD: No data
> gpg: error reading key: No data
> 
> But when I use the following link (direct method), it is possible to
> download the key:
> 
> https://mail.de/.well-known/openpgpkey/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6

I added
```
log-file <some-absolute-path>/dirmngr.log
debug-level guru
debug-all
```
in dirmngr.conf, ran the command and got the below log.

The important part is
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> GET /.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen HTTP/1.0\r\n
i.e. in the URL that dirmngr requests there is an additional "mail.de"
between "/openpgp/" and "/hu/" that is missing in your URL.

```
[...]
2021-10-27 20:44:04 dirmngr[26980.6] DBG: chan_6 <- WKD_GET -- christoph-klassen at mail.de
2021-10-27 20:44:04 dirmngr[26980.6] DBG: dns: libdns initialized
2021-10-27 20:44:04 dirmngr[26980.6] DBG: dns: resolve_dns_name(openpgpkey.mail.de): Success
2021-10-27 20:44:04 dirmngr[26980.6] DBG: chan_6 -> S SOURCE https://openpgpkey.mail.de
2021-10-27 20:44:04 dirmngr[26980.6] number of system provided CAs: 520
2021-10-27 20:44:04 dirmngr[26980.6] DBG: Using TLS library: GNUTLS 3.7.2
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:connect_server: trying name='openpgpkey.mail.de' port=443
2021-10-27 20:44:04 dirmngr[26980.6] DBG: dns: resolve_dns_name(openpgpkey.mail.de): Success
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:1917:socket_new: object 0x00007efc7404ced0 for fd 7 created
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:request:
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> GET /.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen HTTP/1.0\r\n
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> Host: openpgpkey.mail.de\r\n
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:request-header:
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> \r\n
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:response:
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> HTTP/1.1 301 Moved Permanently\r\n
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: 'Server: nginx'
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: 'Date: Wed, 27 Oct 2021 18:44:04 GMT'
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: 'Content-Type: text/html'
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: 'Content-Length: 162'
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: 'Connection: close'
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: 'Location: https://mail.de/.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen'
2021-10-27 20:44:04 dirmngr[26980.6] http.c:RESP: ''
2021-10-27 20:44:04 dirmngr[26980.6] URL 'https://openpgpkey.mail.de/.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen' redirected to 'https://mail.de/.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen' (301)
2021-10-27 20:44:04 dirmngr[26980.6] DBG: Using TLS library: GNUTLS 3.7.2
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:connect_server: trying name='mail.de' port=443
2021-10-27 20:44:04 dirmngr[26980.6] DBG: dns: resolve_dns_name(mail.de): Success
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:1917:socket_new: object 0x00007efc740157f0 for fd 7 created
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:request:
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> GET /.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen HTTP/1.0\r\n
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> Host: mail.de\r\n
2021-10-27 20:44:04 dirmngr[26980.6] DBG: http.c:request-header:
2021-10-27 20:44:04 dirmngr[26980.6] DBG: >> \r\n
2021-10-27 20:44:05 dirmngr[26980.6] DBG: http.c:response:
2021-10-27 20:44:05 dirmngr[26980.6] DBG: >> HTTP/1.1 404 Not Found\r\n
2021-10-27 20:44:05 dirmngr[26980.6] http.c:RESP: 'Server: nginx'
2021-10-27 20:44:05 dirmngr[26980.6] http.c:RESP: 'Date: Wed, 27 Oct 2021 18:44:05 GMT'
2021-10-27 20:44:05 dirmngr[26980.6] http.c:RESP: 'Content-Type: text/html; charset=UTF-8'
2021-10-27 20:44:05 dirmngr[26980.6] http.c:RESP: 'Content-Length: 13'
2021-10-27 20:44:05 dirmngr[26980.6] http.c:RESP: 'Connection: close'
2021-10-27 20:44:05 dirmngr[26980.6] http.c:RESP: ''
2021-10-27 20:44:05 dirmngr[26980.6] error accessing 'https://mail.de/.well-known/openpgpkey/mail.de/hu/9w5z5jua7mhm8xoha4aixbdx4rotdwm6?l=christoph-klassen': http status 404
2021-10-27 20:44:05 dirmngr[26980.6] command 'WKD_GET' failed: No data
2021-10-27 20:44:05 dirmngr[26980.6] DBG: chan_6 -> ERR 167772218 No data <Dirmngr>
2021-10-27 20:44:05 dirmngr[26980.6] DBG: chan_6 <- BYE
2021-10-27 20:44:05 dirmngr[26980.6] DBG: chan_6 -> OK closing connection
[...]
```

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20211027/9fbf53c5/attachment-0001.sig>


More information about the Gnupg-users mailing list