MCPcopy Index your code
hub / github.com/python/cpython / sni_contexts

Method sni_contexts

Lib/test/test_ssl.py:4596–4603  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4594 assert not ssl.HAS_NPN
4595
4596 def sni_contexts(self):
4597 server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
4598 server_context.load_cert_chain(SIGNED_CERTFILE)
4599 other_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
4600 other_context.load_cert_chain(SIGNED_CERTFILE2)
4601 client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
4602 client_context.load_verify_locations(SIGNING_CA)
4603 return server_context, other_context, client_context
4604
4605 def check_common_name(self, stats, name):
4606 cert = stats['peercert']

Calls

no outgoing calls

Tested by

no test coverage detected