Skip to content

Commit

Permalink
Re add support for OpenSSL < 1.0.0
Browse files Browse the repository at this point in the history
This reverts part of commit 08cedb8,
which appears to have accidentally removed openssl < 1.0.0 compatibility when
removing python3.3 compatibility.  See #583
  • Loading branch information
dudecc authored and asvetlov committed Oct 22, 2015
1 parent 5202ff3 commit 1c3b09e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ def _create_connection(self, req):
raise NotImplementedError()


_SSL_OP_NO_COMPRESSION = getattr(ssl, "OP_NO_COMPRESSION", 0)

_marker = object()


Expand Down Expand Up @@ -449,7 +451,7 @@ def ssl_context(self):
sslcontext = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
sslcontext.options |= ssl.OP_NO_SSLv2
sslcontext.options |= ssl.OP_NO_SSLv3
sslcontext.options |= ssl.OP_NO_COMPRESSION
sslcontext.options |= _SSL_OP_NO_COMPRESSION
sslcontext.set_default_verify_paths()
else:
sslcontext = ssl.create_default_context()
Expand Down

0 comments on commit 1c3b09e

Please sign in to comment.