ssl.SSLContext.set_npn_protocols()

SSLContext.set_npn_protocols(protocols)

Specify which protocols the socket should advertise during the SSL/TLS handshake. It should be a list of 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 the NPN draft specification. After a successful handshake, the SSLSocket.selected_npn_protocol() method will return the agreed-upon protocol.

This method will raise NotImplementedError if HAS_NPN is False.

New in version 3.3.

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

Please login to continue.