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

Commit cdf43b4

Browse files
authored
Merge pull request #50 from arnuschky/feature-custom-ssl-context
Adds parameter for custom ssl contexts
2 parents 95bb5c0 + 1cba277 commit cdf43b4

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)
@@ -107,7 +108,7 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connect
107108
self.__conn = connection
108109
elif self.__url.scheme == 'https':
109110
self.__conn = httplib.HTTPSConnection(self.__url.hostname, port,
110-
timeout=timeout)
111+
timeout=timeout, context=ssl_context)
111112
else:
112113
self.__conn = httplib.HTTPConnection(self.__url.hostname, port,
113114
timeout=timeout)

0 commit comments

Comments
 (0)