From 30e75adce65edfaf782ffdaf713dd0931e58fc83 Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Wed, 11 Mar 2026 07:05:54 +0300 Subject: Prefer CA bundle set by SSL_CERT_FILE and SSL_CERT_DIR (common part) - **library/cpp/openssl: prefer CA set by SSL_CERT_FILE and SSL_CERT_DIR** - **contrib/tools/python3: prefer CA set by SSL_CERT_FILE and SSL_CERT_DIR** - **library/python/certifi: prefer CA set by SSL_CERT_FILE and SSL_CERT_DIR** First three commits from PR #1607 to change common part separately. --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1635 Co-authored-by: shadchin Co-authored-by: shadchin commit_hash:21db0cd5fe3b4af267dcf5ec4d2753fbdd49ba1e --- library/python/certifi/certifi/binary.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'library/python') diff --git a/library/python/certifi/certifi/binary.py b/library/python/certifi/certifi/binary.py index 1050e733a38..8fc22a4a7a0 100644 --- a/library/python/certifi/certifi/binary.py +++ b/library/python/certifi/certifi/binary.py @@ -1,8 +1,12 @@ import ssl +import os def builtin_ca(): - return None, None, ssl.builtin_cadata() + cafile, capath = os.getenv("SSL_CERT_FILE"), os.getenv("SSL_CERT_DIR") + if cafile is None and capath is None: + return None, None, ssl.builtin_cadata() + return cafile, capath, None # Normally certifi.where() returns a path to a certificate file; -- cgit v1.3