Python Certificate Error - using requests and certifi packages -


we have distribution of python web servers, , 1 particular server getting strange ssl error. i've narrowed down specific in requests and/or certifi packages.

using following code:

import requests requests.get('https://www.google.com', verify='/usr/local/lib/python2.7/dist-packages/certifi-2016.9.26.dist-info/cacert.pem') 

i following error:

traceback (most recent call last): file "", line 1, in file "/usr/local/lib/python2.7/dist-packages/requests-2.5.0-py2.7.egg/requests/api.py", line 65, in return request('get', url, **kwargs) file "/usr/local/lib/python2.7/dist-packages/requests-2.5.0-py2.7.egg/requests/api.py", line 49, in request response = session.request(method=method, url=url, **kwargs) file "/usr/local/lib/python2.7/dist-packages/requests-2.5.0-py2.7.egg/requests/sessions.py", line 461, in request resp = self.send(prep, **send_kwargs) file "/usr/local/lib/python2.7/dist-packages/requests-2.5.0-py2.7.egg/requests/sessions.py", line 573, in send r = adapter.send(request, **kwargs) file "/usr/local/lib/python2.7/dist-packages/requests-2.5.0-py2.7.egg/requests/adapters.py", line 431, 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

as mentioned, works fine on our other web servers, on 1 server. i've tried reinstalling certifi, , have confirmed pem file looks good. https://www.google.com cert should there.

the part i'm confused maybe it's suppose using sort of intermediate certificate file? gets installed outside of certifi package?


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -