The verification fails because the server you are accessing is not configured correctly, that is, it is not an error of your installation or code. Looking at the report from SSLLabs , you see
This server certificate chain is incomplete. Rank closed to B.
This means that the server sends a certificate chain that does not have an intermediate trusted root certificate, and thus your client cannot create a trust chain. Most desktop browsers work around this problem by trying to obtain a missing certificate from another location, but in this case the normal TLS libraries will fail. You will need to explicitly add the missing chain certificate as endowed to solve this problem:
import requests requests.get('https://api.sidecar.io', verify = 'mycerts.pem')
mycerts.pem
must contain a missing intermediate certificate and a trusted root certificate. A verified version for mycerts.pem
can be found at http://pastebin.com/aZSKfyb7 .
source share