From ac6ac85b66ad8a8dab62b128eaddeb49c2c1478f Mon Sep 17 00:00:00 2001 From: Martin Konrad Date: Fri, 20 Apr 2018 13:15:28 -0400 Subject: [PATCH] Disable support for SSLv2/3 --- channelfinder/ChannelFinderClient.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/channelfinder/ChannelFinderClient.py b/channelfinder/ChannelFinderClient.py index db58a85..5143e21 100644 --- a/channelfinder/ChannelFinderClient.py +++ b/channelfinder/ChannelFinderClient.py @@ -49,7 +49,7 @@ def __init__(self, BaseURL=None, username=None, password=None): else: self.__auth = None self.__session = requests.Session() - self.__session.mount(self.__baseURL, Ssl3HttpAdapter()) + self.__session.mount(self.__baseURL, HTTPAdapter()) except: raise RuntimeError('Failed to create client to ' + self.__baseURL) @@ -713,22 +713,3 @@ def __handleMultipleUpdateParameters(self, **kwds): auth=self.__auth).raise_for_status() else: raise RuntimeError('unknown keys') - - -class Ssl3HttpAdapter(HTTPAdapter): - def __init__(self): - """ - "Transport adapter" that allows us to use SSLv3. - - """ - if PYTHON3: - super().__init__() - else: - super(Ssl3HttpAdapter, self).__init__() - self.poolmanager = None - - def init_poolmanager(self, connections, maxsize, block=False, **kwargs): - self.poolmanager = PoolManager(num_pools=connections, - maxsize=maxsize, - block=block, - ssl_version=ssl.PROTOCOL_SSLv23)