Bug 303544 - kgpg key server search does not show last result
Summary: kgpg key server search does not show last result
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: 2.7.x
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-15 10:30 UTC by Klaus Layer
Modified: 2012-07-15 16:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.8.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Layer 2012-07-15 10:30:11 UTC
I am using kgpg 2.7.3 with kubuntu 12.04 64bit. If I search with the key server dialog for a key i.e. B973BA7B kgpg tells me that it did not find the key. My keyserver option in gpg.conf is set to "keyserver  hkp://keys.gnupg.net", same key server is set in kgpg. Doing the same on the command line gpg finds the key. I sniffed with wireshark and found that for all keys that have a hpk info count == 1 kgpg tells the user that the key was not found. For hpk info count > 1 it works as expected.






Reproducible: Always

Steps to Reproduce:
1. search with kgpg for a key were the hpk protocol returns a info field with count 1

Actual Results:  
kgpg does not find keys where hpk info field count is 1

Expected Results:  
kgpg should show that is found the key as for keys with count > 1
Comment 1 Rolf Eike Beer 2012-07-15 11:32:45 UTC
I can't find the key using GnuPG from the commandline:

gpg --keyserver hkp://keys.gnupg.net --search-key B973BA7B
gpg: searching for "B973BA7B" from hkp server keys.gnupg.net
gpg: key "B973BA7B" not found on keyserver
Comment 2 Klaus Layer 2012-07-15 11:45:36 UTC
Hmm, same works for me:

gpg --keyserver hkp://keys.gnupg.net --search-key B973BA7B
gpg: searching for "B973BA7B" from hkp server keys.gnupg.net
(1)     NetBank AG <pgp@netbank.de>
          1024 bit DSA key B973BA7B, created: 2000-09-27

keys.gnupg.net resolves to a key server pool, maybe you got a bad one. To ensure that we test with the same server please use 109.230.243.87.

For this server I get 

gpg --keyserver hkp://109.230.243.87 --search-key B973BA7B
gpg: searching for "B973BA7B" from hkp server 109.230.243.87
(1)     NetBank AG <pgp@netbank.de>
          1024 bit DSA key B973BA7B, created: 2000-09-27

Does this work for your?
Comment 3 Rolf Eike Beer 2012-07-15 11:55:20 UTC
Nope, still returns error. GnuPG 2.0.18 here.
Comment 4 Klaus Layer 2012-07-15 12:29:12 UTC
Well it seems to depend on the gpg version:

gpg2 --version
gpg (GnuPG) 2.0.17
libgcrypt 1.5.0

gpg2 --keyserver hkp://109.230.243.87 --search-key B973BA7B
gpg: searching for "B973BA7B" from hkp server 109.230.243.87
gpg: key "B973BA7B" not found on keyserver

-----
gpg --version
gpg (GnuPG) 1.4.11

gpg --keyserver hkp://109.230.243.87 --search-key B973BA7B
gpg: searching for "B973BA7B" from hkp server 109.230.243.87
(1)     NetBank AG <pgp@netbank.de>
          1024 bit DSA key B973BA7B, created: 2000-09-27

can you please test with gpg. I observe the error when using gpg.
Comment 5 Rolf Eike Beer 2012-07-15 13:09:41 UTC
If I tell my GnuPG to use gpg1 it finds that key. Are you sure your KGpg uses gpg1? And please ask the GnuPG people why this doesn't work anymore with gpg2.
Comment 6 Klaus Layer 2012-07-15 13:41:53 UTC
Yes I am sure that I use gpg. I have set /usr/bin/gpg in the kgpg settings. Where does kgpg store this setting? Can I do anything more to track down this issue?

I have sent a mail to gpg-users for the different search behavior of gpg/gpg2 regarding B973BA7B.
Comment 7 Klaus Layer 2012-07-15 14:30:48 UTC
The guys from gpg-users told me that gpg2 wants the 0x before the key id. Regarding kgpg that does not change anything. Independent of if have set /usr/bin/gpg or /usr/bin/gpg2, it does not find 0xB973BA7B.

This is not limited to that key 0xB973BA7B. Searching for the string pgp@netbank.de also does not work with kgpg. Other examples are 0xDD9B3E3F, 0x46778C6B or 0x1C6CDA58
Comment 8 Rolf Eike Beer 2012-07-15 14:44:50 UTC
Git commit 4999235f1f923993143131384369863c30e03222 by Rolf Eike Beer.
Committed on 12/03/2012 at 20:23.
Pushed by dakon into branch 'KDE/4.8'.

fix keyserver search not showing the last result

(cherry picked from commit 1ad41e005c5759bf5f636f095f549bf3a6d92d0f)
FIXED-IN:4.8.5

This has been sitting on master for a while and is already part of what will
become SC 4.9. Fix it also for 4.8.5.

M  +9    -0    transactions/kgpgkeyserversearchtransaction.cpp
M  +1    -0    transactions/kgpgkeyserversearchtransaction.h

http://commits.kde.org/kgpg/4999235f1f923993143131384369863c30e03222
Comment 9 Klaus Layer 2012-07-15 16:05:17 UTC
Thanks for the fix and for providing this nice piece of software.