在嘗試通過box.net api v2.0
獲取身份驗證令牌時查找有關SSL錯誤的一些信息。Box Api v2 SSL版本Python
我使用Python 2.7,OpenSSL 1.0.1c和requests
庫。
payload = {"action":"get_auth_token", "api_key":self.box_apikey, "ticket":self.box_ticket['status'], "verify":False}
r = requests.get(self.box_secure_endpoint+"rest", params=payload)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 65, in get
return request('get', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/safe_mode.py", line 39, in wrapped
return function(method, url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/api.py", line 51, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 241, in request
r.send(prefetch=prefetch)
File "/usr/lib/python2.7/site-packages/requests/models.py", line 641, in send
raise SSLError(e)
requests.exceptions.SSLError: _ssl.c:316: Invalid SSL protocol variant specified.
注:
- 我也期待更深入
requests
LIB,看看是否有某種變通SSL的版本請求功能。 - 如果我沒有弄錯,SSL證書中的第二位應該表明SSL版本。
不幸的是,我曾嘗試過,並沒有在我的情況下工作。 – Nolochemical