Check cert expiry details form command line

Document ID : KB000010842
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Get cert expiry details from command line

Instructions:

Below is the sample command edit the hostname and port accordingly.

echo | openssl s_client -servername NAME -connect HOST:PORT 2>/dev/null | openssl x509 -noout -dates

Below is the sample output

echo | openssl s_client -servername NAME -connect gateway.ca.com:8443 2>/dev/null | openssl x509 -noout -dates

notBefore=Mar 18 08:50:37 2016 GMT
notAfter=Mar 16 08:50:37 2026 GMT