Problems with --export-secret-subkeys and deleted subkeys

David Shaw dshaw at jabberwocky.com
Mon Sep 13 20:43:49 CEST 2004


On Sun, Sep 12, 2004 at 06:30:35PM +0200, Michael Roth wrote:

> So, the problem is, if there is a subkey on the public keyring 
> presented, which doesn't have a corresponding secret subkey on an 
> scrambled primary key, gnupg somehow fails.

Very interesting bug, and excellent research (I love bug reports like
this).  Can you try two things for me?  First, try to make the
signature with --no-sig-cache set.  If that works, then try the
attached patch.

David
-------------- next part --------------
Index: getkey.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/getkey.c,v
retrieving revision 1.78.2.32
diff -u -r1.78.2.32 getkey.c
--- getkey.c	20 Aug 2004 17:24:07 -0000	1.78.2.32
+++ getkey.c	13 Sep 2004 18:36:53 -0000
@@ -2164,7 +2164,7 @@
                 assert ( last );
                 /* find the next subkey */
                 for (next=pub->next,ll=pub;
-                     next && pub->pkt->pkttype != PKT_PUBLIC_SUBKEY;
+                     next && next->pkt->pkttype != PKT_PUBLIC_SUBKEY;
                      ll = next, next = next->next ) 
                     ;
                 /* make new link */


More information about the Gnupg-devel mailing list