Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`protocols`.`tls`.`_ContextFactoryToConnectionFactory``

class documentation

`class _ContextFactoryToConnectionFactory: (source)`

Implements interfaces: `twisted.internet.interfaces.IOpenSSLClientConnectionCreator`, `twisted.internet.interfaces.IOpenSSLServerConnectionCreator`

View In Hierarchy

Adapter wrapping a `twisted.internet.interfaces.IOpenSSLContextFactory` into a `IOpenSSLClientConnectionCreator` or `IOpenSSLServerConnectionCreator`.

See https://twistedmatrix.com/trac/ticket/7215 for work that should make this unnecessary.

Method | `__init__` | Construct a `_ContextFactoryToConnectionFactory` with a `twisted.internet.interfaces.IOpenSSLContextFactory`.
Method | `clientConnectionForTLS` | Construct an OpenSSL server connection from the wrapped old-style context factory.
Method | `serverConnectionForTLS` | Construct an OpenSSL server connection from the wrapped old-style context factory.
Method | `_connectionForTLS` | Create an `OpenSSL.SSL.Connection` object.
Instance Variable | `_oldStyleContextFactory` | Undocumented

def __init__(self, oldStyleContextFactory): (source)

Construct a `_ContextFactoryToConnectionFactory` with a `twisted.internet.interfaces.IOpenSSLContextFactory`.

Immediately call `getContext` on `oldStyleContextFactory` in order to force advance parameter checking, since old-style context factories don't actually check that their arguments to `OpenSSL` are correct.

Parameters
oldStyleContextFactory:`twisted.internet.interfaces.IOpenSSLContextFactory` | A factory that can produce contexts.

def clientConnectionForTLS(self, protocol): (source)
from `twisted.internet.interfaces.IOpenSSLClientConnectionCreator`

Construct an OpenSSL server connection from the wrapped old-style context factory.

Parameters
protocol:`TLSMemoryBIOProtocol` | The protocol initiating a TLS connection.
Returns
`OpenSSL.SSL.Connection` | a connection
Note
Since old-style context factories don't distinguish between clients and servers, this is exactly the same as `_ContextFactoryToConnectionFactory.serverConnectionForTLS`.

def serverConnectionForTLS(self, protocol): (source)
from `twisted.internet.interfaces.IOpenSSLServerConnectionCreator`

Construct an OpenSSL server connection from the wrapped old-style context factory.

Parameters
protocol:`TLSMemoryBIOProtocol` | The protocol initiating a TLS connection.
Returns
`OpenSSL.SSL.Connection` | a connection
Note
Since old-style context factories don't distinguish between clients and servers, this is exactly the same as `_ContextFactoryToConnectionFactory.clientConnectionForTLS`.

def _connectionForTLS(self, protocol): (source)

Create an `OpenSSL.SSL.Connection` object.

Parameters
protocol:`TLSMemoryBIOProtocol` | The protocol initiating a TLS connection.
Returns
`OpenSSL.SSL.Connection` | a connection

_oldStyleContextFactory = (source)

Undocumented