ERT node tls ai_generated true

Error: CERT_HAS_EXPIRED

ID: node/node-certificate-expired

Also available as: JSON · Markdown
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
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.

generic

Workarounds

  1. 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

    Sources: https://letsencrypt.org/docs/renewal/

  2. 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:

  1. Setting NODE_TLS_REJECT_UNAUTHORIZED=0 in production 85% fail

    Disables all certificate validation, exposing the application to man-in-the-middle attacks

  2. 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

Leads to:
Preceded by:
Frequently confused with: