[git] GnuPG - branch, master, updated. gnupg-2.1.0-34-g44c9cc1

by Werner Koch cvs at cvs.gnupg.org
Fri Nov 21 16:16:49 CET 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 "The GNU Privacy Guard".

The branch, master has been updated
       via  44c9cc18968b3e1d7568ec41ebf28a07285c61bb (commit)
       via  94a54425144e412bc83e44b7c6323282f49f650f (commit)
       via  9a85b91e925ac0798d56820353bf5858b212277f (commit)
      from  8f8e94322d5cc65add4dbd4c3b9b2c09a0b855ee (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 44c9cc18968b3e1d7568ec41ebf28a07285c61bb
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 19 10:34:32 2014 +0100

    gpg: Track number of skipped v3 keys on import.
    
    * g10/import.c (stats_s): Add field v3keys.
    (import): Update this field.
    (import_print_stats): Print v3 key count.
    (read_block): Skip v3 keys and return a count for them.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/DETAILS b/doc/DETAILS
index a1e96f4..9ad616c 100644
--- a/doc/DETAILS
+++ b/doc/DETAILS
@@ -750,6 +750,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB:
     - <sec_dups>
     - <skipped_new_keys>
     - <not_imported>
+    - <skipped_v3_keys>
 
 ** Smartcard related
 *** CARDCTRL <what> [<serialno>]
diff --git a/g10/import.c b/g10/import.c
index 6439fd0..a33690b 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -57,6 +57,7 @@ struct stats_s {
     ulong not_imported;
     ulong n_sigs_cleaned;
     ulong n_uids_cleaned;
+    ulong v3keys;   /* Number of V3 keys seen.  */
 };
 
 
@@ -64,7 +65,8 @@ static int import (ctrl_t ctrl,
                    IOBUF inp, const char* fname, struct stats_s *stats,
 		   unsigned char **fpr, size_t *fpr_len, unsigned int options,
 		   import_screener_t screener, void *screener_arg);
-static int read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root );
+static int read_block (IOBUF a, PACKET **pending_pkt, KBNODE *ret_root,
+                       int *r_v3keys);
 static void revocation_present (ctrl_t ctrl, kbnode_t keyblock);
 static int import_one (ctrl_t ctrl,
                        const char *fname, KBNODE keyblock,struct stats_s *stats,
@@ -298,6 +300,7 @@ import (ctrl_t ctrl, IOBUF inp, const char* fname,struct stats_s *stats,
                                 grasp the return semantics of
                                 read_block. */
     int rc = 0;
+    int v3keys;
 
     getkey_disable_caches();
 
@@ -310,8 +313,9 @@ import (ctrl_t ctrl, IOBUF inp, const char* fname,struct stats_s *stats,
         release_armor_context (afx);
     }
 
-    while( !(rc = read_block( inp, &pending_pkt, &keyblock) )) {
-	if( keyblock->pkt->pkttype == PKT_PUBLIC_KEY )
+    while( !(rc = read_block( inp, &pending_pkt, &keyblock, &v3keys) )) {
+        stats->v3keys += v3keys;
+        if( keyblock->pkt->pkttype == PKT_PUBLIC_KEY )
           rc = import_one (ctrl, fname, keyblock,
                            stats, fpr, fpr_len, options, 0, 0,
                            screener, screener_arg);
@@ -334,9 +338,10 @@ import (ctrl_t ctrl, IOBUF inp, const char* fname,struct stats_s *stats,
 	if( !(++stats->count % 100) && !opt.quiet )
 	    log_info(_("%lu keys processed so far\n"), stats->count );
     }
+    stats->v3keys += v3keys;
     if( rc == -1 )
 	rc = 0;
-    else if( rc && rc != G10ERR_INV_KEYRING )
+    else if( rc && gpg_err_code (rc) != G10ERR_INV_KEYRING )
 	log_error( _("error reading '%s': %s\n"), fname, g10_errstr(rc));
 
     return rc;
@@ -354,6 +359,7 @@ import_old_secring (ctrl_t ctrl, const char *fname)
                                 grasp the return semantics of
                                 read_block. */
   struct stats_s *stats;
+  int v3keys;
 
   inp = iobuf_open (fname);
   if (inp && is_secured_file (iobuf_get_fd (inp)))
@@ -371,7 +377,7 @@ import_old_secring (ctrl_t ctrl, const char *fname)
 
   getkey_disable_caches();
   stats = import_new_stats_handle ();
-  while (!(err = read_block (inp, &pending_pkt, &keyblock)))
+  while (!(err = read_block (inp, &pending_pkt, &keyblock, &v3keys)))
     {
       if (keyblock->pkt->pkttype == PKT_SECRET_KEY)
         err = import_secret_one (ctrl, fname, keyblock, stats, 1, 0, 1,
@@ -401,7 +407,10 @@ import_print_stats (void *hd)
     struct stats_s *stats = hd;
 
     if( !opt.quiet ) {
-	log_info(_("Total number processed: %lu\n"), stats->count );
+	log_info(_("Total number processed: %lu\n"),
+                 stats->count + stats->v3keys);
+	if( stats->v3keys)
+	    log_info(_("    skipped PGP-2 keys: %lu\n"), stats->v3keys);
 	if( stats->skipped_new_keys )
 	    log_info(_("      skipped new keys: %lu\n"),
 						stats->skipped_new_keys );
@@ -436,9 +445,10 @@ import_print_stats (void *hd)
     }
 
     if( is_status_enabled() ) {
-	char buf[14*20];
-	sprintf(buf, "%lu %lu %lu 0 %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
-		stats->count,
+	char buf[15*20];
+	snprintf (buf, sizeof buf,
+                  "%lu %lu %lu 0 %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
+		stats->count + stats->v3keys,
 		stats->no_user_id,
 		stats->imported,
 		stats->unchanged,
@@ -450,7 +460,8 @@ import_print_stats (void *hd)
 		stats->secret_imported,
 		stats->secret_dups,
 		stats->skipped_new_keys,
-                stats->not_imported );
+                  stats->not_imported,
+                stats->v3keys );
 	write_status_text( STATUS_IMPORT_RES, buf );
     }
 }
@@ -480,16 +491,20 @@ valid_keyblock_packet (int pkttype)
 /****************
  * Read the next keyblock from stream A.
  * PENDING_PKT should be initialzed to NULL
- * and not chnaged form the caller.
+ * and not changed by the caller.
  * Return: 0 = okay, -1 no more blocks or another errorcode.
+ *         The int at at R_V3KEY counts the number of unsupported v3
+ *         keyblocks.
  */
 static int
-read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
+read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root, int *r_v3keys)
 {
     int rc;
     PACKET *pkt;
     KBNODE root = NULL;
-    int in_cert;
+    int in_cert, in_v3key;
+
+    *r_v3keys = 0;
 
     if( *pending_pkt ) {
 	root = new_kbnode( *pending_pkt );
@@ -500,9 +515,23 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
 	in_cert = 0;
     pkt = xmalloc( sizeof *pkt );
     init_packet(pkt);
+    in_v3key = 0;
     while( (rc=parse_packet(a, pkt)) != -1 ) {
-	if( rc ) {  /* ignore errors */
-	    if( rc != G10ERR_UNKNOWN_PACKET ) {
+	if (rc && (gpg_err_code (rc) == GPG_ERR_INV_PACKET
+                   && (pkt->pkttype == PKT_PUBLIC_KEY
+                       || pkt->pkttype == PKT_SECRET_KEY)
+                   && (pkt->pkt.public_key->version == 2
+                       || pkt->pkt.public_key->version == 3))) {
+            in_v3key = 1;
+            ++*r_v3keys;
+	    free_packet (pkt);
+	    init_packet (pkt);
+            continue;
+        }
+        else if (rc ) {  /* ignore errors */
+            if (gpg_err_code (rc) == GPG_ERR_UNKNOWN_PACKET)
+                ; /* Do not show a diagnostic.  */
+            else {
 		log_error("read_block: read error: %s\n", g10_errstr(rc) );
 		rc = G10ERR_INV_KEYRING;
 		goto ready;
@@ -512,6 +541,14 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
 	    continue;
 	}
 
+        if (in_v3key && !(pkt->pkttype == PKT_PUBLIC_KEY
+                          || pkt->pkttype == PKT_SECRET_KEY)) {
+	    free_packet( pkt );
+	    init_packet(pkt);
+	    continue;
+        }
+        in_v3key = 0;
+
 	if( !root && pkt->pkttype == PKT_SIGNATURE
 		  && pkt->pkt.signature->sig_class == 0x20 ) {
 	    /* this is a revocation certificate which is handled

commit 94a54425144e412bc83e44b7c6323282f49f650f
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 19 10:34:32 2014 +0100

    gpg: Fix regression in parse_key.
    
    * g10/parse-packet.c (parse): Better return just the gpg_err_code.
    (parse_key): Return the error code.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index 039f085..e0370aa 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -658,7 +658,11 @@ parse (IOBUF inp, PACKET * pkt, int onlykeypkts, off_t * retpos,
   /* FIXME: Do we leak in case of an error?  */
   if (!rc && iobuf_error (inp))
     rc = G10ERR_INV_KEYRING;
-  return rc;
+
+  /* FIXME: We use only the error code for now to avoid problems with
+     callers which have not been checked to always use gpg_err_code()
+     when comparing error codes.  */
+  return rc == -1? -1 : gpg_err_code (rc);
 }
 
 
@@ -1909,7 +1913,6 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
   int i, version, algorithm;
   unsigned long timestamp, expiredate, max_expiredate;
   int npkey, nskey;
-  int rc = 0;
   u32 keyid[2];
   PKT_public_key *pk;
 
@@ -2313,7 +2316,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
 
  leave:
   iobuf_skip_rest (inp, pktlen, 0);
-  return rc;
+  return err;
 }
 
 

commit 9a85b91e925ac0798d56820353bf5858b212277f
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 19 10:34:32 2014 +0100

    speedo: Add simple logos to the installer.
    
    * build-aux/speedo/w32/README.txt: Include GnuPG Readme.
    * build-aux/speedo/w32/gnupg-logo-150x57.bmp: New.
    * build-aux/speedo/w32/gnupg-logo-164x314.bmp: New.
    * build-aux/speedo/w32/inst.nsi: Add logos.
    * build-aux/speedo.mk ($(bdir)/NEWS.tmp): Extract news items.
    --
    
    The welcome page logo is basically a placeholder until someone has
    created a pretty one.

diff --git a/artwork/gnupg-lock-256x256tr.png b/artwork/gnupg-lock-256x256tr.png
new file mode 100644
index 0000000..25c5659
Binary files /dev/null and b/artwork/gnupg-lock-256x256tr.png differ
diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk
index f9490cb..005add7 100644
--- a/build-aux/speedo.mk
+++ b/build-aux/speedo.mk
@@ -1024,16 +1024,20 @@ dist-source: all
 	)
 
 
+# Extract the two latest news entries.  */
 $(bdir)/NEWS.tmp: $(topsrc)/NEWS
-	sed -e '/^#/d' <$(topsrc)/NEWS >$(bdir)/NEWS.tmp
+	awk '/^Notewo/ {if(okay>1){exit}; okay++};okay {print $0}' \
+	    <$(topsrc)/NEWS  >$(bdir)/NEWS.tmp
 
-$(bdir)/README.txt: $(bdir)/NEWS.tmp $(w32src)/README.txt \
+$(bdir)/README.txt: $(bdir)/NEWS.tmp $(topsrc)/README $(w32src)/README.txt \
                     $(w32src)/pkg-copyright.txt
 	sed -e '/^;.*/d;' \
-	-e '/!NEWSFILE!/{r NEWS.tmp' -e 'd;}' \
+	-e '/!NEWSFILE!/{r $(bdir)/NEWS.tmp' -e 'd;}' \
+	-e '/!GNUPGREADME!/{r $(topsrc)/README' -e 'd;}' \
         -e '/!PKG-COPYRIGHT!/{r $(w32src)/pkg-copyright.txt' -e 'd;}' \
         -e 's,!VERSION!,$(INST_VERSION),g' \
 	   < $(w32src)/README.txt \
+           | sed -e '/^#/d' \
            | awk '{printf "%s\r\n", $$0}' >$(bdir)/README.txt
 
 $(bdir)/g4wihelp.dll: $(w32src)/g4wihelp.c $(w32src)/exdll.h
diff --git a/build-aux/speedo/w32/README.txt b/build-aux/speedo/w32/README.txt
index 847ecd7..e98fb97 100644
--- a/build-aux/speedo/w32/README.txt
+++ b/build-aux/speedo/w32/README.txt
@@ -1,5 +1,5 @@
 ;; README.txt                               -*- coding: latin-1; -*-
-;; This is the README installed with megacryption.  Lines with a
+;; This is the README installed for Windows.  Lines with a
 ;; semicolon in the first column are considered a comment and not
 ;; included in the actually installed version.  Certain keywords are
 ;; replaced by the Makefile; those words are enclosed by exclamation
@@ -14,27 +14,40 @@ Content:
 
      1. Important notes
      2. Changes
-     3. Legal notices
-
-
+     3. GnuPG README file
+     4. Legal notices
 
 
 1. Important Notes
 ==================
 
-HTML versions of the manuals have been installed on the desktop.
-Check out https://gnupg.org for latest news.
+See https://gnupg.org for latest news.  HowTo documents and manuals
+can be found there but some have also been installed on your machine.
 
+Developing GnuPG and keeping it in a healthy state is a full time job
+for at least two experienced developers.  We currently do not have the
+financial resources to even fully pay one person.  To change that
+please consider to donate at https://gnupg.org/donate/ .
 
-2. Record of Changes (NEWS file)
-================================
 
-Below you find the raw NEWS file:
+2. Record of Changes
+====================
+
+This is a list of changes to the GnuPG core for this and the previous
+release.
 
 !NEWSFILE!
 
 
-3. Legal notices pertaining to the individual packets
+3. GnuPG README file
+====================
+
+Below is the README file as distributed with the GnuPG source.
+
+!GNUPGREADME!
+
+
+4. Legal notices pertaining to the individual packets
 =====================================================
 
 GnuPG for Windows consist of several independent developed packages,
@@ -42,9 +55,9 @@ available under different license conditions.  Most of these packages
 are however available under the GNU General Public License (GNU GPL).
 Common to all is that they are free to use without restrictions, may
 be modified and that modifications may be distributed.  If the source
-file (i.e. gnupg-src-k.m.n.zip) is distributed along with the binaries
-and the use of the GNU GPL has been pointed out, distribution is in
-all cases possible.
+file (i.e. gnupg-w32-VERSION_DATE.tar.xz) is distributed along with
+the installer and the use of the GNU GPL has been pointed out,
+distribution is in all cases possible.
 
 What follows is a list of copyright statements.
 
diff --git a/build-aux/speedo/w32/gnupg-logo-150x57.bmp b/build-aux/speedo/w32/gnupg-logo-150x57.bmp
new file mode 100644
index 0000000..f2978f3
Binary files /dev/null and b/build-aux/speedo/w32/gnupg-logo-150x57.bmp differ
diff --git a/build-aux/speedo/w32/gnupg-logo-164x314.bmp b/build-aux/speedo/w32/gnupg-logo-164x314.bmp
new file mode 100644
index 0000000..bf270ac
Binary files /dev/null and b/build-aux/speedo/w32/gnupg-logo-164x314.bmp differ
diff --git a/build-aux/speedo/w32/inst.nsi b/build-aux/speedo/w32/inst.nsi
index 101e6d1..8c64953 100644
--- a/build-aux/speedo/w32/inst.nsi
+++ b/build-aux/speedo/w32/inst.nsi
@@ -132,11 +132,9 @@ VIAddVersionKey "FileVersion" "${PROD_VERSION}"
 !define MUI_FINISHPAGE_NOAUTOCLOSE
 !define MUI_UNFINISHPAGE_NOAUTOCLOSE
 
-#!define MUI_HEADERIMAGE
-#!define MUI_HEADERIMAGE_BITMAP \
-#               "${TOP_SRCDIR}/doc/logo/gnupg-logo-150x57.bmp"
-#!define MUI_WELCOMEFINISHPAGE_BITMAP \
-#               "${TOP_SRCDIR}/doc/logo/gnupg-logo-164x314.bmp"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "${W32_SRCDIR}\gnupg-logo-150x57.bmp"
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${W32_SRCDIR}\gnupg-logo-164x314.bmp"
 
 # Remember the installer language
 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
@@ -218,11 +216,10 @@ Var STARTMENU_FOLDER
 !insertmacro MUI_RESERVEFILE_LANGDLL
 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
 ReserveFile "${BUILD_DIR}\g4wihelp.dll"
-#ReserveFile "${TOP_SRCDIR}\doc\logo\gnupg-logo-400px.bmp"
-#ReserveFile "${W32_SRCDIR}\gnupg-splash.wav"
+ReserveFile "${W32_SRCDIR}\gnupg-logo-150x57.bmp"
+ReserveFile "${W32_SRCDIR}\gnupg-logo-164x314.bmp"
 ReserveFile "${TOP_SRCDIR}\COPYING"
 ReserveFile "${W32_SRCDIR}\inst-options.ini"
-#ReserveFile "${TOP_SRCDIR}\doc\logo\gnupg-logo-164x314.bmp"
 
 # Language support
 
@@ -1019,6 +1016,7 @@ Section "-un.gpgme"
   Delete "$INSTDIR\bin\libgpgme-glib-11.dll"
   Delete "$INSTDIR\bin\gpgme-w32spawn.exe"
   Delete "$INSTDIR\lib\libgpgme.imp"
+  Delete "$INSTDIR\lib\libgpgme-glib.imp"
   Delete "$INSTDIR\include\gpgme.h"
 SectionEnd
 

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

Summary of changes:
 artwork/gnupg-lock-256x256tr.png            |  Bin 0 -> 25022 bytes
 build-aux/speedo.mk                         |   10 ++--
 build-aux/speedo/w32/README.txt             |   39 ++++++++++------
 build-aux/speedo/w32/gnupg-logo-150x57.bmp  |  Bin 0 -> 3842 bytes
 build-aux/speedo/w32/gnupg-logo-164x314.bmp |  Bin 0 -> 4182 bytes
 build-aux/speedo/w32/inst.nsi               |   14 +++---
 doc/DETAILS                                 |    1 +
 g10/import.c                                |   67 +++++++++++++++++++++------
 g10/parse-packet.c                          |    9 ++--
 9 files changed, 98 insertions(+), 42 deletions(-)
 create mode 100644 artwork/gnupg-lock-256x256tr.png
 create mode 100644 build-aux/speedo/w32/gnupg-logo-150x57.bmp
 create mode 100644 build-aux/speedo/w32/gnupg-logo-164x314.bmp


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




More information about the Gnupg-commits mailing list