[git] GnuPG - branch, master, updated. gnupg-2.1.2-19-gc071be6

by Werner Koch cvs at cvs.gnupg.org
Thu Feb 26 18:22:58 CET 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  c071be698efadef1ad01fd3d329d1b486a372927 (commit)
       via  736710aedecfb1cb5ab6293a24f09b433917d7eb (commit)
       via  91baea2dcde6c1e5ca9e8fa7020d9ab4551d1bca (commit)
       via  165094a4453f7ee5522beb080536783ea7bc7f0c (commit)
      from  a9acf10a1522332bbcd427ac52914ce3c9ce85a1 (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 c071be698efadef1ad01fd3d329d1b486a372927
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 26 18:16:45 2015 +0100

    gpg: Lowercase mailbox for PKA lookups.
    
    * common/stringhelp.c (ascii_strlwr): New.
    * common/mbox-util.c (mailbox_from_userid): Downcase result.
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/mbox-util.c b/common/mbox-util.c
index 332f62f..0885f0e 100644
--- a/common/mbox-util.c
+++ b/common/mbox-util.c
@@ -124,8 +124,9 @@ is_valid_mailbox (const char *name)
 
 
 /* Return the mailbox (local-part at domain) form a standard user id.
-   Caller must free the result.  Returns NULL if no valid mailbox was
-   found (or we are out of memory). */
+   All plain ASCII characters in the result are converted to
+   lowercase.  Caller must free the result.  Returns NULL if no valid
+   mailbox was found (or we are out of memory). */
 char *
 mailbox_from_userid (const char *userid)
 {
@@ -176,7 +177,7 @@ mailbox_from_userid (const char *userid)
   else
     errno = EINVAL;
 
-  return result;
+  return result? ascii_strlwr (result): NULL;
 }
 
 
diff --git a/common/stringhelp.c b/common/stringhelp.c
index 7128de5..42e1bcb 100644
--- a/common/stringhelp.c
+++ b/common/stringhelp.c
@@ -804,6 +804,18 @@ ascii_tolower (int c)
     return c;
 }
 
+/* Lowercase all ASCII characters in S.  */
+char *
+ascii_strlwr (char *s)
+{
+  char *p = s;
+
+  for (p=s; *p; p++ )
+    if (isascii (*p) && *p >= 'A' && *p <= 'Z')
+      *p |= 0x20;
+
+  return s;
+}
 
 int
 ascii_strcasecmp( const char *a, const char *b )
diff --git a/common/stringhelp.h b/common/stringhelp.h
index d4fe169..ffef2d5 100644
--- a/common/stringhelp.h
+++ b/common/stringhelp.h
@@ -75,6 +75,7 @@ int ascii_isupper (int c);
 int ascii_islower (int c);
 int ascii_toupper (int c);
 int ascii_tolower (int c);
+char *ascii_strlwr (char *s);
 int ascii_strcasecmp( const char *a, const char *b );
 int ascii_strncasecmp (const char *a, const char *b, size_t n);
 int ascii_memcasecmp( const void *a, const void *b, size_t n );

commit 736710aedecfb1cb5ab6293a24f09b433917d7eb
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 26 18:15:10 2015 +0100

    Remove an unused variable.
    
    --

diff --git a/common/pka.c b/common/pka.c
index c3c68b5..1aa5b33 100644
--- a/common/pka.c
+++ b/common/pka.c
@@ -60,7 +60,6 @@ get_pka_info (const char *address, void *fprbuf, size_t fprbuflen)
   unsigned char *fpr = NULL;
   size_t fpr_len;
   char *url = NULL;
-  gpg_error_t err;
 
   mbox = mailbox_from_userid (address);
   if (!mbox)

commit 91baea2dcde6c1e5ca9e8fa7020d9ab4551d1bca
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 26 18:01:13 2015 +0100

    gpg: Fix memory leak due to PKA lookup.
    
    * g10/keyserver.c (keyserver_import_pka): Move the xfree.

diff --git a/g10/keyserver.c b/g10/keyserver.c
index 477ff17..7cac55e 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1991,8 +1991,8 @@ keyserver_import_pka (ctrl_t ctrl,
 	  rc = keyserver_import_fprint (ctrl, *fpr, 20, spec);
 	  free_keyserver_spec (spec);
 	}
-      xfree (uri);
     }
+  xfree (uri);
 
   if (rc)
     {

commit 165094a4453f7ee5522beb080536783ea7bc7f0c
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Feb 26 15:06:00 2015 +0100

    doc: Fix name of keep-ownertrust.
    
    --
    
    Reported-by: Guilhem Moulin <guilhem at fripost.org>
    (cherry picked from commit 0d286a11c857a8f84b084b6f4e8a38737adca034)

diff --git a/doc/gpg.texi b/doc/gpg.texi
index 79fe234..b90f487 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -2019,7 +2019,7 @@ opposite meaning. The options are:
   generally useful unless a shared keyring scheme is being used.
   Defaults to no.
 
-  @item import-keep-ownertrust
+  @item keep-ownertrust
   Normally possible still existing ownertrust values of a key are
   cleared if a key is imported.  This is in general desirable so that
   a formerly deleted key does not automatically gain an ownertrust

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

Summary of changes:
 common/mbox-util.c  |  7 ++++---
 common/pka.c        |  1 -
 common/stringhelp.c | 12 ++++++++++++
 common/stringhelp.h |  1 +
 doc/gpg.texi        |  2 +-
 g10/keyserver.c     |  2 +-
 6 files changed, 19 insertions(+), 6 deletions(-)


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




More information about the Gnupg-commits mailing list