[Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156)

Chris Powell chris at grubbybaby.com
Sat Mar 1 20:32:01 EST 2008


Hi, everyone.  I'm struggling to cryptographically sign an email-with- 
attachments.

I made a little visual aid:  http://web.mac.com/videophile/signed.png

RFC 3156 (PGP/MIME) says that when you PGP-sign a message, you sign  
everything, attachments too.  In my visual aid, the blue shaded area  
(yes, that whole area) is the "signed" portion.  Any alteration of  
that area renders the signature invalid.

It's possible to prepare and assemble the "blue section" as a string,  
and then generate the PGP signature and tack it on with its own MIME  
headers.  But when I do "mail=TMail::Mail.parse(string_version)",  
TMail alters all my MIME boundaries to its own internally-generated  
ones.  This poses something of a problem, as this invalidates the PGP  
signature; the bytes have been altered.

The challenge boils down to something very, very simple: is there a  
way to get TMail to just 'trust me' and accept my fully-formed body- 
data and headers without altering them at parse-time?  That way I  
could just hand-assemble an exact string form of the message, then  
TMail-ify it and send.

I'm grateful for any thoughts...I sure can't find any reference of  
prior art on this one.

Regards,
Chris P.
--
Chris Powell                        "Exit, pursued by a bear."
chris at grubbybaby.com                 - Shakespeare, "The Winter's Tale"




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/tmail-talk/attachments/20080301/05a68492/attachment.html 


More information about the Tmail-talk mailing list