When does my certificate expire?

Automated checking

"ssl-cert-check is a Bourne shell script that checks the expiration status of digital certificates on SSL servers. It supports both interactive and batch modes and easily integrates with cron. It provides custom expiration thresholds and can be configured to send email if a certificate is close to expiring."

Users may also wish to consider the check-expire Perl script.

Manual checking

To manually check the expiration date of a STARTTLS certificate:

1. Retrieve the certificate.
$ echo "" | openssl s_client -connect server:25 -starttls smtp > certificate

2. Check the expiration date of the certificate.
$ openssl x509 -in certificate -noout -enddate
notAfter=Dec 29 15:03:36 2006 GMT

To manually check the expiration date of an SSL certificate:

1. Retrieve the certificate.
$ echo "" | openssl s_client -connect server:443 > certificate

2. Check the expiration date of the certificate.
$ openssl x509 -in certificate -noout -enddate
notAfter=Jan 13 00:08:42 2007 GMT

Back to brandonhutchinson.com.
Last modified: 2006/04/25