SSL ERRORS
certificate has expired: causes and fixes
A certificate in the chain is past its notAfter date. Read the verification depth to identify whether the expired certificate is the website leaf or an issuer.
What it means
Depth 0 refers to the leaf. Higher depths concern certificates further up the chain built for this verification. Client time and chain selection matter; an unexpired leaf can still depend on an unacceptable issuer path.
What to check
- Record the verification depth, certificate subject and notAfter time.
- Compare UTC time with a reliable source.
- Preserve the s_client handshake transcript and compare its served leaf fingerprint with the renewed certificate file.
Test the connection
openssl s_client -connect www.example.com:443 -servername www.example.com \
-verify_hostname www.example.com -verify_return_error </dev/nullRun this OpenSSL 3.x example in a POSIX shell. Keep the hostname, peer address and full verification result with the error report.
How to fix it
- For an expired leaf, renew or reissue and deploy the replacement at the TLS terminator.
- For an expired intermediate path, configure the appropriate current CA chain and retest with the affected trust store.
- Correct a client clock error separately; reload processes still serving an older certificate.
Check the fix
Run a hostname-aware s_client test with -verify_return_error. Confirm the relevant chain now verifies and inspect the command’s own exit status, not just a downstream pipeline result.
Details worth checking
Keep the s_client exit status when extracting dates through a pipeline. A shell normally reports the status of the last command, which may be openssl x509 rather than the failed connection.
Related guides
- Fix an expired website SSL certificate
- Renewed certificate, but the server still serves the old one
- Repair missing intermediates and client trust differences