First, you should upgrade eventlet. As of 2013-09, the latest release is 0.14 and we have large number of bugs fixed since 0.9.16.
Second, the solution provided there is a bit too complicated and only fixes httplib
. If they provided solution for ssl
, it would also fix HTTPS and work with eventlet.
Here's a simpler version for Python 2.6+ that fixes all SSL sockets:
import functools
import ssl
old_init = ssl.SSLSocket.__init__
@functools.wraps(old_init)
def ubuntu_openssl_bug_965371(self, *args, **kwargs):
kwargs['ssl_version'] = ssl.PROTOCOL_TLSv1
old_init(self, *args, **kwargs)
ssl.SSLSocket.__init__ = ubuntu_openssl_bug_965371
I don't have access to broken system right now, so I can't really test it. Does not break good version of openssl.