[git] GnuPG - branch, gniibe/decryption-key, updated. gnupg-2.2.7-143-g92d3dc9

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Jun 12 09:22:35 CEST 2018


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, gniibe/decryption-key has been updated
       via  92d3dc9e1933cb877fe61942a68a76dcc4aab759 (commit)
      from  ed9030cb2a67148dfafa7f2c0d5a0be67a818397 (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 92d3dc9e1933cb877fe61942a68a76dcc4aab759
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Jun 12 16:20:21 2018 +0900

    g10: Fix enum_secret_keys for card keys.
    
    * g10/skclist.c (enum_secret_keys): Since "KEY-FPR" returns
    fingerprint in binary, change it to hex string.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/skclist.c b/g10/skclist.c
index d40fe6d..fe24b4a 100644
--- a/g10/skclist.c
+++ b/g10/skclist.c
@@ -331,6 +331,7 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk)
     strlist_t sl;
     strlist_t card_list;
     char *serialno;
+    char fpr2[43];
     struct agent_card_info_s info;
     kbnode_t keyblock;
     kbnode_t node;
@@ -350,7 +351,6 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk)
   if (!sk)
     {
       /* Free the context.  */
-      agent_release_card_info (&c->info);
       xfree (c->serialno);
       free_strlist (c->card_list);
       pubkeys_free (c->results);
@@ -419,14 +419,19 @@ enum_secret_keys (ctrl_t ctrl, void **context, PKT_public_key *sk)
                         }
 
                       xfree (serialno);
-                      agent_release_card_info (&c->info);
+                      c->info.fpr2valid = 0;
                       err = agent_scd_getattr ("KEY-FPR", &c->info);
                       if (err)
                         log_error ("error retrieving key fingerprint from card: %s\n",
                                    gpg_strerror (err));
 
                       if (c->info.fpr2valid)
-                        name = c->info.fpr2;
+                        {
+                          c->fpr2[0] = '0';
+                          c->fpr2[1] = 'x';
+                          bin2hex (c->info.fpr2, 20, c->fpr2+2);
+                          name = c->fpr2;
+                        }
                       c->sl = c->sl->next;
                     }
                   else

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

Summary of changes:
 g10/skclist.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list