Requests allows setting path to a CA certificate bundle that should be used instead of the default system one using the following environment variables: REQUESTS_CA_BUNDLE and CURL_CA_BUNDLE.
https://github.com/kennethreitz/requests/blob/v2.8.1/requests/sessions.py#L621
Please make it also check SSL_CERT_FILE environment variable in the same way. This variable is recognized by OpenSSL and is documented in PEP 476 as a way to make Python standard library https clients use non-default CA bundle file:
https://www.python.org/dev/peps/pep-0476/#trust-database
It sounds reasonable to have a single environment variable that can be used for all Python scripts regardless of whether they are using requests or standard library httplib / urllib*.
In terms of the fix, a simple or os.environ.get('SSL_CERT_FILE') should do the trick.
Requests allows setting path to a CA certificate bundle that should be used instead of the default system one using the following environment variables:
REQUESTS_CA_BUNDLEandCURL_CA_BUNDLE.https://github.com/kennethreitz/requests/blob/v2.8.1/requests/sessions.py#L621
Please make it also check
SSL_CERT_FILEenvironment variable in the same way. This variable is recognized by OpenSSL and is documented in PEP 476 as a way to make Python standard library https clients use non-default CA bundle file:https://www.python.org/dev/peps/pep-0476/#trust-database
It sounds reasonable to have a single environment variable that can be used for all Python scripts regardless of whether they are using
requestsor standard libraryhttplib/urllib*.In terms of the fix, a simple
or os.environ.get('SSL_CERT_FILE')should do the trick.