April 13, 2005
2:37 a.m.
Hi, How do I retrieve the SSL context for a given protocol session object? For example, with the echo-server: # -------- class ServerContextFactory: def getContext(self): return SSL.Context(SSL.SSLv23_METHOD) class Echo(Protocol): def dataReceived(self, data): # I want to check the identity in the client certificate at # this point. Therefore I need the current SSL context. self.transport.write(data) factory = Factory() factory.protocol = Echo reactor.listenSSL(8000, factory, ServerContextFactory()) reactor.run() # -------- Currently there appears to be no way of linking the context and the protocol handler for the connection. Is there a way around this? Cheers, Steve