[pyOpenSSL] Getting the next cert in hierarchy

Sebastian Greatful sebastianthegreatful at gmail.com
Sat Sep 20 13:19:04 CEST 2008


Get_subject was the key to it, not get_issuer. ofcourse J

 

Best regards,

Seb

 

 

Fra: Sebastian Greatful [mailto:sebastianthegreatful at gmail.com] 
Sendt: 20. september 2008 12:55
Til: pyopenssl-list at lists.sourceforge.net
Emne: Getting the next cert in hierarchy

 

As part of my verification I'm trying to retrieve the email embedded in the
certificate. However it returns None

 

I'm using the code below where _verify is the callback pass as the second
argument to the set_verify method of a context object.

Judging from this, http://89.150.104.27/~snot/certificate.PNG, screenshot it
seems like I need to get the second certificate in the certificate
hierarchy. but how do I access it?

 

31         def _verify(self, conn, cert, errno, depth, retcode):

 

<snip />

 

38                 print cert.get_issuer().emailAddress

 39                 self.accessRights.read = True

 40                 self.accessRights.write = True

 41                 return retcode

 

Best regards,

Seb

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pyopenssl-users/attachments/20080920/4b799cec/attachment.html>


More information about the pyopenssl-users mailing list