ssl.SSLContext.set_alpn_protocols()

SSLContext.set_alpn_protocols(protocols)

Specify which protocols the socket should advertise during the SSL/TLS handshake. It should be a list of ASCII strings, like ['http/1.1', 'spdy/2'], ordered by preference. The selection of a protocol will happen during the handshake, and will play out according to RFC 7301. After a successful handshake, the SSLSocket.selected_alpn_protocol() method will return the agreed-upon protocol.

This method will raise NotImplementedError if HAS_ALPN is False.

New in version 3.5.

doc_python
2016-10-07 17:42:52
Comments
Leave a Comment

Please login to continue.