You can make an SSL connection from the command line this way:
echo '' | openssl s_client -connect www.google.com:443
The output will contain a base64 encoded X.509 certificate.
To view additional information,
... | openssl x509 -fingerprint -text
, "-text" "-out /dev/null".