[git] GnuPG - branch, master, updated. gnupg-2.1.7-5-gbba74cd

by Ben Kibbey cvs at cvs.gnupg.org
Sun Aug 16 22:14:56 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  bba74cdd95ea98b5a7c3a12823b229341e91504e (commit)
       via  93f5295df512269dd8fecbd649b11cbacf78e864 (commit)
      from  f126ca61565922b3b938c3486614b9bd7e6e454c (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 bba74cdd95ea98b5a7c3a12823b229341e91504e
Author: Ben Kibbey <bjk at luxsci.net>
Date:   Sun Aug 16 13:46:59 2015 -0400

    Fix pinentry loopback and passphrase contraints.
    
    * agent/command.c (cmd_get_passphrase): Don't repeat passphrase for
    pinentry loopback mode.
    * agent/genkey.c (check_passphrase_constraints): Immediately return when
    pinentry mode is loopback.
    
    --
    Fixes endless loop when inquiring a passphrase with
    pinentry-mode=loopback that may not satisfy passphrase contraints.

diff --git a/agent/command.c b/agent/command.c
index 62a4628..f09a2ff 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -1541,6 +1541,9 @@ cmd_get_passphrase (assuan_context_t ctx, char *line)
             {
               char *response2;
 
+              if (ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK)
+                break;
+
               rc = agent_get_passphrase (ctrl, &response2, desc2, prompt,
                                          errtext, 0,
 					 cacheid, CACHE_MODE_USER);
diff --git a/agent/genkey.c b/agent/genkey.c
index df17880..af53c60 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -189,6 +189,9 @@ check_passphrase_constraints (ctrl_t ctrl, const char *pw,
   char *msg2 = NULL;
   char *msg3 = NULL;
 
+  if (ctrl && ctrl->pinentry_mode == PINENTRY_MODE_LOOPBACK)
+    return 0;
+
   if (!pw)
     pw = "";
 

commit 93f5295df512269dd8fecbd649b11cbacf78e864
Author: Ben Kibbey <bjk at luxsci.net>
Date:   Sun Aug 16 12:23:21 2015 -0400

    Fix sending INQUIRE_MAXLEN for symmetric data.
    
    * g10/passphrase.c (passphrase_to_dek_ext): Write the status message.

diff --git a/g10/passphrase.c b/g10/passphrase.c
index 08984ef..5eb2562 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -533,6 +533,14 @@ passphrase_to_dek_ext (u32 *keyid, int pubkey_algo,
 	  s2k_cacheid = s2k_cacheidbuf;
 	}
 
+      if (opt.pinentry_mode == PINENTRY_MODE_LOOPBACK)
+        {
+          char buf[32];
+
+          snprintf (buf, sizeof (buf), "%u", 100);
+          write_status_text (STATUS_INQUIRE_MAXLEN, buf);
+        }
+
       /* Divert to the gpg-agent. */
       pw = passphrase_get (keyid, mode == 2, s2k_cacheid,
                            (mode == 2 || mode == 4)? opt.passphrase_repeat : 0,

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

Summary of changes:
 agent/command.c  | 3 +++
 agent/genkey.c   | 3 +++
 g10/passphrase.c | 8 ++++++++
 3 files changed, 14 insertions(+)


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




More information about the Gnupg-commits mailing list