HandshakeCallbackContextFactory is a factory for SSL contexts which allows applications to get notification when the SSL handshake completes.

Method __init__ Undocumented
Class Method factoryAndDeferred Create a new HandshakeCallbackContextFactory and return a two-tuple of it and a Deferred which will fire when a connection created with it completes a TLS handshake.
Method getContext Create and return an SSL context configured to use self._info as the info callback.
Instance Variable _finished A Deferred which will be called back when the handshake is done.
Method _info No summary
_finished =
A Deferred which will be called back when the handshake is done.
def __init__(self, method=TLSv1_METHOD):
Undocumented
@classmethod
def factoryAndDeferred(cls):

Create a new HandshakeCallbackContextFactory and return a two-tuple of it and a Deferred which will fire when a connection created with it completes a TLS handshake.

def _info(self, connection, where, ret):

This is the "info callback" on the context. It will be called periodically by pyOpenSSL with information about the state of a connection. When it indicates the handshake is complete, it will fire self._finished.

def getContext(self):

Create and return an SSL context configured to use self._info as the info callback.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.