Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Read a content file from a P7M

Reply
Thread Tools

Re: Read a content file from a P7M

 
 
Luca
Guest
Posts: n/a
 
      03-12-2009
On Wed, Mar 11, 2009 at 5:05 PM, Luca <(E-Mail Removed)> 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, ...)


I'm there again!

I found a document and some exaples related to the M2Crypto library
http://eckhart.stderr.org/doc/python...wto.smime.html

I tryed to use this:

>>> from M2Crypto import BIO, SMIME, X509
>>> p7, data = SMIME.smime_load_pkcs7('/Users/luca/Desktop/testsigned.pdf.p7m')

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "build/bdist.macosx-10.5-i386/egg/M2Crypto/SMIME.py", line 91,
in smime_load_pkcs7
M2Crypto.SMIME.SMIME_Error: no content type

May be this is the wrong library... but even Google can't help me a
lot with this problem


--
-- luca
 
Reply With Quote
 
 
 
 
Michael Ströder
Guest
Posts: n/a
 
      03-20-2009
Luca wrote:
> On Wed, Mar 11, 2009 at 5:05 PM, Luca <(E-Mail Removed)> 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, ...)

>
> I'm there again!
>
> I found a document and some exaples related to the M2Crypto library
> http://eckhart.stderr.org/doc/python...wto.smime.html
>
> I tryed to use this:
>
>>>> from M2Crypto import BIO, SMIME, X509
>>>> p7, data = SMIME.smime_load_pkcs7('/Users/luca/Desktop/testsigned.pdf.p7m')

> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "build/bdist.macosx-10.5-i386/egg/M2Crypto/SMIME.py", line 91,
> in smime_load_pkcs7
> M2Crypto.SMIME.SMIME_Error: no content type
>
> May be this is the wrong library... but even Google can't help me a
> lot with this problem


I can't help with your particular problem but there are quite a few
people familiar with M2Crypto lurking on the python-crypto mailing list:

https://listserv.surfnet.nl/archives/python-crypto.html

Despite this Dutch entry page the language written on the mailing list
is English.

List-Unsubscribe:
http://www.velocityreviews.com/forums/(E-Mail Removed)
List-Subscribe:
(E-Mail Removed)

Ciao, Michael.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Read a content file from a P7M Emanuele Rocca Python 2 07-16-2012 03:17 PM
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Re: Read a content file from a P7M Luca Python 0 08-28-2009 01:33 PM
Read a content file from a P7M Luca Python 0 03-11-2009 04:05 PM
ParsingException reading P7M file Vittorio Java 0 01-14-2004 10:45 AM



Advertisments