[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[minion-cvs] Backport a missing portion of the client/server context...
Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv6508/lib/mixminion/server
Modified Files:
Tag: mixminion-v0-0-5-patches
MMTPServer.py
Log Message:
Backport a missing portion of the client/server context division: this may be why 0.0.5.2 wont relay [Maint]
Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.50.2.2
retrieving revision 1.50.2.3
diff -u -d -r1.50.2.2 -r1.50.2.3
--- MMTPServer.py 1 Oct 2003 14:57:54 -0000 1.50.2.2
+++ MMTPServer.py 31 Oct 2003 01:17:25 -0000 1.50.2.3
@@ -1069,7 +1069,8 @@
def __init__(self, config, tls):
AsyncServer.__init__(self)
- self.context = tls
+ self.serverContext = tls
+ self.clientContext = _ml.TLSContext_new()
# FFFF Don't always listen; don't always retransmit!
# FFFF Support listening on multiple IPs
@@ -1093,7 +1094,7 @@
def setContext(self, context):
"""Change the TLS context used for newly received connections.
Used to rotate keys."""
- self.context = context
+ self.serverContext = context
def getNextTimeoutTime(self, now=None):
"""Return the time at which we next purge connections, if we have
@@ -1106,7 +1107,7 @@
"""helper method. Creates and registers a new server connection when
the listener socket gets a hit."""
# FFFF Check whether incoming IP is allowed!
- tls = self.context.sock(sock, serverMode=1)
+ tls = self.serverContext.sock(sock, serverMode=1)
sock.setblocking(0)
con = MMTPServerConnection(sock, tls, self.onMessageReceived)
con.register(self)
@@ -1140,7 +1141,7 @@
# There isn't any connection to the right server. Open one...
addr = (ip, port, keyID)
finished = lambda addr=addr, self=self: self.__clientFinished(addr)
- con = MMTPClientConnection(self.context,
+ con = MMTPClientConnection(self.clientContext,
ip, port, keyID, deliverable,
finishedCallback=finished,
certCache=self.certificateCache)