Find expiry date for SSL certificate using openssl

To find the expiry date of an SSL certificate using openssl command, run

openssl x509 -noout -dates -in /path/to/domain.crt

Example

root@ok:~# openssl x509 -noout -dates -in /etc/ssl/serverok.in.crt
notBefore=Aug 16 22:37:11 2021 GMT
notAfter=Sep 17 22:37:11 2022 GMT
root@ok:~# 

notBefore is the start date for the SSL. notAfter is the expiry date for the SSL.

See OpenSSL

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *