class documentation
class TLSMemoryBIOFactory(WrappingFactory): (source)
Constructor: TLSMemoryBIOFactory(contextFactory, isClient, wrappedFactory, clock)
TLSMemoryBIOFactory
adds TLS to connections.
Method | __init__ |
Create a TLSMemoryBIOFactory . |
Method | log |
Annotate the wrapped factory's log prefix with some text indicating TLS is in use. |
Class Variable | noisy |
Undocumented |
Method | _apply |
Applies ALPN/NPN protocol neogitation to the connection, if the factory supports it. |
Method | _create |
Create an OpenSSL connection and set it up good. |
Instance Variable | _clock |
Undocumented |
Instance Variable | _connection |
a callable which creates an OpenSSL Connection object. |
Instance Variable | _creator |
the interface which _connectionCreator is expected to implement. |
Inherited from WrappingFactory
:
Method | build |
Create an instance of a subclass of Protocol. |
Method | client |
Called when a connection has failed to connect. |
Method | client |
Called when an established connection is lost. |
Method | do |
Make sure startFactory is called. |
Method | do |
Make sure stopFactory is called. |
Method | register |
Called by protocol to register itself. |
Method | started |
Called when a connection has been started. |
Method | unregister |
Called by protocols when they go away. |
Instance Variable | protocols |
Undocumented |
Instance Variable | wrapped |
Undocumented |
Inherited from Factory
(via WrappingFactory
, ClientFactory
):
Class Method | for |
Create a factory for the given protocol. |
Method | start |
This will be called before I begin listening on a Port or Connector. |
Method | stop |
This will be called before I stop listening on all Ports/Connectors. |
Class Variable | protocol |
Undocumented |
Instance Variable | num |
Undocumented |
Create a TLSMemoryBIOFactory
.
Parameters | |
contextIOpenSSLClientConnectionCreator or IOpenSSLServerConnectionCreator , or, for compatibility with older code, anything implementing twisted.internet.interfaces.IOpenSSLContextFactory . See https://twistedmatrix.com/trac/ticket/7215 for information on the upcoming deprecation of passing a twisted.internet.ssl.ContextFactory here. | Configuration parameters used to create an OpenSSL connection. In order of preference, what you should pass here should be:
|
isbool | Is this a factory for TLS client connections; in other words, those that will send a ClientHello greeting? True if so, False otherwise. This flag determines what interface is expected of contextFactory. If True , contextFactory should provide IOpenSSLClientConnectionCreator ; otherwise it should provide IOpenSSLServerConnectionCreator . |
wrappedtwisted.internet.interfaces.IProtocolFactory | A factory which will create the application-level protocol. |
clock | Undocumented |
Annotate the wrapped factory's log prefix with some text indicating TLS is in use.
Returns | |
str | Undocumented |
Applies ALPN/NPN protocol neogitation to the connection, if the factory supports it.
Parameters | |
connection:OpenSSL.SSL.Connection | The OpenSSL connection object to have ALPN/NPN added to it. |
Returns | |
None | Nothing |
Create an OpenSSL connection and set it up good.
Parameters | |
tlsTLSMemoryBIOProtocol | The protocol which is establishing the connection. |
Returns | |
OpenSSL.SSL.Connection | an OpenSSL connection object for tlsProtocol to use |
_connectionCreator: 1-argument callable taking
TLSMemoryBIOProtocol
and returning OpenSSL.SSL.Connection
. =
(source)
¶
a callable which creates an OpenSSL Connection object.