This script parses PEM or DER certificates, requests, CRL's, PKCS#12, PKCS#7 & PKCS#8 files, Java keystores, NSS databases, Diffie-Hellman / DSA / Elliptic Curve parameters and private & public keys (from OpenSSH too). It uses OpenSSL for most operations (unless the openssl variable is empty), otherwise it uses GnuTLS' certtool. If the certtool variable is empty, Java's keytool is used instead.
certinfo.sh FILE [PASSWORD|PASSWORD_FILE]
certinfo.sh -h [https://]SERVER[:PORT]
certinfo.sh CRL [CAfile]