I want to use Python Requests to get the contents of internal company web page (say, https://internal.com). I can see this page in the browser, and I can \"view the certifi
The cert
parameter is for client-side authentication. If you wanted to prove your identity to the server. If this was the problem you would get an error on the server.
What you need is server-side authentication. The server has to prove it's identity. As your are connecting to an internal server requests doesn't have this server certificate in it's supplied bundle and therefore can't confirm the servers identity. You have to supply requests with your internal CA-bundle. To do this you have to extract it from your browser first.
From the docs:
You can also pass "verify" the path to a "CA_BUNDLE" file for private certs.
You can also set the "REQUESTS_CA_BUNDLE" environment variable.
Chrome (short version):
chrome://settings/certificates
export
You can also visit the certificate manager by:
(Steps for chrome, quite similar for other browsers)
Make sure when you export the crt, to select in the file type save as dropdown "export with chain" - so that it will have all three certs in one. That was my issue.