Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Email: remove S/MIME or PGP signature?by tlhackque (Beadle) |
on Apr 08, 2017 at 18:33 UTC ( [id://1187480]=perlquestion: print w/replies, xml ) | Need Help?? |
tlhackque has asked for the wisdom of the Perl Monks concerning the following question:
There are Perl modules for signing & verifying S/MIME - signed (and PGP -signed) e-mail.
I have the inverse problem: A mailing list filter that wants to unwrap signed messages (that is, remove the multipart/signed wrapper & corresponding signature, but retain the rest of the MIME structure). Verification is optional. This turns out to be involved because headers have to move between the main message body and the sub parts, and there can be signed parts of a multipart (e.g. multipart/mixed or multipart/digest) message. Before I undertake the chore of figuring this out: Has anyone done this or know of an existing module (or command)? FWIW: The messages have already been parsed by MIME::Parser (from MIME::Tools), but while adding parts to MIME::Entities is documented/discoverable, unwrapping doesn't seem to have been contemplated... In case you're wondering, besides being big, signatures are invalidated by the filter, which modifies the messages - it removes certain content in the text sections and may even add attachments. Also: These are cryptographic signatures, not the "signature" referred to in MIME::Tools. Thanks in advance for any hints/pointers/code
Back to
Seekers of Perl Wisdom
|
|