[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.2.1-25-g65e8ae8

by Andre Heinecke cvs at cvs.gnupg.org
Tue Aug 12 19:13:54 CEST 2014


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 "GnuPG for Windows".

The branch, master has been updated
       via  65e8ae856c72a2b975099ec560d47ebca0d1ca67 (commit)
      from  f529330a98188e237ad8194effb971c052be9879 (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 65e8ae856c72a2b975099ec560d47ebca0d1ca67
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Aug 12 17:12:38 2014 +0000

    Add patch for SKS >= 1.1.5 support in gpgme
    
        * gpgme-1.4.4/
        0001-Handle-modern-keyserver-output-which-may-emit-the-fi.patch: New

diff --git a/patches/gpgme-1.4.4/0001-Handle-modern-keyserver-output-which-may-emit-the-fi.patch b/patches/gpgme-1.4.4/0001-Handle-modern-keyserver-output-which-may-emit-the-fi.patch
new file mode 100755
index 0000000..ff5beb7
--- /dev/null
+++ b/patches/gpgme-1.4.4/0001-Handle-modern-keyserver-output-which-may-emit-the-fi.patch
@@ -0,0 +1,101 @@
+#! /bin/sh
+patch -p1 -f -l $* < $0
+exit $?
+
+From 7a0e7f93f727e82d9404655b96abb0a8558cb2e5 Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk at gnupg.org>
+Date: Tue, 12 Aug 2014 10:36:30 +0200
+Subject: [PATCH] Handle modern keyserver output which may emit the
+ fingerprint.
+
+* src/engine-gpg.c (read_colon_line): Split preprocessed lines.
+(gpg_keylist_preprocess): Limit keyid field and print fingerprint.
+---
+ src/engine-gpg.c | 53 ++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 44 insertions(+), 9 deletions(-)
+
+diff --git a/src/engine-gpg.c b/src/engine-gpg.c
+index 36f035a..924ba44 100644
+--- a/src/engine-gpg.c
++++ b/src/engine-gpg.c
+@@ -1237,10 +1237,26 @@ read_colon_line (engine_gpg_t gpg)
+		    }
+
+		  assert (gpg->colon.fnc);
+-		  gpg->colon.fnc (gpg->colon.fnc_value, line ? line : buffer);
+-		  if (line)
+-		    free (line);
+-		}
++                  if (line)
++                    {
++                      char *linep = line;
++                      char *endp;
++
++                      do
++                        {
++                          endp = strchr (linep, '\n');
++                          if (endp)
++                            *endp++ = 0;
++                          gpg->colon.fnc (gpg->colon.fnc_value, linep);
++                          linep = endp;
++                        }
++                      while (linep && *linep);
++
++                      free (line);
++                    }
++                  else
++                    gpg->colon.fnc (gpg->colon.fnc_value, buffer);
++                }
+
+	      /* To reuse the buffer for the next line we have to
+		 shift the remaining data to the buffer start and
+@@ -2059,6 +2075,7 @@ gpg_keylist_preprocess (char *line, char **r_line)
+ #define NR_FIELDS 16
+   char *field[NR_FIELDS];
+   int fields = 0;
++  size_t n;
+
+   *r_line = NULL;
+
+@@ -2094,16 +2111,34 @@ gpg_keylist_preprocess (char *line, char **r_line)
+	 pub:<keyid>:<algo>:<keylen>:<creationdate>:<expirationdate>:<flags>
+
+	 as defined in 5.2. Machine Readable Indexes of the OpenPGP
+-	 HTTP Keyserver Protocol (draft).
++	 HTTP Keyserver Protocol (draft).  Modern versions of the SKS
++	 keyserver return the fingerprint instead of the keyid.  We
++	 detect this here and use the v4 fingerprint format to convert
++	 it to a key id.
+
+	 We want:
+	 pub:o<flags>:<keylen>:<algo>:<keyid>:<creatdate>:<expdate>::::::::
+       */
+
+-      if (asprintf (r_line, "pub:o%s:%s:%s:%s:%s:%s::::::::",
+-		    field[6], field[3], field[2], field[1],
+-		    field[4], field[5]) < 0)
+-	return gpg_error_from_syserror ();
++      n = strlen (field[1]);
++      if (n > 16)
++        {
++          if (asprintf (r_line,
++                        "pub:o%s:%s:%s:%s:%s:%s::::::::\n"
++                        "fpr:::::::::%s:",
++                        field[6], field[3], field[2], field[1] + n - 16,
++                        field[4], field[5], field[1]) < 0)
++            return gpg_error_from_syserror ();
++        }
++      else
++        {
++          if (asprintf (r_line,
++                        "pub:o%s:%s:%s:%s:%s:%s::::::::",
++                        field[6], field[3], field[2], field[1],
++                        field[4], field[5]) < 0)
++            return gpg_error_from_syserror ();
++        }
++
+       return 0;
+
+     case RT_UID:
+--
+1.9.1

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

Summary of changes:
 ...rn-keyserver-output-which-may-emit-the-fi.patch |  101 ++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100755 patches/gpgme-1.4.4/0001-Handle-modern-keyserver-output-which-may-emit-the-fi.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list