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]>
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

-- 
Marco Bizzarri
http://iliveinpisa.blogspot.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.