twisted.protocols.tls._ContextFactoryToConnectionFactory(object) class documentationtwisted.protocols.tls
View Source
(View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IOpenSSLClientConnectionCreator, twisted.internet.interfaces.IOpenSSLServerConnectionCreator
Adapter wrapping "something" (ideally something like a twisted.internet.ssl.ContextFactory;
implementations of this interface don't actually typically subclass though,
so "something" is more likely just something with a
getContext method) into an IOpenSSLClientConnectionCreator
or IOpenSSLServerConnectionCreator.
See https://twistedmatrix.com/trac/ticket/7215 for work that should make this unnecessary.
| Method | __init__ | Construct a _ContextFactoryToConnectionFactory
with an old-style context factory. |
| Method | serverConnectionForTLS | Construct an OpenSSL server connection from the wrapped old-style context factory. |
| Method | clientConnectionForTLS | Construct an OpenSSL server connection from the wrapped old-style context factory. |
| Method | _connectionForTLS | Create an OpenSSL.SSL.Connection object. |
Construct a _ContextFactoryToConnectionFactory
with an old-style context factory.
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 | A factory that can produce contexts. (type: twisted.internet.ssl.ContextFactory
or something like it.) |
Create an OpenSSL.SSL.Connection object.
| Parameters | protocol | The protocol initiating a TLS connection. (type: TLSMemoryBIOProtocol) |
| Returns | a connection (type: OpenSSL.SSL.Connection) | |
Construct an OpenSSL server connection from the wrapped old-style context factory.
| Parameters | protocol | The protocol initiating a TLS connection. (type: TLSMemoryBIOProtocol) |
| Returns | a connection (type: OpenSSL.SSL.Connection) | |
| Note | Since old-style context factories don't distinguish between clients and
servers, this is exactly the same as _ContextFactoryToConnectionFactory.clientConnectionForTLS. | |
Construct an OpenSSL server connection from the wrapped old-style context factory.
| Parameters | protocol | The protocol initiating a TLS connection. (type: TLSMemoryBIOProtocol) |
| Returns | a connection (type: OpenSSL.SSL.Connection) | |
| Note | Since old-style context factories don't distinguish between clients and
servers, this is exactly the same as _ContextFactoryToConnectionFactory.serverConnectionForTLS. | |