Read a content file from a P7M

Michael Ströder michael at stroeder.com
Fri Mar 20 11:46:00 EDT 2009


Emanuele Rocca wrote:
> On 11/03/09 - 05:05, Luca wrote:
>> There is standard or sugested way in python to read the content of a P7M file?
>>
>> I don't need no feature like verify sign, or sign using a certificate.
>> I only need to extract the content file of the p7m (a doc, a pdf, ...)
> 
> For PDF files you can just remove the P7M content before %PDF and after
> %%EOF.

If the .p7m is a S/MIME message then it might be encrypted. So you have
to decrypt it. It could also be a opaque-signed S/MIME message. But
still I'd use a decent S/MIME module to extract the stuff therein.

Ciao, Michael.



More information about the Python-list mailing list