[PYTHON-CRYPTO] m2crypto-0.13 problem

Robert Penz robert.penz at OUTERTECH.COM
Wed Dec 15 17:28:24 CET 2004


G Dang writes:

> This issue is neither a M2Crypto or OpenSSL bug.  It's explained
> in this thread:
> http://www.mail-archive.com/openssl-dev@openssl.org/msg16733.html
>
> I struggled with this one as well.  When using in memory BIO
> (ie. BIO.MemoryBuffer -> BIO_s_mem) with base64 encoded data,
> like an enveloped message, you'll need to call
>     m2.bio_set_mem_eof_return(bio._ptr(), 0)
> after loading the bio.

cool .. thx that works

from M2Crypto import BIO, SMIME, X509, m2
X-Mozilla-Status: 8000
X-Mozilla-Status2: 00000000
....
       bio = BIO.MemoryBuffer(out)
       m2.bio_set_mem_eof_return(bio._ptr(), 0)
       p7, data = SMIME.smime_load_pkcs7_bio(bio)

work now ... doesn't look that good to call m2 directly .. but it works ..
big thx!





More information about the python-crypto mailing list