Page MenuHome GnuPG

«keyserver receive failed: General error» when using HKPS
Closed, ResolvedPublic

Description

When using HKPS, invoking recv-key on GnuPG 2.1.6 fails with a «general error».

This might be the same issue reported in T1851
. The issue was reported to be fixed in 2.1.3, but I still run into it on 2.1.6.

$ gpg --recv-keys 5EE1DBA789C809CB
gpg: reading options from '/home/seb/.gnupg/gpg.conf'
gpg: enabled debug flags: ipc
gpg: DBG: chan_3 <- # Home: /home/seb/.gnupg
gpg: DBG: chan_3 <- # Config: /home/seb/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.1.6 at your service
gpg: DBG: chan_4 <- # Home: /home/seb/.gnupg
gpg: DBG: chan_4 <- # Config: /home/seb/.gnupg/dirmngr.conf
gpg: DBG: chan_4 <- OK Dirmngr 2.1.6 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_4 -> KEYSERVER --clear hkps://hkps.pool.sks-keyservers.net
gpg: DBG: chan_4 <- OK
gpg: DBG: chan_4 -> KS_GET -- 0x5EE1DBA789C809CB
gpg: DBG: chan_4 <- ERR 1 General error <Unspecified source>
gpg: keyserver receive failed: General error
gpg: DBG: chan_4 -> BYE
gpg: secmem usage: 0/32768 bytes in 0 blocks

Details

Version
2.1.8

Event Timeline

zardoz added a project: Bug Report.
zardoz added a subscriber: zardoz.

Please put

verbose
debug ipc
log-file FOO

into dirmngr.conf and try with 2.1.7. Make sure to shutdown running dirmngr
processes before testing.

So, is there anything else you might need to understand this issue (that is
still present with 2.1.8 by the way)?

The log clearly states the problem:

2015-10-09 10:27:37 dirmngr[2516.0] TLS verification of peer failed: The
certificate is NOT trusted. The certificate issuer is unknown.

Please see https://sks-keyservers.net/overview-of-pools.php#pool_hkps for how to
configure gpg properly. With the CA for the pool, this works as expected.
(remember to kill the old dirmngr daemon):

% gpg2 --keyserver hkps://hkps.pool.sks-keyservers.net --recv-keys
5EE1DBA789C809CB
gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
gpg: It is only intended for test purposes and should NOT be
gpg: used in a production environment or with production keys!
gpg: key 89C809CB: public key "git-annex distribution signing key (for Joey
Hess) <id@joeyh.name>" imported
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Total number processed: 1
gpg: imported: 1

OK, so things have changed regarding how this is handled since 2.1. That’s
probably why people like me think it’s still bogus, because behind the true bug
there was also another underlying change.

I can confirm it now works once correctly configured. Thanks for your help.

This, 2123 and 2130 can be closed I think.

werner claimed this task.