Skip to content

Commit

Permalink
Drop obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 18, 2017
1 parent 992499d commit c1fc955
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,6 @@ async def _create_connection(self, req):
raise NotImplementedError()


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


class _DNSCacheTable:

def __init__(self, ttl=None):
Expand Down Expand Up @@ -653,7 +650,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 Expand Up @@ -759,7 +756,7 @@ def _get_ssl_context(self, req):
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 = None
Expand Down

0 comments on commit c1fc955

Please sign in to comment.