Python script to get SSL Certificate information
Posted by kc on Sep 19th, 2008
Some time ago I needed an automated way to get the certificate DN, signing cert DN, and expiration date from a bunch of SSL web servers. I couldn’t find a free tool out there to do that, so I hacked up this script in python.
You provide it the IP address and it connects, retrieves the aforementioned information, and spits it out. There isn’t any error handling &etc, but I thought someone else might find it helpful. Or use it as a starting point for something more advanced.
It requires the M2Crypto library, since the built-in SSL library for python is SORELY LACKING in functionality.
EDIT: 2010.01.26 – Fixed broken link caused by new hosting provider!
Grab it here: sslprobe.python
January 26th, 2010 at 5:48 pm
Hey Man
That script would be so useful to me, can you email that to me if you still have it, it would save me a ton of time.
Cheers
C
September 16th, 2011 at 10:28 am
Thank you very much!
Your work is very much appreciated!