How to get Python requests to trust a self signed SSL certificate?
try:
r = requests.post(url, data=data, verify='/path/to/public_key.pem')
Verify SSL certificate with Requests
To make requests
not complain about valid certificate, the certificate supplied to verify=
must contain any intermediate certificates. To download full chain, you can use Firefox (screenshots):
Click on page info:
Then download full PEM chain:
How to get ca certificates for python requests?
Correct command to import cacerts using python that worked for me is :
openssl s_client -showcerts -connect myhost.comapny.com:8443 </dev/null 2>/dev/null > company.ca
Then i supplied "company.ca" path, to the requests as a parameter to specify cacaert location.
Related Topics
Pandas Fill Missing Values in Dataframe from Another Dataframe
Python: Find_Element_By_Css_Selector
Pil: Convert Bytearray to Image
Python Postgres Psycopg2 Threadedconnectionpool Exhausted
How to Qcut with Non Unique Bin Edges
Popen with Conflicting Executable/Path
Python How to Write to a Binary File
Opencv Error: (-215)Size.Width>0 && Size.Height>0 in Function Imshow
How to Do a Not Equal in Django Queryset Filtering
Strange Behavior of Lists in Python
Catching an Exception While Using a Python 'With' Statement
Python Method for Reading Keypress
Is There a "Not Equal" Operator in Python
How to Set the Absolute Position of Figure Windows with Matplotlib
How to Change the Range of the X-Axis with Datetimes in Matplotlib