[git] GnuPG - branch, master, updated. gnupg-2.2.7-276-ga5542a4

by NIIBE Yutaka cvs at cvs.gnupg.org
Thu Nov 15 04:31:24 CET 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, master has been updated
       via  a5542a4a702c2210facf58a98bc8d3d16089b6ab (commit)
      from  56022fb304cff884bb52a48e632b7045688786bf (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 a5542a4a702c2210facf58a98bc8d3d16089b6ab
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Nov 15 12:19:02 2018 +0900

    card: Display if KDF is enabled or not.
    
    * g10/call-agent.h (kdf_do_enabled): New field.
    * g10/call-agent.c (learn_status_cb): Set kdf_do_enabled if available.
    * g10/card-util.c (current_card_status): Inform the availability.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/call-agent.c b/g10/call-agent.c
index e9ea82e..2dbacf4 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -707,6 +707,10 @@ learn_status_cb (void *opaque, const char *line)
       xfree (parm->private_do[no]);
       parm->private_do[no] = unescape_status_string (line);
     }
+  else if (keywordlen == 3 && !memcmp (keyword, "KDF", 3))
+    {
+      parm->kdf_do_enabled = 1;
+    }
 
   return 0;
 }
diff --git a/g10/call-agent.h b/g10/call-agent.h
index 1055b5e..1d232f7 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -72,6 +72,7 @@ struct agent_card_info_s
     unsigned int bt:1;     /* Button for confirmation available.  */
   } extcap;
   unsigned int status_indicator;
+  int kdf_do_enabled;      /* Card has a KDF object */
 };
 
 
@@ -193,14 +194,14 @@ gpg_error_t agent_keywrap_key (ctrl_t ctrl, int forexport,
 gpg_error_t agent_import_key (ctrl_t ctrl, const char *desc,
                               char **cache_nonce_addr, const void *key,
                               size_t keylen, int unattended, int force,
-			      u32 *keyid, u32 *mainkeyid, int pubkey_algo);
+                              u32 *keyid, u32 *mainkeyid, int pubkey_algo);
 
 /* Receive a key from the agent.  */
 gpg_error_t agent_export_key (ctrl_t ctrl, const char *keygrip,
                               const char *desc, int openpgp_protected,
                               char **cache_nonce_addr,
                               unsigned char **r_result, size_t *r_resultlen,
-			      u32 *keyid, u32 *mainkeyid, int pubkey_algo);
+                              u32 *keyid, u32 *mainkeyid, int pubkey_algo);
 
 /* Delete a key from the agent.  */
 gpg_error_t agent_delete_key (ctrl_t ctrl, const char *hexkeygrip,
diff --git a/g10/card-util.c b/g10/card-util.c
index a1a099d..bfaac3b 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -618,6 +618,11 @@ current_card_status (ctrl_t ctrl, estream_t fp,
       tty_fprintf (fp,    "PIN retry counter : %d %d %d\n",
                    info.chvretry[0], info.chvretry[1], info.chvretry[2]);
       tty_fprintf (fp,    "Signature counter : %lu\n", info.sig_counter);
+      if (info.extcap.kdf)
+        {
+          tty_fprintf (fp, "KDF setting ......: %s\n",
+                       info.kdf_do_enabled ? "on" : "off");
+        }
       tty_fprintf (fp, "Signature key ....:");
       print_shax_fpr (fp, info.fpr1len? info.fpr1:NULL, info.fpr1len);
       if (info.fpr1len && info.fpr1time)

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

Summary of changes:
 g10/call-agent.c | 4 ++++
 g10/call-agent.h | 5 +++--
 g10/card-util.c  | 5 +++++
 3 files changed, 12 insertions(+), 2 deletions(-)


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




More information about the Gnupg-commits mailing list