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

Method set_npn_protocols

tools/python-3.11.9-amd64/Lib/ssl.py:537–551  ·  view source on GitHub ↗
(self, npn_protocols)

Source from the content-addressed store, hash-verified

535 )
536
537 def set_npn_protocols(self, npn_protocols):
538 warnings.warn(
539 "ssl NPN is deprecated, use ALPN instead",
540 DeprecationWarning,
541 stacklevel=2
542 )
543 protos = bytearray()
544 for protocol in npn_protocols:
545 b = bytes(protocol, 'ascii')
546 if len(b) == 0 or len(b) > 255:
547 raise SSLError('NPN protocols must be 1 to 255 in length')
548 protos.append(len(b))
549 protos.extend(b)
550
551 self._set_npn_protocols(protos)
552
553 def set_servername_callback(self, server_name_callback):
554 if server_name_callback is None:

Callers

nothing calls this directly

Calls 4

SSLErrorClass · 0.50
warnMethod · 0.45
appendMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected