[PYTHON-CRYPTO] M2Crypto 0.18 Roadmap
Heikki Toivonen
heikki at OSAFOUNDATION.ORG
Mon Jun 11 21:08:05 CEST 2007
Kershaw, PJ (Philip) wrote:
> This uses pyOpenSSL but I wanted to use M2Crypto. In one case, MyProxy
> server returns a list of certificates which are parsed used in Tom's
> code using pyOpenSSL OpenSSL.crypto.load_certificate ...
>
> # extract der-format cert, and convert to pem
> c = dat[ind:ind+len+4]
> => x509 = crypto.load_certificate(crypto.FILETYPE_ASN1,c)
> pem_cert = crypto.dump_certificate(crypto.FILETYPE_PEM,x509)
> pem_certs.append(pem_cert)
>
> I couldn't see an M2Crypto equivalent so I looked into the pyOpenSSL C
> source code. The C function used is d2i_X509_bio(). I made a wrapper
> for this in my own version of M2Crypto adapting X509.load_cert_string()
I think that this will be addressed by bug
https://bugzilla.osafoundation.org/show_bug.cgi?id=9259
--
Heikki Toivonen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20070611/ecc87475/attachment.pgp>
More information about the python-crypto
mailing list