class documentation
class TLSMemoryBIOFactory(WrappingFactory[
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 |
| Instance Variable | _clock |
Undocumented |
| Instance Variable | _creator |
A callable for creating an OpenSSL.SSL.Connection from a TLSMemoryBIOProtocol. |
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 |
def __init__(self, contextFactory:
SomeConnectionCreator, isClient: bool, wrappedFactory: IProtocolFactory, clock: IReactorTime | None = None):
(source)
¶
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:IReactorTime | None | Undocumented |
Annotate the wrapped factory's log prefix with some text indicating TLS is in use.
| Returns | |
| str | Undocumented |