這是一個後續到SSLError using requests for python:Python的請求拋出SSL錯誤
我剛纔在Mac OSX 10.8.5安裝requests
。我在做requests.get
第一次嘗試失敗失蹤證書:
SSLError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
以上的線程說找
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/cacert.pem
但實際上我甚至不具有.../site-packages/requests
目錄。如果這應該已經被安裝(我用pip
)而且線程添加和
requests
文檔說要安裝certifi
,所以我也很我不清楚。但現在我得到一個不同的錯誤:python -c 'import requests; requests.get("https://api.github.com/events")' /usr/lib/anaconda/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Traceback (most recent call last): ... File "/usr/lib/anaconda/lib/python2.7/site-packages/requests/adapters.py", line 431, in send raise SSLError(e, request=request) requests.exceptions.SSLError: [Errno 1] _ssl.c:504: error:0D0890A1:asn1 encoding routines:ASN1_verify:unknown message digest algorithm
謝謝!
你的問題是什麼?您需要明確指出您希望社羣爲您提供幫助的問題。 – G4bri3l
這種錯誤對於使用SHA-256簽名的較舊的OpenSSL版本和證書很常見。你正在使用哪個版本的OpenSSL('openssl version')? –
'OpenSSL 0.9.8y 2013年2月5日' –