DEV Community

Cover image for SSL certificate verify failed through a proxy: find the hop
proxymint
proxymint

Posted on Originally published at proxymint.com

SSL certificate verify failed through a proxy: find the hop

Originally published on proxymint.

SSL certificate verify failed behind a proxy? Find out which hop rejected the certificate, read the error text, and trust the right root without verify=False.

TL;DR

  • Read the words after the last colon first. self-signed certificate in certificate chain through a proxy usually means something re-signed the traffic, often a company gateway or antivirus, and your client doesn't trust its root.
  • Look for a ProxyError wrapper around the SSL error. SSLCertVerificationError sitting inside ProxyError means requests failed on the proxy's own certificate. Check for https:// in your proxy URL before anything else.
  • SSL_CERT_FILE won't help requests. It reads REQUESTS_CA_BUNDLE, and in a test on 2026-11-05 that variable even overrode session.verify, which is why this one eats so much time.
  • A break right after moving to Python 3.13 points at strict checking. It now refuses some roots that curl and Node still accept, with reasons like CA cert does not include key usage extension. Adding the root again does nothing, and what you need is a reissued one.

Key takeaways

  • Run openssl s_client through the proxy before touching code. The i: line names who signed what your client received, and that one name decides which fix applies.
  • Build a combined bundle from certifi plus your root. A root-only REQUESTS_CA_BUNDLE replaces certifi, so hosts your proxy doesn't intercept start failing.
  • Keep verify=False out of production. It accepts any certificate for any hostname, and on requests it switched off the proxy check too.
  • Upgrade to urllib3 2.8.0 if you use a TLS proxy. Advisory GHSA-8988-9cw3-xx77 (2026-09-15) covers 1.26.0 through 2.7.0, where target settings could override the proxy's.
  • Don't retry a certificate failure. It repeats until the configuration changes, so fail fast and log the reason text.

Read the full guide on proxymint, with the commands, tables and sources.

Top comments (0)