mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
gpg: Fix testing for secret key availability.
* g10/getkey.c (have_secret_key_with_kid): Do not change the search mode. -- The search mode was accidentally changed to search-next after finding the first keyblock. The intention was to look for a duplicate keyid in the keydb which works by not doing a keydb_search_reset. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
cb46e32628
commit
433208a553
@ -3012,7 +3012,6 @@ have_secret_key_with_kid (u32 *keyid)
|
|||||||
desc.u.kid[1] = keyid[1];
|
desc.u.kid[1] = keyid[1];
|
||||||
while (!result && !(err = keydb_search (kdbhd, &desc, 1, NULL)))
|
while (!result && !(err = keydb_search (kdbhd, &desc, 1, NULL)))
|
||||||
{
|
{
|
||||||
desc.mode = KEYDB_SEARCH_MODE_NEXT;
|
|
||||||
err = keydb_get_keyblock (kdbhd, &keyblock);
|
err = keydb_get_keyblock (kdbhd, &keyblock);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user