[BUG] "--rfc1991" + "-t" = faulty packet header

abognupg at redtenbacher.de abognupg at redtenbacher.de
Fri Feb 27 21:18:56 CET 2004


In GnuPG 1.2.4, the combining of the options "--rfc1991" (use old
style packet headers) and "-t" (textmode) produces faulty packets.
This can be easily verified by a command like:

  gpg --rfc1991 -t -z 0 -o mail.lit --store mail.txt

The resulting (uncompressed) packet can be visually inspected and
shows that after the packet tag byte (CHR(175) = old style packet with
tag type "11" [literal packet] and length-type "3" [indeterminate
length]) there are 2 length bytes before the "t"/"b" format byte,
which should not be there according to RFC 2440, section 4.2.1. In
addition, at the end of the packet, there are 2 CHR(0)'s that should
not be there, either.

This bug has no effect when "--pgp2" is used (as this option has the
undocumented side-effect of silently turning off any requested
textmode), but nevertheless the bug should be either fixed or the
combination of "--rfc1991" and "-t" should result in an error message
to the user.

- Wolfgang Redtenbacher

More information about the Gnupg-devel mailing list