Sitelet https://github.com/jgarzik/python-bitcoinrpc/commit/1cba2779989d6cdfbcdb5b7bb3db7e70be9433ed
Skip to content

Commit 1cba277

Browse files
committed
Added paramter for custom ssl contexts
1 parent f607fe7 commit 1cba277

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎bitcoinrpc/authproxy.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def EncodeDecimal(o):
8080
class AuthServiceProxy(object):
8181
__id_count = 0
8282

83-
def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connection=None):
83+
def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT,
84+
connection=None, ssl_context=None):
8485
self.__service_url = service_url
8586
self.__service_name = service_name
8687
self.__url = urlparse.urlparse(service_url)
@@ -105,7 +106,7 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connect
105106
self.__conn = connection
106107
elif self.__url.scheme == 'https':
107108
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,
108-
timeout=timeout)
109+
timeout=timeout, context=ssl_context)
109110
else:
110111
self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
111112
timeout=timeout)

0 commit comments

Comments
 (0)