gpg 1.0.6 troubles with whitespace-only Comment header

Andrew McDonald
Fri Nov 23 01:00:02 2001

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 22, 2001 at 11:40:28PM +0100, Igor Bukanov wrote:
> It seems that gpg 1.0.6 does not like "Comment:" header which consists=20
> only of spaces that pgp 6.0.2 can make. I received the following message:
> Version: PGP 6.0.2
> Comment:
> hQCMA....
> where there is 2 ASCII space characters after "Comment:"
> and gpg complains:
> gpg: invalid armor header: Comment:

Well, RFC2440 says:

   The Armor Headers are pairs of strings that can give the user or the
   receiving OpenPGP implementation some information about how to decode
   or use the message.  The Armor Headers are a part of the armor, not a
   part of the message, and hence are not protected by any signatures
   applied to the message.

   The format of an Armor Header is that of a key-value pair.  A colon
   (':' 0x38) and a single space (0x20) separate the key and value.
   OpenPGP should consider improperly formatted Armor Headers to be
   corruption of the ASCII Armor.  Unknown keys should be reported to
   the user, but OpenPGP should continue to process the message.

Although it says that a single space separates the key and value it
doesn't appear to say that the 'value' can't start with a space (0x20)
or be only a space. In fact this section of the RFC (and also the
current Internet Draft seems a bit vague on what the contents of the
'key' and 'value' can be.

Probably a question for Werner, and maybe some room for adjustment in
the I-D?

Andrew McDonald

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see