ERT
node
tls
ai_generated
true
Error: CERT_HAS_EXPIRED
ID: node/node-certificate-expired
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
TLS handshake failed because the server's SSL certificate has expired. Node.js strict TLS validation rejects expired certificates by default.
genericWorkarounds
-
95% success Renew the SSL certificate on the target server
Use certbot or your CA's renewal process: certbot renew --force-renewal, then restart the server
-
82% success Update the system CA certificate bundle
Run 'sudo update-ca-certificates' on Debian/Ubuntu or 'sudo update-ca-trust' on RHEL/CentOS
Sources: https://nodejs.org/api/tls.html
Dead Ends
Common approaches that don't work:
-
Setting NODE_TLS_REJECT_UNAUTHORIZED=0 in production
85% fail
Disables all certificate validation, exposing the application to man-in-the-middle attacks
-
Pinning the expired certificate in the trust store
80% fail
The certificate is expired; pinning it does not make it valid and other clients will still reject it
Error Chain
Preceded by:
Frequently confused with: