I'm getting certificate verify failed errors for a few websites including Google. I've just tried with a new Digital Ocean droplet and still having the same issues so it's not just my server.
I did the following, create a new Ubuntu 14.04 droplet on Digital Ocean. Installed python-pip (python and OpenSSL were already installed). Upgraded requests to the latest version (pip install requests --upgrade) and installed security (pip install requests[security]). Just to confirm, the droplet originally came with requests version 2.2.1, hence the reason for upgrading to 2.9.1. I also installed the pip modules: certifi and urllib3.
Before upgrading requests and installing the other modules, I ran import requests and requests.get("https://www.google.co.uk"). This worked fine and returned 200.
After upgrading and installing the other packages, I got the following:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 67, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 53, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 447, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I'm getting certificate verify failed errors for a few websites including Google. I've just tried with a new Digital Ocean droplet and still having the same issues so it's not just my server.
I did the following, create a new Ubuntu 14.04 droplet on Digital Ocean. Installed python-pip (python and OpenSSL were already installed). Upgraded requests to the latest version (pip install requests --upgrade) and installed security (pip install requests[security]). Just to confirm, the droplet originally came with requests version 2.2.1, hence the reason for upgrading to 2.9.1. I also installed the pip modules: certifi and urllib3.
Before upgrading requests and installing the other modules, I ran
import requests
andrequests.get("https://www.google.co.uk")
. This worked fine and returned 200.After upgrading and installing the other packages, I got the following:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 67, in get return request('get', url, params=params, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 53, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 468, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 576, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 447, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I tried it on https://github.com and it worked perfectly. I tried it on https://google.com and https://themoviedb.org and both has certificate verify failed errors even though they both have valid certificates.