[PYTHON-CRYPTO] Small patch to SMIME.py

Marco Bizzarri m.bizzarri at ICUBE.IT
Thu Jun 16 15:42:04 CEST 2005


Hi all.

I don't know if you will find it useful... we added this method to 
SMIME.py since it was not available:

def load_pkcs7_bio_der(p7_bio):
     p7_ptr = m2.pkcs7_read_bio_der(p7_bio._ptr())
     if p7_ptr is None:
         raise Err.get_error()
     return SMIME.PKCS7(p7_ptr, 1)

This is because load_pcks7_bio loads a PEM encoded file, but, of course, 
chokes on a DER file.

Regards
Marco





More information about the python-crypto mailing list