How to check certification expiration date from command line
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]
openssl s_client -connect your_example.comopenssl x509 -noout -subject
See also[edit]
openssl x509[-inform | -text | -dates | -req | -subject | -issuer|--help]openssl[rand | s_client | passwd|openssl req|openssl rsa|openssl genrsa|openssl x509|openssl ca|openssl verify|openssl ec|openssl dgst|openssl pkcs12|openssl asn1parse|openssl help|.cer to .pem, openssl version
Advertising: