Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can use the openssl command to check the expiry of an SSL certificate in the Command Line. Here's how:

First, identify the location of the certificate file you want to check. This will depend on your server configuration and which SSL/TLS software you're using.

Use the following command to check the expiry date of the certificate:

openssl x509 -enddate -noout -in /path/to/certificate.pem

Replace /path/to/certificate.pem with the actual path to your certificate file.

This command will output the expiry date and time of the certificate in the following format:

notAfter=MM/DD/YYYY HH:MM:SS GMT

The notAfter field shows the date and time after which the certificate is no longer valid.