How To Check SSL Through CLI

You can verify SSL certificates with Wget, and Curl on the command line using the following steps:

curl --verbose https://blog.lalatendu.info

curl --cert-status https://blog.lalatendu.info

curl https://blog.lalatendu.info -vI

curl --insecure -vvI https://blog.lalatendu.info 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'

wget --server-response --spider  https://blog.lalatendu.info

echo | openssl s_client -showcerts -servername blog.lalatendu.info -connect blog.lalatendu.info.org:443 2>/dev/null | openssl x509 -inform pem -noout -text


echo | openssl s_client -showcerts -servername gnupg.org -connect gnupg.org:443 2>/dev/null | openssl x509 -inform pem -noout -text

How can one determine if a certificate is a wildcard certificate using the command-line interface (CLI) in Debian (Ubuntu), Fedora (RHEL, CentOS) ?

openssl x509 -in /path/to/your/certificate.crt -noout -text | grep "Subject:"

How can one verify certificate expiration via the CLI in (Ubuntu) Fedora (RHEL, CentOS) ?

openssl x509 -noout -in /path/to/your/certificate.crt -dates