Go to the latest version of this document.

# ``twisted`.`internet`.`interfaces`.`IHandshakeListener``

interface documentation

`class IHandshakeListener(Interface): (source)`

View In Hierarchy

An interface implemented by a `IProtocol` to indicate that it would like to be notified when TLS handshakes complete when run over a TLS-based transport.

This interface is only guaranteed to be called when run over a TLS-based transport: non TLS-based transports will not respect this interface.

Method | `handshakeCompleted` | Notification of the TLS handshake being completed.

def handshakeCompleted(): (source)

Notification of the TLS handshake being completed.

This notification fires when OpenSSL has completed the TLS handshake. At this point the TLS connection is established, and the protocol can interrogate its transport (usually an `ISSLTransport`) for details of the TLS connection.

This notification *also* fires whenever the TLS session is renegotiated. As a result, protocols that have certain minimum security requirements should implement this interface to ensure that they are able to re-evaluate the security of the TLS session if it changes.