79188891

Date: 2024-11-14 13:15:50
Score: 4
Natty:
Report link

I took a peek at the source for requests and found this comment:

https://github.com/psf/requests/blob/23540c93cac97c763fe59e843a08fa2825aa80fd/src/requests/certs.py#L10C1-L12C20


If you are packaging Requests, e.g., for a Linux distribution or a managed environment, you can change the definition of where() to return a separately packaged CA bundle

This is supported by the docs as well: https://requests.readthedocs.io/en/stable/user/advanced/#ca-certificates which states that requests merely relies on the certifi package.

so, you can look at the certifi source and figure out how to monkey patch the where function.

https://github.com/certifi/python-certifi/blob/master/certifi/core.py

I don't see anything in the certifi source that reads from a place other than the pem file packaged with it.

Perhaps you and your client have different versions of python/certfi installed on your systems and aligning them would help?

Thanks, Mark

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Contains signature (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: Mark