From ed8df77e6ad439038a9fabb72547f09c10269e9e Mon Sep 17 00:00:00 2001 From: kd Date: Wed, 18 Mar 2020 15:14:09 +0100 Subject: [PATCH 1/2] take an arbitrary SSL type --- quickpay_api_client/api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quickpay_api_client/api.py b/quickpay_api_client/api.py index 779d78f..a3651c3 100644 --- a/quickpay_api_client/api.py +++ b/quickpay_api_client/api.py @@ -12,12 +12,16 @@ class QPAdapter(HTTPAdapter): + def __init__(self, ssl_version=None, **kwargs): + self.ssl_version = ssl_version + + super(SSLAdapter, self).__init__(**kwargs) + def init_poolmanager(self, connections, maxsize, block=False): self.poolmanager = PoolManager(num_pools=connections, maxsize=maxsize, block=block, - ssl_version=ssl.PROTOCOL_TLSv1_2) - + ssl_version=self.ssl_version) class QPApi(object): api_version = '10' From 08365bc285c553d0c97fc5ff9e86c518fe4ea219 Mon Sep 17 00:00:00 2001 From: kd Date: Wed, 18 Mar 2020 15:30:24 +0100 Subject: [PATCH 2/2] take an arbitrary SSL type --- quickpay_api_client/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickpay_api_client/api.py b/quickpay_api_client/api.py index a3651c3..c25f91f 100644 --- a/quickpay_api_client/api.py +++ b/quickpay_api_client/api.py @@ -15,7 +15,8 @@ class QPAdapter(HTTPAdapter): def __init__(self, ssl_version=None, **kwargs): self.ssl_version = ssl_version - super(SSLAdapter, self).__init__(**kwargs) + super(QPAdapter, self).__init__(**kwargs) + def init_poolmanager(self, connections, maxsize, block=False): self.poolmanager = PoolManager(num_pools=connections,