1.3.6 // original file name='is'

David Shaw dshaw at jabberwocky.com
Tue Jun 15 22:13:28 CEST 2004


On Tue, Jun 15, 2004 at 03:36:49PM -0400, Atom 'Smasher' wrote:
> On Tue, 15 Jun 2004, David Shaw wrote:
> 
> > I can't duplicate this.  Can you post specific steps to take to
> > recreate the problem?
> ===============================
> 
> gpg       = 1.3.6
> gpg_1.2.4 = 1.2.4
> 
> 
> ## create a clearsigned file:
>  	$ date | gpg_1.2.4 --clearsign > file
> 
> ## using 1.2.4 check the signature and only look at the file name
>  	$ gpg_1.2.4 -v < file > /dev/null 2>&1 | egrep file
>  	gpg: original file name=''
> 
> ## using 1.3.6 check the signature and only look at the file name
>  	$ gpg -v < file > /dev/null 2>&1 | egrep file
>  	gpg: original file name='is'

Ah, you didn't say it was a clearsigned file.  That's pretty funny.
It has to do with the way clearsigned messages are handled internally,
and that partial length encoding must be a power of two.  Try this
patch.  It uses 2^1 + 2^2 rather than 2^3.

David
-------------- next part --------------
Index: armor.c
===================================================================
RCS file: /cvs/gnupg/gnupg/g10/armor.c,v
retrieving revision 1.72
diff -u -r1.72 armor.c
--- armor.c	4 Mar 2004 20:40:12 -0000	1.72
+++ armor.c	15 Jun 2004 20:07:18 -0000
@@ -925,11 +925,10 @@
 		   bytes.  Of course, we'll accept it anyway ;) */
 
 		buf[n++] = 0xCB; /* new packet format, type 11 */
-		buf[n++] = 0xE3; /* 2^3 */
+		buf[n++] = 0xE1; /* 2^1 */
 		buf[n++] = 't';  /* canonical text mode */
-		buf[n++] = 2;	 /* namelength */
-		buf[n++] = 'i';  /* padding to get us to 2^3 bytes */
-		buf[n++] = 's';  /* this comment intentionally left blank */
+		buf[n++] = 0;	 /* namelength */
+		buf[n++] = 0xE2; /* 2^2 */
 		memset(buf+n, 0, 4); /* timestamp */
 		n += 4;
 	    }


More information about the Gnupg-devel mailing list