How to check certification expiration date from command line

From wikieduonline
Jump to navigation Jump to search
set DOMAIN yourdomain.com
openssl s_client -servername $DOMAIN -connect $DOMAIN:443 2>/dev/null | openssl x509 -noout -dates
notBefore=Jan 30 00:00:00 2026 GMT
notAfter=Feb 27 23:59:59 2027 GMT


CONNECTED(00000003)


openssl x509 -noout -dates -in /tmp/ca.cert
notBefore=Nov 10 19:45:26 2022 GMT
notAfter=Nov  7 19:45:26 2032 GMT


Related[edit]

See also[edit]

Advertising: