Print notBefore and notAfter fields from a certificate file.
Section: HTTP and TLS Testing
Show certificate dates
bash
bash
openssl x509 -in cert.pem -noout -datesExplanation
Print notBefore and notAfter fields from a certificate file.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing HTTP and TLS Testing
Inspect TLS certificate chain
Open a TLS session and print certificate details.
Send request from interface
Use a specific local interface for outbound traffic.