OSX El Capitan V10.11.5
I'm trying to resolve this error:
SSLError('bad handshake', Error([('SSL routines', 'SSL23_GET_SERVER_HELLO', 'sslv3 alert handshake failure')]
And I believe this is the cause as per https://github.com/superfell/Beatbox:
Note that if you're on OSX, its bundled with an older version of openSSL than is required. If you see an error similar to ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure or UNSUPPORTED_CLIENT: TLS 1.0 has been disabled in this organization. Please use TLS 1.1 or higher when connecting to Salesforce using https. you need to update your python and/or OpenSSL versions.
This issue persists inside and outside my virtual environment. In the terminal:
(virtualenv)sav> openssl version -v
OpenSSL 1.0.2g 1 Mar 2016
(virtualenv)sav> python -c "import ssl; print ssl.OPENSSL_VERSION"
OpenSSL 0.9.8zh 14 Jan 2016
In a python terminal:
import ssl
ssl?
Type: module
String form: <module 'ssl' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.pyc'>
File: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py
Docstring:
And in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py:
import _ssl # if we can't import it, let the error propagate
from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION
_ssl is imported from ~/Envs/virtualenv/lib/python2.7/lib-dynload/_ssl.so which is a C shared object file. And then I pretty much hit a wall.
I think my bug will be fixed if I can point ssl to OpenSSL 1.0.2 instead of 0.9.8 but I'm not sure where to make that change. Have you dealt with this? Happy to provide more information.
Thanks