Check the expiration date of an SSL certificate

Troubleshoot certificate issues by checking the expiration of the certificate.

How to

  1. Open a UNIX command line window.
  2. Perform a query such as, echo | openssl s_client -servername <NAME> -connect <HOST:PORT> 2>/dev/null | openssl x509 -noout -dates.
    The expiration date appears in the response.

Example

$ echo | openssl s_client -servername app.domain.com -connect app.domain.com:443 2>/dev/null | openssl x509 -noout -datesnotBefore=Dec 17 00:00:00 2014 GMTnotAfter=Mar 28 12:00:00 2018 GMT