X509 certificate

Ng Pheng Siong ngps at madcap.dyn.ml.org
Fri Dec 10 09:30:35 EST 1999


According to Meera  <meera_bavadekar at hp.com>:
> How can I extract certificate DN (distinguished name) and issuer DN from
> a X.509 certificate in python ?

Is the cert coming over SSL as part of handshaking, or are you reading 
it from a file or some other clear-text stream?

If the former, your SSL library should have a way to let you extract
said info from the SSL connection. (I think M2Crypto is quite close,
(maybe my development version), but doesn't yet do it all.)

If the latter, your crypto library should have a way to allow loading 
and parsing of said certificate, whether in PEM or DER format. 
(Ditto M2Crypto comment.)

Now, if you were talking about PGP packets... ;-)


-- 
Ng Pheng Siong <ngps at post1.com> * http://www.post1.com/home/ngps




More information about the Python-list mailing list