Public bug reported:

I have been trying to search for GPG keys on the Mailbox.org HKPS key
server, using the following command:

gpg2 --debug-all --keyserver=hkps://pgp.mailbox.org --search
[email protected]

This, however, fails with the following output:

------------------------------------------------------------
gpg: reading options from '/home/john/.gnupg/gpg.conf'
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat 
trust hashing cardio ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: chan_3 <- # Home: /home/john/.gnupg
gpg: DBG: chan_3 <- # Config: /home/john/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.1.15 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.1.15
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER --clear hkps://pgp.mailbox.org
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_SEARCH -- [email protected]
gpg: DBG: chan_3 <- ERR 1 General error <Unspecified source>
gpg: error searching keyserver: General error
gpg: keyserver search failed: General error
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: secmem usage: 0/65536 bytes in 0 blocks
------------------------------------------------------------

This confused me, as I am perfectly able to connect and find the key by
manually using dirmngr.

What is interesting is that gpg2 is able to connect and find the key
when I prefix the command with sudo:

sudo gpg2 --debug-all --keyserver=hkps://pgp.mailbox.org --search
[email protected]

This outputs the following:

------------------------------------------------------------
gpg: WARNING: unsafe ownership on homedir '/home/john/.gnupg'
gpg: reading options from '/home/john/.gnupg/gpg.conf'
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat 
trust hashing cardio ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: chan_3 <- # Home: /home/john/.gnupg
gpg: DBG: chan_3 <- # Config: /home/john/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.1.15 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.1.15
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER --clear hkps://pgp.mailbox.org
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_SEARCH -- [email protected]
gpg: DBG: chan_3 <- S PROGRESS tick ? 0 0
gpg: DBG: chan_3 <- S SOURCE https://pgp.mailbox.org:443
gpg: DBG: chan_3 <- D 
info:1:1%0D%0Apub:854f20b818a24864:1:4096:1392491184:1518721584:%0D%0Auid:"mailbox.org
 Support-Team (mailbox.org Support-Team) 
<[email protected]>":1392491184:1518721584:%0D%0A
gpg: data source: https://pgp.mailbox.org:443
gpg: DBG: chan_3 <- OK
gpg: DBG: iobuf-1.0: close '?'
(1)     "mailbox.org Support-Team (mailbox.org Support-Team) <support@mailbox.
   4096 bit RSA key 854F20B818A24864, created: 2014-02-15, expires: 2018-02-15
Keys 1-1 of 1 for "[email protected]".  Enter number(s), N)ext, or Q)uit > Q
gpg: error searching keyserver: Operation cancelled
gpg: keyserver search failed: Operation cancelled
gpg: DBG: chan_3 -> BYE
gpg: DBG: [not enabled in the source] stop
gpg: random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
gpg: secmem usage: 0/65536 bytes in 0 blocks
------------------------------------------------------------

I am using version 17.04 of Ubuntu, and version 2.1.15-1ubuntu7 of
gnupg2. Thanks for any help. This really does seem like a bug.

Edit: to clarify, when I manually used dirmngr, I did not use sudo.

** Affects: gnupg2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: dirmngr hkps keys

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1724688

Title:
  gpg2 can only connect to HKPS keyserver with sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1724688/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to