Release: 1.4.2.2
Environment
Windows XP Pro SP2
GnuPG version: 1.4.2.2
Enigmail version: 0.94.0.0 (20060110)
Thunderbird/Mozilla version: 1.5 (20051201)
Description
GnuPG fails to verify a signed email when there are _two_ empty lines beneath the Signed email header. Like this:
THIS FAILS:
- -----BEGIN PGP SIGNED MESSAGE-----
- Hash: SHA1
- <-- empty line 1
- <-- empty line 2
- *Begin email text*
THIS WORKS: - -----BEGIN PGP SIGNED MESSAGE-----
- Hash: SHA1
- <-- empty line 1
- *Begin email text*
I have verified this behaviour on multiple systems running the aforementioned software versions on Windows XP SP2, using different emails. - gpg command line and output:
- C:\\GnuPG\\gpg.exe --charset utf8 --batch --no-tty --status-fd 2 -d
- gpg: Signature made 04/12/06 10:45:57 using DSA key ID D795E02C
- gpg: BAD signature from "GOVCERT.NL 2006 <cert@govcert.nl>"
This happens when for example PGP Desktop signs a "current" window; if there's an empty line at the top of the window which holds the text that's being signed, PGP Desktop will (correctly) honor this empty line and sign as-is, this giving two empty lines in total due to the adding of the PGP Signed header. Making sure that there is no empty line at the top of a text, and then signing, will make the verification succeed.
I've come upon this error through the use of Enigmail, the Thunderbird PGP extension. I initially reported the issue in the mozdev.org bugtracker:
http://mozdev.org/bugs/show_bug.cgi?id=13746
But the comment there suggests this might be an issue with GnuPG.
How To Repeat
- Try to verify an email with the aforementioned two empty lines after the "PGP Signed Message" header
- See GnuPG fail to verify the message
- Cry
Fix
Make the whitespace/number of empty lines beneath the "PGP Signed Message" header not bork the verifier?