pybitmessage.network.tls module¶
SSL/TLS negotiation.
-
class
TLSDispatcher(_=None, sock=None, certfile=None, keyfile=None, server_side=False, ciphers='AECDH-AES256-SHA')[source]¶ Bases:
network.advanceddispatcher.AdvancedDispatcherTLS functionality for classes derived from AdvancedDispatcher
-
state_tls_init()¶ Prepare sockets for TLS handshake
-
static
state_tls_handshake()¶ Do nothing while TLS handshake is pending, as during this phase we need to react to callbacks instead
-
writable()¶ Handle writable checks for TLS-enabled sockets
-
readable()¶ Handle readable check for TLS-enabled sockets
-
handle_read()¶ Handle reads for sockets during TLS handshake. Requires special treatment as during the handshake, buffers must remain empty and normal reads must be ignored.
-
handle_write()¶ Handle writes for sockets during TLS handshake. Requires special treatment as during the handshake, buffers must remain empty and normal writes must be ignored.
-
tls_handshake()¶ Perform TLS handshake and handle its stages
-