@@ -51,10 +51,10 @@ class HTTP20Connection(object):
5151 :param enable_push: (optional) Whether the server is allowed to push
5252 resources to the client (see
5353 :meth:`get_pushes() <hyper.HTTP20Connection.get_pushes>`).
54- :SSLContext : (optional) A class with custom certificate settings. If not provided
54+ :ssl_context : (optional) A class with custom certificate settings. If not provided
5555 then hyper's default SSLContext is used instead.
5656 """
57- def __init__ (self , host , port = None , window_manager = None , enable_push = False , SSLContext = None ,
57+ def __init__ (self , host , port = None , window_manager = None , enable_push = False , ssl_context = None ,
5858 ** kwargs ):
5959 """
6060 Creates an HTTP/2 connection to a specific server.
@@ -69,7 +69,7 @@ def __init__(self, host, port=None, window_manager=None, enable_push=False, SSLC
6969 self .host , self .port = host , port
7070
7171 self ._enable_push = enable_push
72- self ._SSLContext = SSLContext
72+ self .ssl_context = ssl_context
7373
7474 #: The size of the in-memory buffer used to store data from the
7575 #: network. This is used as a performance optimisation. Increase buffer
@@ -209,7 +209,7 @@ def connect(self):
209209 if self ._sock is None :
210210 sock = socket .create_connection ((self .host , self .port ), 5 )
211211
212- sock , proto = wrap_socket (sock , self .host , self ._SSLContext )
212+ sock , proto = wrap_socket (sock , self .host , self .ssl_context )
213213 log .debug ("Selected NPN protocol: %s" , proto )
214214 assert proto in H2_NPN_PROTOCOLS
215215
0 commit comments