Websitetemplate.org

Welcome > Linux > Miscellaneous > Certificate Expiry

Certificate Expiry

To find out when your SSL cert expires, like on your HTTPS or LDAPS server:

echo | openssl s_client -connect server:port -showcerts 2>/dev/null | openssl x509 -noout -enddate | grep notAfter

Sample Output

[george /tmp]$ echo | openssl s_client -connect ldapserver:636 -showcerts 2>/dev/null | openssl x509 -noout -enddate | grep notAfter
notAfter=Aug 23 23:59:59 2014 GMT
 
[george /tmp]$

Content Copyright 2003-2014 George Toft