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.

Advertisement

Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement