Lines Matching defs:context
23 def __init__(self, server_address, handler_class, context):
25 self.context = context
37 sslconn = self.context.wrap_socket(sock, server_side=True)
96 context = sock.context
98 'session_cache': context.session_stats(),
122 def __init__(self, context, host=HOST, handler_class=None):
126 context)
150 def make_https_server(case, *, context=None, certfile=CERTFILE,
152 if context is None:
153 context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
155 context.load_cert_chain(certfile)
156 server = HTTPSServerThread(context, host, handler_class)
197 context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
198 context.load_cert_chain(CERTFILE)
200 context.set_ecdh_curve(args.curve_name)
202 context.load_dh_params(args.dh_file)
204 context.set_ciphers(args.ciphers)
206 server = HTTPSServer(("", args.port), handler_class, context)