Go to the latest version of this document.

# ``twisted`.`internet`.`interfaces`.`IOpenSSLContextFactory``

interface documentation

`class IOpenSSLContextFactory(Interface): (source)`

Known implementations: `twisted.internet.ssl.CertificateOptions`, `twisted.internet.ssl.ClientContextFactory`, `twisted.internet.ssl.ContextFactory`, `twisted.web.client._ContextFactoryWithContext`

View In Hierarchy

A provider of `IOpenSSLContextFactory` is capable of generating `OpenSSL.SSL.Context` classes suitable for configuring TLS on a connection. A provider will store enough state to be able to generate these contexts as needed for individual connections.

See Also
`twisted.internet.ssl`

Method | `getContext` | Returns a TLS context object, suitable for securing a TLS connection. This context object will be appropriately customized for the connection based on the state in this object.

def getContext() -> `OpenSSLContext`: (source)

Returns a TLS context object, suitable for securing a TLS connection. This context object will be appropriately customized for the connection based on the state in this object.

Returns
`OpenSSLContext` | A TLS context object.