Retrieve and parse certificate from server
$ echo | openssl s_client -connect servername:443 \ | openssl x509 -noout -text
openssl s_client -CAfile ./CAcert.pem -connect servername:1636 -ssl3
openssl s_client -connect servername:1636 -cert clientcert.cer -certform DER -key clientkey.key
Parse an ASN.1 sequence.
$ openssl asn1parse -inform DER -in sample.cer -dump