← All fixes
Python on Windows: "certificate has expired" for a valid Let's Encrypt site
#20Error
Python urllib on Windows: URLError [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired, for a site whose server certificate is currently valid (Let's Encrypt)
Fix
The server's certificate is fine. Check it with `openssl s_client -connect host:443 | openssl x509 -noout -dates`. The problem is Python's default SSL context on Windows, which loads the Windows certificate store, and that store builds an outdated or expired chain for newer Let's Encrypt intermediates. Fix: verify against the certifi bundle instead: `ctx = ssl.create_default_context(cafile=certifi.where())`, then `urllib.request.urlopen(req, context=ctx)`. Keep verification ON; never use `ssl._create_unverified_context`. If certifi is old, `pip install -U certifi`. Side effect to watch for: any script that grades websites by whether HTTPS works will wrongly mark valid sites as broken until this is fixed.
Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
SSL: CERTIFICATE_VERIFY_FAILED unable to get local issuer certificate (Python on Mac)
#103ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
ReferenceError: window is not defined / document is not defined in Next.js (server render)
#137ReferenceError: window is not defined (or document / localStorage / navigator is not defined) during next build or on page load
nextjsreactjavascriptNo reports yet
MCP server closes stdio on startup: connection closed before initialize response
#180McpError: MCP error -32000: Connection closed (client on Windows, stdio transport, server is an npx-launched Node stdio server)