x509 certificate has expired or is not yet valid while the certificate is valid
Issue
- The certificate check is failing, but the certificate configured in the server is currently valid.
- The browser shows the site as "
Not Secure". -
The
curloutput shows the certificate is expired, but the certificate configured is valid:* TLSv1.3 (OUT), TLS alert, certificate expired (557): * SSL certificate problem: certificate has expired * Closing connection 0 curl: (60) SSL certificate problem: certificate has expired -
The
oc logincommand shows an error similar to the following, but the API certificate is valid:The server is using an invalid certificate: x509: certificate has expired or is not yet valid: current time 2025-01-01T00:00:00Z is after 2024-12-31T23:59:59Z" - Only in some machines, there are
x509: certificate signed by unknown authorityerrors.
Environment
- Red Hat Enterprise Linux (RHEL)
- Red Hat OpenShift Container Platform (RHOCP)
- Certificates
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.