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