[git] GnuPG - branch, master, updated. gnupg-2.1.6-29-gf05a63b

by Werner Koch cvs at cvs.gnupg.org
Tue Aug 4 12:30:57 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  f05a63b10428df2878b1bb6fde57a2fc2aa99105 (commit)
      from  d22be79d9b5f40a81d1e1198f7839c38570cd543 (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 f05a63b10428df2878b1bb6fde57a2fc2aa99105
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Aug 4 12:28:17 2015 +0200

    gpg: Properly handle legacy keys while looking for a secret key.
    
    * g10/getkey.c (have_secret_key_with_kid): Skip legacy keys.
    --
    
    This fixes
    GnuPG-bug-id: 2031
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/getkey.c b/g10/getkey.c
index f02e8c2..3a60161 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3058,8 +3058,14 @@ have_secret_key_with_kid (u32 *keyid)
   desc.mode = KEYDB_SEARCH_MODE_LONG_KID;
   desc.u.kid[0] = keyid[0];
   desc.u.kid[1] = keyid[1];
-  while (!result && !(err = keydb_search (kdbhd, &desc, 1, NULL)))
+  while (!result)
     {
+      err = keydb_search (kdbhd, &desc, 1, NULL);
+      if (gpg_err_code (err) == GPG_ERR_LEGACY_KEY)
+        continue;
+      if (err)
+        break;
+
       err = keydb_get_keyblock (kdbhd, &keyblock);
       if (err)
         {
@@ -3085,6 +3091,7 @@ have_secret_key_with_kid (u32 *keyid)
 	}
       release_kbnode (keyblock);
     }
+
   keydb_release (kdbhd);
   return result;
 }

-----------------------------------------------------------------------

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


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list