Re: Missing get0_signers in 0.17 and "header too long:asn1_lib.c" with 0.13 or 0.17 with p7m file
Marco Bizzarri <[email protected]>
| Newsgroups | gmane.comp.python.cryptography |
|---|---|
| Message-ID | <[email protected]> |
I'm sorry to post again on this topic. Reading from the changelog in 0.17 I understand get0_signer has been removed since its implementation was wrong. Is there any plan to re-add it soon? Otherwise, could someone provide hints on how it should be reimplemented in order to obtain a proper behaviour and not crashing python anymore? Regards Marco Marco Bizzarri wrote: > Hi all. I've two different problems with two files which should be > signed and readable. > > The first one is that it looks like the get0_signers method is missing > from the 0.17 of M2Crypto. Is there any problem in this method? > Otherwise, I can try to add it by myself copying from the code of > 0.13. > > The second one is with a p7m file. I try to do the following on it: > > def _load_pkcs7_bio_der(self, 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) > > def run(self, file): > import pdb; pdb.set_trace() > p7_bio = BIO.MemoryBuffer(file.read()) > try: > p7 = self._load_pkcs7_bio_der(p7_bio) > except: > return [] > > in the except branch I always get an exception with this file, with > the following exception: > > 6720:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too > long:asn1_lib.c:150: > > If posting the file to the list is appropriate, I can do it. > > Regards > Marco >