python / python/cpython

`SSL_CERT_FILE` and `SSL_CERT_DIR` environment variables are ignored

Open
#138,795 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

3.13 3.14 3.15 extension-modules pending topic-SSL type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

Hello,

Since Python 3.13, the following environment variables are no longer honored :

  • REQUESTS_CA_BUNDLE
  • SSL_CERT_FILE
  • SSL_CERT_DIR

This is problematic in a corporate environment where a custom CA must be added. This was the only reliable way to make existing code, especially external libraries, trust a custom CA. It was easy and functional, and I don't understand why this feature is no longer here.

In addition, this new behavior is not sufficiently documented, and no workaround is proposed.

Thank you

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported behavior on Python 3.13 for Windows with REQUESTS_CA_BUNDLE, SSL_CERT_FILE, and SSL_CERT_DIR set. Trace how certificate configuration is handled and document a working fix or workaround so existing code can trust a custom CA again.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.