Find expiry date for SSL certificate using openssl
To find the expiry date of an SSL certificate using openssl command, run
1 |
openssl x509 -noout -dates -in /path/to/domain.crt |
Example
1 2 3 4 |
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