[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.1-14-g44fb3fb

by Werner Koch cvs at cvs.gnupg.org
Thu Oct 19 18:15:17 CEST 2017


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, STABLE-BRANCH-2-2 has been updated
       via  44fb3fbc85b32552c91f32f099b6b246c12ce0cc (commit)
      from  2c7dccca9b617780a3ea760adf460bb3b77f90f3 (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 44fb3fbc85b32552c91f32f099b6b246c12ce0cc
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Oct 19 18:10:37 2017 +0200

    gpg: Fix creating on-disk subkey with on-card primary key.
    
    * g10/keygen.c (generate_subkeypair): Ignore error code issued for
    trying to verify a card based key.
    --
    
    We try to verify the primary key and thus seed the passphrase cache
    before generating the subkey.  However, the verification does not yet
    work for on-card keys and thus the PASSWD --verify send to the agent
    returns an error.  This patch detects this error and continues without
    a seeded passphrase cache.  After all that pre-seeding is just a
    convenience.
    
    GnuPG-bug-id: 3280
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/keygen.c b/g10/keygen.c
index 2b17a1e..8f30b7e 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -5051,6 +5051,9 @@ generate_subkeypair (ctrl_t ctrl, kbnode_t keyblock, const char *algostr,
     err = agent_passwd (ctrl, hexgrip, desc, 1 /*=verify*/,
                         &cache_nonce, &passwd_nonce);
     xfree (desc);
+    if (gpg_err_code (err) == GPG_ERR_NOT_IMPLEMENTED
+        && gpg_err_source (err) == GPG_ERR_SOURCE_GPGAGENT)
+      err = 0;  /* Very likely that the key is on a card.  */
     if (err)
       goto leave;
   }

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

Summary of changes:
 g10/keygen.c | 3 +++
 1 file changed, 3 insertions(+)


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




More information about the Gnupg-commits mailing list