Skip to content Skip to sidebar Skip to footer

Python Ssl Certificate_verify_failed

I'm using the following code to interact with a Magento webstore using the XMLRPC api. Magento API Python XMLRPC Everything was working ok until we made a change on our web server

Solution 1:

Python, or better the OpenSSL library it is using, can not verify the validity of the certificate of the server. There are many possible reasons: bad configuration, missing intermediate or CA certificate, wrong CN...

A first step could be to go to this site and let it test the SSL/TLS capabilities of the server: https://www.ssllabs.com/ssltest/

It will give you hints on how to solve problems as well.

Solution 2:

Python verifies certs via its own bundle, check where it is located by

>>>import certifi>>>certifi.where()
'/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site- 
packages/certifi/cacert.pem'

and add your certificates to the end of that file.

Post a Comment for "Python Ssl Certificate_verify_failed"