[git] GnuPG - branch, master, updated. gnupg-2.1.21-139-gd8e46f1

by Marcus Brinkmann cvs at cvs.gnupg.org
Mon Jul 24 16:05:50 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, master has been updated
       via  d8e46f10698da0bee4cd58d95f1f9832bdda0c5f (commit)
      from  5dac85fba78075b525a9aab24ea079fc4addf372 (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 d8e46f10698da0bee4cd58d95f1f9832bdda0c5f
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date:   Mon Jul 24 16:03:25 2017 +0200

    g10: Make sure to emit NEED_PASSPHRASE on --export-secret-key.
    
    * call-agent.h (agent_export_key): Add keyid parameters.
    * call-agent.c (agent_export_key): Set keyid parameters.
    * export.c (receive_seckey_from_agent): Pass keyid parameters.
    
    Signed-off-by: Marcus Brinkmann <mb at g10code.com>
    GnuPG-bug-id: 2667

diff --git a/g10/call-agent.c b/g10/call-agent.c
index 3ad13e8..b17c2e6 100644
--- a/g10/call-agent.c
+++ b/g10/call-agent.c
@@ -2152,7 +2152,8 @@ agent_import_key (ctrl_t ctrl, const char *desc, char **cache_nonce_addr,
 gpg_error_t
 agent_export_key (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
                   int openpgp_protected, char **cache_nonce_addr,
-                  unsigned char **r_result, size_t *r_resultlen)
+                  unsigned char **r_result, size_t *r_resultlen,
+		  u32 *keyid, u32 *mainkeyid, int pubkey_algo)
 {
   gpg_error_t err;
   struct cache_nonce_parm_s cn_parm;
@@ -2164,6 +2165,9 @@ agent_export_key (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
 
   memset (&dfltparm, 0, sizeof dfltparm);
   dfltparm.ctrl = ctrl;
+  dfltparm.keyinfo.keyid       = keyid;
+  dfltparm.keyinfo.mainkeyid   = mainkeyid;
+  dfltparm.keyinfo.pubkey_algo = pubkey_algo;
 
   *r_result = NULL;
 
diff --git a/g10/call-agent.h b/g10/call-agent.h
index a04fc73..dcabbe8 100644
--- a/g10/call-agent.h
+++ b/g10/call-agent.h
@@ -192,7 +192,8 @@ gpg_error_t agent_import_key (ctrl_t ctrl, const char *desc,
 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);
+                              unsigned char **r_result, size_t *r_resultlen,
+			      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/export.c b/g10/export.c
index ce79a2f..8f6371b 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -1190,7 +1190,8 @@ receive_seckey_from_agent (ctrl_t ctrl, gcry_cipher_hd_t cipherhd,
 
   prompt = gpg_format_keydesc (ctrl, pk, FORMAT_KEYDESC_EXPORT,1);
   err = agent_export_key (ctrl, hexgrip, prompt, !cleartext, cache_nonce_addr,
-                          &wrappedkey, &wrappedkeylen);
+                          &wrappedkey, &wrappedkeylen,
+			  pk->keyid, pk->main_keyid, pk->pubkey_algo);
   xfree (prompt);
 
   if (err)

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

Summary of changes:
 g10/call-agent.c | 6 +++++-
 g10/call-agent.h | 3 ++-
 g10/export.c     | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list