Friday, September 19, 2008

Python script to get SSL Certificate information

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


  1. 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.



  2. Thank you very much!
    Your work is very much appreciated!

  3. Thank you very much, very useful was about to look into writing my own and came across your script.
    Much appreciated.


Note: Only a member of this blog may post a comment.