Re: Read a content file from a P7M

Discussion in 'Python' started by Luca, Mar 12, 2009.

  1. Luca

    Luca Guest

    On Wed, Mar 11, 2009 at 5:05 PM, 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, ...)


    I'm there again!

    I found a document and some exaples related to the M2Crypto library
    http://eckhart.stderr.org/doc/python-m2crypto-doc/doc/howto.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
     
    Luca, Mar 12, 2009
    #1
    1. Advertising

  2. Luca wrote:
    > On Wed, Mar 11, 2009 at 5:05 PM, 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, ...)

    >
    > I'm there again!
    >
    > I found a document and some exaples related to the M2Crypto library
    > http://eckhart.stderr.org/doc/python-m2crypto-doc/doc/howto.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:

    List-Subscribe:


    Ciao, Michael.
     
    Michael Ströder, Mar 20, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vittorio
    Replies:
    0
    Views:
    1,092
    Vittorio
    Jan 14, 2004
  2. hazz
    Replies:
    6
    Views:
    49,919
    SkyUCHC
    Jun 9, 2010
  3. Luca
    Replies:
    0
    Views:
    319
  4. Emanuele Rocca

    Re: Read a content file from a P7M

    Emanuele Rocca, Mar 20, 2009, in forum: Python
    Replies:
    2
    Views:
    1,948
    jumpjack
    Jul 16, 2012
  5. Luca
    Replies:
    0
    Views:
    564
Loading...

Share This Page