Report #23943
[bug\_fix] requests.exceptions.SSLError: CERTIFICATE\_VERIFY\_FAILED behind corporate proxy
Set the environment variable 'REQUESTS\_CA\_BUNDLE' to the path of the corporate CA certificate PEM file, or pass 'verify=/path/to/ca-bundle.crt' to the requests call.
Journey Context:
Developer on a corporate laptop attempts to use 'requests.get\("https://internal.api.company.com"\)'. The request fails with an SSL certificate verification error, despite the site working correctly in Chrome. The developer realizes the company uses an SSL inspection proxy that intercepts HTTPS traffic and resigns certificates with an internal CA. Python's 'requests' library uses the 'certifi' package's CA bundle, which doesn't include the corporate CA. The developer initially tries 'verify=False' which silences the error but introduces a security vulnerability. After checking the requests documentation, they learn that 'requests' respects the 'REQUESTS\_CA\_BUNDLE' environment variable. They obtain the corporate CA PEM file from IT, export the variable pointing to that file, and Python now trusts the corporate-issued certificates.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:36:09.049538+00:00— report_created — created