M2Crypto SMIME object has methods to load itself from PKCS#7 file in PEM format:
smime_object = SMIME.load_pkcs7('file.pem')
I do not see any method to load from PKCS#7 file in DER format. How can this be done?
In order to load a PKCS#7 in DER format, you should use an intermediate BIO like :
file = open('file.der')
bio = BIO.File(file)
smime_object = SMIME.PKCS7(m2.pkcs7_read_bio_der(bio._ptr()))