ssl: incorrect initalization of default context; Thanks to stuart-mclaren

https://github.com/eventlet/eventlet/issues/226
This commit is contained in:
Sergey Shepelev
2015-05-02 04:43:47 +03:00
parent f1dd17833f
commit a07f836b89
2 changed files with 4 additions and 1 deletions

View File

@@ -359,7 +359,7 @@ if hasattr(__ssl, 'sslwrap_simple'):
if hasattr(__ssl, 'SSLContext'):
@functools.wraps(__ssl.SSLContext.wrap_socket)
def _green_sslcontext_wrap_socket(self, sock, *a, **kw):
return GreenSSLSocket(sock, *a, **kw)
return GreenSSLSocket(sock, *a, _context=self, **kw)
# FIXME:
# * GreenSSLContext akin to GreenSSLSocket

View File

@@ -0,0 +1,3 @@
import eventlet
import requests
requests.get('https://www.google.com/').status_code