aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-10-31 08:22:47 +0000
committerWerner Koch <[email protected]>2014-10-31 08:22:47 +0000
commit433208a5536608c2b40525eebadbbdeb7780d7f2 (patch)
tree22d0ce2a9792b91a938d1d39a622a80897a3a6c5
parentgpg: Remove commented code. (diff)
downloadgnupg-433208a5536608c2b40525eebadbbdeb7780d7f2.tar.gz
gnupg-433208a5536608c2b40525eebadbbdeb7780d7f2.zip
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 <[email protected]>
-rw-r--r--g10/getkey.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 2ddd5894b..279b3d95f 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3012,7 +3012,6 @@ have_secret_key_with_kid (u32 *keyid)
desc.u.kid[1] = keyid[1];
while (!result && !(err = keydb_search (kdbhd, &desc, 1, NULL)))
{
- desc.mode = KEYDB_SEARCH_MODE_NEXT;
err = keydb_get_keyblock (kdbhd, &keyblock);
if (err)
{