[rt-devel] RT3: mail UTF-8 automatic conversion and GPG verification

Guillaume Perréal perreal at lyon.cemagref.fr
Thu Aug 14 14:09:34 EDT 2003


Hi.

I'm (re)writing a GPG email authentication plug-in based on Jesse's 
enhanced-mailgate.

For now, this plug-in should only handle RFC3156 compliant messages (see "5. 
OpenPGP signed messages"), that is MIME "multipart/signed" messages composed 
of exactly two parts : the "signed" data (usualy "text/plain") and the 
armored signature ("application/pgp-signature").

As I always got "BAD signature", I looked at what is passed to gpg for 
verification :

[start of signed data]
content-type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: ISO-8859-15

test
[end of signed data]

DOH ! I forgot RT converts all text parts to UTF-8, "corrupting" the data 
before verification happens.

Any idea to work around this "feature" ?

Thanks,
-- 



More information about the Rt-devel mailing list