Check TLS certificate expiry with OpenSSL, curl and Nmap
Updated and checked: 27 October 2026. The original version of this article incorrectly treated the HTTP Date header as a certificate date. That header describes the HTTP response time. To inspect certificate validity, read the certificate itself. A TLS certificate has a validity window: notBefore is its validity start and notAfter is its expiry time. […]