[git] GnuPG - branch, master, updated. gnupg-2.1.6-30-g4a326d7

by Werner Koch cvs at cvs.gnupg.org
Tue Aug 4 17:35:26 CEST 2015

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  4a326d7c9a3b09efcccf4de00d6c003829ad89e8 (commit)
      from  f05a63b10428df2878b1bb6fde57a2fc2aa99105 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4a326d7c9a3b09efcccf4de00d6c003829ad89e8
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Aug 4 17:32:08 2015 +0200

    gpg: Fix duplicate key import due to legacy key in keyring.
    * g10/keydb.c (keydb_search_fpr): Skip legacy keys.
    A test case for this problem can be found at
    GnuPG-bug-id: 2031
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/keydb.c b/g10/keydb.c
index 68cf832..3dc9ec7 100644
--- a/g10/keydb.c
+++ b/g10/keydb.c
@@ -1753,10 +1753,17 @@ keydb_search_kid (KEYDB_HANDLE hd, u32 *kid)
 keydb_search_fpr (KEYDB_HANDLE hd, const byte *fpr)
+  gpg_error_t err;
   memset (&desc, 0, sizeof desc);
   desc.mode = KEYDB_SEARCH_MODE_FPR;
   memcpy (desc.u.fpr, fpr, MAX_FINGERPRINT_LEN);
-  return keydb_search (hd, &desc, 1, NULL);
+  do
+    {
+      err = keydb_search (hd, &desc, 1, NULL);
+    }
+  while (gpg_err_code (err) == GPG_ERR_LEGACY_KEY);
+  return err;


Summary of changes:
 g10/keydb.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

The GNU Privacy Guard

More information about the Gnupg-commits mailing list