You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I initially thought requests.certs.where (as well as certifi.where) returned the location of the cacert file actually being used, and I could use it to verify that the correct file was loaded. I am not the only one to make this mistake: https://stackoverflow.com/a/42982144/735070.
I have realized though, that it simply return the path of the bundled cacert file that comes included with the library.
Currently requests.certs.where.__doc__ returns null. How about
returns the path of the CA-certs bundle that is included with the requests package, ie not necessarily the bundle actually being used.
Improve documentation - How is CA-bundle chosen
Maybe the simplest way of making this clear is to add a section with a list or decision tree that shows which file (if any) will be used as CA-certs bundle.
Add some way of getting the bundle actually being used
In my case a static function, requests.cacerts_loaded(). I realize this may return a file different from the one being used, if the user specifies verify (and maybe its possible to change in other ways too).
Demonstration run on
certifi version: 2023.05.07
requests version: 2.25.1
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
The text was updated successfully, but these errors were encountered:
I initially thought
requests.certs.where
(as well ascertifi.where
) returned the location of the cacert file actually being used, and I could use it to verify that the correct file was loaded. I am not the only one to make this mistake: https://stackoverflow.com/a/42982144/735070.I have realized though, that it simply return the path of the bundled cacert file that comes included with the library.
Demonstration of this behavior:
Running test.py in shell with REQUESTS_CA_BUNDLE set:
Improve documentation - requests.certs.where-function
Currently
requests.certs.where.__doc__
returns null. How aboutreturns the path of the CA-certs bundle that is included with the requests package, ie not necessarily the bundle actually being used.
Improve documentation - How is CA-bundle chosen
Maybe the simplest way of making this clear is to add a section with a list or decision tree that shows which file (if any) will be used as CA-certs bundle.
Add some way of getting the bundle actually being used
In my case a static function,
requests.cacerts_loaded()
. I realize this may return a file different from the one being used, if the user specifiesverify
(and maybe its possible to change in other ways too).Demonstration run on
The text was updated successfully, but these errors were encountered: