[git] GnuPG - branch, master, updated. gnupg-2.1.0-beta895-10-g433208a

by Werner Koch cvs at cvs.gnupg.org
Fri Oct 31 09:24:17 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  433208a5536608c2b40525eebadbbdeb7780d7f2 (commit)
       via  cb46e32628de9c2a764b19ef092d4f504c948bd0 (commit)
       via  b47fe2b14e2a610706bdeff9dbd9a5f7bd6f6b3a (commit)
      from  9546aa3cc87fc83a40768a12fbbceb19496ce129 (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 433208a5536608c2b40525eebadbbdeb7780d7f2
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Oct 31 09:22:47 2014 +0100

    gpg: Fix testing for secret key availability.
    
    * g10/getkey.c (have_secret_key_with_kid): Do not change the search
    mode.
    --
    
    The search mode was accidentally changed to search-next after finding
    the first keyblock.  The intention was to look for a duplicate keyid
    in the keydb which works by not doing a keydb_search_reset.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/getkey.c b/g10/getkey.c
index 2ddd589..279b3d9 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3012,7 +3012,6 @@ have_secret_key_with_kid (u32 *keyid)
   desc.u.kid[1] = keyid[1];
   while (!result && !(err = keydb_search (kdbhd, &desc, 1, NULL)))
     {
-      desc.mode = KEYDB_SEARCH_MODE_NEXT;
       err = keydb_get_keyblock (kdbhd, &keyblock);
       if (err)
         {

commit cb46e32628de9c2a764b19ef092d4f504c948bd0
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Oct 31 09:14:03 2014 +0100

    gpg: Remove commented code.
    
    --

diff --git a/g10/getkey.c b/g10/getkey.c
index 4f10c18..2ddd589 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -3041,146 +3041,3 @@ have_secret_key_with_kid (u32 *keyid)
   keydb_release (kdbhd);
   return result;
 }
-
-
-
-#if 0
-/*
- * Merge the secret keys from secblock into the pubblock thereby
- * replacing the public (sub)keys with their secret counterparts Hmmm:
- * It might be better to get away from the concept of entire secret
- * keys at all and have a way to store just the real secret parts
- * from the key.
- *
- * FIXME: this is not anymore needed but we keep it as example code for the
- * new code we need to write for the import/export feature.
- */
-static void
-merge_public_with_secret (KBNODE pubblock, KBNODE secblock)
-{
-  KBNODE pub;
-
-  assert (pubblock->pkt->pkttype == PKT_PUBLIC_KEY);
-  assert (secblock->pkt->pkttype == PKT_SECRET_KEY);
-
-  for (pub = pubblock; pub; pub = pub->next)
-    {
-      if (pub->pkt->pkttype == PKT_PUBLIC_KEY)
-	{
-	  PKT_public_key *pk = pub->pkt->pkt.public_key;
-	  PKT_secret_key *sk = secblock->pkt->pkt.secret_key;
-	  assert (pub == pubblock); /* Only in the first node.  */
-	  /* There is nothing to compare in this case, so just replace
-	   * some information.  */
-	  copy_public_parts_to_secret_key (pk, sk);
-	  free_public_key (pk);
-	  pub->pkt->pkttype = PKT_SECRET_KEY;
-	  pub->pkt->pkt.secret_key = copy_secret_key (NULL, sk);
-	}
-      else if (pub->pkt->pkttype == PKT_PUBLIC_SUBKEY)
-	{
-	  KBNODE sec;
-	  PKT_public_key *pk = pub->pkt->pkt.public_key;
-
-	  /* This is more complicated: It may happen that the sequence
-	   * of the subkeys dosn't match, so we have to find the
-	   * appropriate secret key.  */
-	  for (sec = secblock->next; sec; sec = sec->next)
-	    {
-	      if (sec->pkt->pkttype == PKT_SECRET_SUBKEY)
-		{
-		  PKT_secret_key *sk = sec->pkt->pkt.secret_key;
-		  if (!cmp_public_secret_key (pk, sk))
-		    {
-		      copy_public_parts_to_secret_key (pk, sk);
-		      free_public_key (pk);
-		      pub->pkt->pkttype = PKT_SECRET_SUBKEY;
-		      pub->pkt->pkt.secret_key = copy_secret_key (NULL, sk);
-		      break;
-		    }
-		}
-	    }
-	  if (!sec)
-	    BUG (); /* Already checked in premerge.  */
-	}
-    }
-}
-
-
-/* This function checks that for every public subkey a corresponding
- * secret subkey is available and deletes the public subkey otherwise.
- * We need this function because we can't delete it later when we
- * actually merge the secret parts into the pubring.
- * The function also plays some games with the node flags.
- *
- * FIXME: this is not anymore needed but we keep it as example code for the
- * new code we need to write for the import/export feature.
- */
-static void
-premerge_public_with_secret (KBNODE pubblock, KBNODE secblock)
-{
-  KBNODE last, pub;
-
-  assert (pubblock->pkt->pkttype == PKT_PUBLIC_KEY);
-  assert (secblock->pkt->pkttype == PKT_SECRET_KEY);
-
-  for (pub = pubblock, last = NULL; pub; last = pub, pub = pub->next)
-    {
-      pub->flag &= ~3; /* Reset bits 0 and 1.  */
-      if (pub->pkt->pkttype == PKT_PUBLIC_SUBKEY)
-	{
-	  KBNODE sec;
-	  PKT_public_key *pk = pub->pkt->pkt.public_key;
-
-	  for (sec = secblock->next; sec; sec = sec->next)
-	    {
-	      if (sec->pkt->pkttype == PKT_SECRET_SUBKEY)
-		{
-		  PKT_secret_key *sk = sec->pkt->pkt.secret_key;
-		  if (!cmp_public_secret_key (pk, sk))
-		    {
-		      if (sk->protect.s2k.mode == 1001)
-			{
-			  /* The secret parts are not available so
-			     we can't use that key for signing etc.
-			     Fix the pubkey usage */
-			  pk->pubkey_usage &= ~(PUBKEY_USAGE_SIG
-						| PUBKEY_USAGE_AUTH);
-			}
-		      /* Transfer flag bits 0 and 1 to the pubblock.  */
-		      pub->flag |= (sec->flag & 3);
-		      break;
-		    }
-		}
-	    }
-	  if (!sec)
-	    {
-	      KBNODE next, ll;
-
-	      if (opt.verbose)
-		log_info (_("no secret subkey"
-			    " for public subkey %s - ignoring\n"),
-			  keystr_from_pk (pk));
-	      /* We have to remove the subkey in this case.  */
-	      assert (last);
-	      /* Find the next subkey.  */
-	      for (next = pub->next, ll = pub;
-		   next && next->pkt->pkttype != PKT_PUBLIC_SUBKEY;
-		   ll = next, next = next->next)
-		;
-	      /* Make new link.  */
-	      last->next = next;
-	      /* Release this public subkey with all sigs.  */
-	      ll->next = NULL;
-	      release_kbnode (pub);
-	      /* Let the loop continue.  */
-	      pub = last;
-	    }
-	}
-    }
-  /* We need to copy the found bits (0 and 1) from the secret key to
-     the public key.  This has already been done for the subkeys but
-     got lost on the primary key - fix it here.  */
-  pubblock->flag |= (secblock->flag & 3);
-}
-#endif /*0*/

commit b47fe2b14e2a610706bdeff9dbd9a5f7bd6f6b3a
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Oct 31 08:04:38 2014 +0100

    build: Avoid distributing backup files etc.
    
    * Makefile.am (EXTRA_DIST): Do not include directories.
    --
    
    The make dist rules uses "cp -R" for each listed file.  Thus all cruft
    from a directory is also put into the tarball.  Obviously we do not
    want this.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/Makefile.am b/Makefile.am
index 286038e..466c011 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,7 +30,6 @@ EXTRA_DIST = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc \
 	     build-aux/getswdb.sh                           \
 	     build-aux/speedo.mk                            \
              build-aux/speedo/zlib.pc			    \
-             build-aux/speedo/w32			    \
              build-aux/speedo/w32/inst-options.ini	    \
              build-aux/speedo/w32/inst.nsi		    \
              build-aux/speedo/w32/pkg-copyright.txt	    \
@@ -39,7 +38,6 @@ EXTRA_DIST = build-aux/config.rpath build-aux/potomo autogen.sh autogen.rc \
              build-aux/speedo/w32/gdk-pixbuf-loaders.cache  \
              build-aux/speedo/w32/exdll.h		    \
              build-aux/speedo/w32/README.txt		    \
-             build-aux/speedo/patches			    \
              build-aux/speedo/patches/atk-1.32.0.patch	    \
              build-aux/speedo/patches/libiconv-1.14.patch   \
              build-aux/speedo/patches/pango-1.29.4.patch

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

Summary of changes:
 Makefile.am  |    2 -
 g10/getkey.c |  144 ----------------------------------------------------------
 2 files changed, 146 deletions(-)


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




More information about the Gnupg-commits mailing list