Hello there

I run into an odd issue which appears to be related to an extra new line (\n) character being added around the PGP signature of an email. The en/decryption of emails is working fine, however signed emails sent via MailMate show a "Bad signature" when opening the message in MailMate or Apple Mail.

I noticed the following when running MailMate with `defaults write com.freron.MailMate MmDebugSecurity -bool YES`:

- sending an email calls `gpg2` to create a detached signature using the correct signing sub-key
- MailMate calls `gpg2` to validate the signature (passes with GOODSIG)
- MailMate calls `gpg2` to print the available keys based on the signing key
- the last two calls run again

The used example `Input String`, based on the emails content and the generated PGP signature, shows a length of 1025 characters during this process and a "Good signature" on both verification calls. Once the email arrived, MailMate shows "Bad signature for OpenPGP message" and the terminal debug output shows that 1027 characters were passed to `gpg2` which resulted in the "BAD signature" error.

Looking at the string GPG2 used to sign and validate, it appears the two character difference is a new line character "\n" around the "-----BEGIN PGP SIGNATURE .." part of the message. Removing those two characters and attempting to validate the email content + PGP signature via the command line works fine afterwards.

I am running MailMate 1.7.2 build 4021 with latest GPGTools on OSX 10.9.1. The MailMate preferences have "Experimental features", "OpenPGP" and "SpamSieve" support enabled. I use a RSA key with the secret key removed, along with two separate RSA sub-keys for encryption and signing.

I was unable to find other users having the same problem on this mailing list and the google was no help, so I would appreciate any insight on what could cause this problem (and how to fix).

-manuel


_______________________________________________
mailmate mailing list
[email protected]
http://lists.freron.com/listinfo/mailmate

Reply via email to