MCPcopy Index your code
hub / github.com/RustPython/RustPython / _create_context

Method _create_context

Lib/http/server.py:187–192  ·  view source on GitHub ↗

Create a secure SSL context.

(self)

Source from the content-addressed store, hash-verified

185 self.socket = context.wrap_socket(self.socket, server_side=True)
186
187 def _create_context(self):
188 """Create a secure SSL context."""
189 context = self.ssl.create_default_context(self.ssl.Purpose.CLIENT_AUTH)
190 context.load_cert_chain(self.certfile, self.keyfile, self.password)
191 context.set_alpn_protocols(self.alpn_protocols)
192 return context
193
194
195class ThreadingHTTPSServer(socketserver.ThreadingMixIn, HTTPSServer):

Callers 1

server_activateMethod · 0.95

Calls 2

load_cert_chainMethod · 0.45
set_alpn_protocolsMethod · 0.45

Tested by

no test coverage detected