[git] GnuPG - branch, master, updated. gnupg-2.1.9-14-g253afa2

by Neal H. Walfield cvs at cvs.gnupg.org
Mon Oct 19 10:39:20 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  253afa244487dd8129816615ac2865c9fe812aaf (commit)
       via  e56a116f9a1171ccf8b3293887a217953a46fc20 (commit)
       via  55d88454652543c98d74376977d855e394df6c92 (commit)
      from  c2c400714854d5a127a6966200d345d0d6cfc7d4 (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 253afa244487dd8129816615ac2865c9fe812aaf
Author: Neal H. Walfield <neal at g10code.com>
Date:   Mon Oct 19 10:36:21 2015 +0200

    gpg: Fix formatting.
    
    * g10/tofu.c (get_trust): Fix formatting.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/g10/tofu.c b/g10/tofu.c
index 6510927..a7f9e90 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1634,12 +1634,12 @@ get_trust (struct db *dbs, const char *fingerprint, const char *email,
 	if (strcmp (text, "TOFU detected a binding conflict") == 0)
 	  /* No translation.  Use the English text.  */
 	  text =
-	    "Normally, there is only a single key associated with an email"
-	    "address.  However, people sometimes generate a new key if"
-	    "their key is too old or they think it might be compromised."
-	    "Alternatively, a new key may indicate a man-in-the-middle attack!"
-	    "Before accepting this key, you should talk to or call the person"
-	    "to make sure this new key is legitimate.";
+	    "Normally, there is only a single key associated with an email "
+	    "address.  However, people sometimes generate a new key if "
+	    "their key is too old or they think it might be compromised.  "
+	    "Alternatively, a new key may indicate a man-in-the-middle"
+	    "attack!  Before accepting this key, you should talk to or "
+	    "call the person to make sure this new key is legitimate.";
 	es_fprintf (fp, "\n%s\n", text);
       }
 

commit e56a116f9a1171ccf8b3293887a217953a46fc20
Author: Neal H. Walfield <neal at g10code.com>
Date:   Mon Oct 19 10:35:38 2015 +0200

    gpg: Don't forget to free some memory.
    
    * g10/tofu.c (tofu_register): Free SIG_DIGEST before returning.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/g10/tofu.c b/g10/tofu.c
index 2d4c738..6510927 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -2248,6 +2248,7 @@ tofu_register (const byte *fingerprint_bin, const char *user_id,
   xfree (fingerprint);
   if (dbs)
     closedbs (dbs);
+  xfree (sig_digest);
 
   return trust_level;
 }

commit 55d88454652543c98d74376977d855e394df6c92
Author: Neal H. Walfield <neal at g10code.com>
Date:   Mon Oct 19 10:34:15 2015 +0200

    gpg: If a conflict occurs in batch mode, record that.
    
    * g10/tofu.c (get_trust): If a conflict occurs when MAY_ASK is false,
    set conflict to the key.  When prompting the user, don't show the
    conflicting key if the conflicting key is the current key.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/g10/tofu.c b/g10/tofu.c
index 9b21d86..2d4c738 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1450,7 +1450,10 @@ get_trust (struct db *dbs, const char *fingerprint, const char *email,
 	es_fprintf (fp, _("The binding %s is NOT known.  "), binding);
 	binding_shown = 1;
       }
-    else if (policy == TOFU_POLICY_ASK && conflict)
+    else if (policy == TOFU_POLICY_ASK
+	     /* If there the conflict is with itself, then don't
+		display this message.  */
+	     && conflict && strcmp (conflict, fingerprint) != 0)
       {
 	es_fprintf (fp,
 		    _("%s raised a conflict with this binding.  Since this"
@@ -1718,11 +1721,22 @@ get_trust (struct db *dbs, const char *fingerprint, const char *email,
  out:
   if (change_conflicting_to_ask)
     {
-      rc = sqlite3_exec_printf
-	(db, NULL, NULL, &err,
-	 "update bindings set policy = %d, conflict = %Q"
-	 " where email = %Q and fingerprint != %Q and policy = %d;",
-	 TOFU_POLICY_ASK, fingerprint, email, fingerprint, TOFU_POLICY_AUTO);
+      if (! may_ask)
+	/* If we weren't allowed to ask, also update this key as
+	   conflicting with itself.  */
+	rc = sqlite3_exec_printf
+	  (db, NULL, NULL, &err,
+	   "update bindings set policy = %d, conflict = %Q"
+	   " where email = %Q"
+	   "  and (policy = %d or (policy = %d and fingerprint = %Q));",
+	   TOFU_POLICY_ASK, fingerprint, email, TOFU_POLICY_AUTO,
+	   TOFU_POLICY_ASK, fingerprint);
+      else
+	rc = sqlite3_exec_printf
+	  (db, NULL, NULL, &err,
+	   "update bindings set policy = %d, conflict = %Q"
+	   " where email = %Q and fingerprint != %Q and policy = %d;",
+	   TOFU_POLICY_ASK, fingerprint, email, fingerprint, TOFU_POLICY_AUTO);
       if (rc)
 	{
 	  log_error (_("error changing TOFU policy: %s\n"), err);

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

Summary of changes:
 g10/tofu.c | 39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)


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




More information about the Gnupg-commits mailing list