MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / set_alpn_protocols

Method set_alpn_protocols

tools/python-3.11.9-amd64/Lib/ssl.py:566–575  ·  view source on GitHub ↗
(self, alpn_protocols)

Source from the content-addressed store, hash-verified

564 self.sni_callback = shim_cb
565
566 def set_alpn_protocols(self, alpn_protocols):
567 protos = bytearray()
568 for protocol in alpn_protocols:
569 b = bytes(protocol, 'ascii')
570 if len(b) == 0 or len(b) > 255:
571 raise SSLError('ALPN protocols must be 1 to 255 in length')
572 protos.append(len(b))
573 protos.extend(b)
574
575 self._set_alpn_protocols(protos)
576
577 def _load_windows_store_certs(self, storename, purpose):
578 certs = bytearray()

Callers

nothing calls this directly

Calls 4

_set_alpn_protocolsMethod · 0.80
SSLErrorClass · 0.50
appendMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected