SSL Labs has a web application that checks a site's SSL certificate and setup, and points out problems with them.
I would like to perform similar checks using a CLI tool, e.g. for incorporation in test scripts. Does such a tool exist?
(I'd prefer commands available via APT on Ubuntu, but if there are none, something else would be OK too.)