[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] First steps towards making required liveness configurable



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv18514/lib/mixminion

Modified Files:
	ClientMain.py 
Log Message:
First steps towards making required liveness configurable

Index: ClientMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ClientMain.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- ClientMain.py	4 Jan 2003 04:12:51 -0000	1.21
+++ ClientMain.py	5 Jan 2003 01:27:35 -0000	1.22
@@ -68,6 +68,9 @@
     # DIR/servers/: A directory of server descriptors.
 
     MAGIC = "ClientKeystore-0"
+    #DOCDOC
+    DEFAULT_REQUIRED_LIFETIME = 3600
+    
     def __init__(self, directory):
         """Create a new ClientKeystore to keep directories and descriptors
            under <directory>."""
@@ -411,7 +414,7 @@
         if startAt is None:
             startAt = time.time()
         if endAt is None:
-            endAt = startAt + 3600
+            endAt = startAt + self.DEFAULT_REQUIRED_LIFETIME
 
         if isinstance(name, ServerInfo):
             if name.isValidFrom(startAt, endAt):
@@ -457,7 +460,7 @@
         if startAt is None:
             startAt = time.time()
         if endAt is None:
-            endAt = startAt + 3600
+            endAt = startAt + self.DEFAULT_REQUIRED_LIFETIME
         if prng is None:
             prng = mixminion.Crypto.getCommonPRNG()
         
@@ -576,11 +579,6 @@
        specified descriptors don't support the required capabilities,
        we raise MixError.
        """
-    if startAt is None:
-        startAt = time.time()
-    if endAt is None:
-        endAt = startAt+3*60*60 # FFFF Configurable
-
     # First, find out what the exit node needs to be (or support).
     routingType, _, exitNode = address.getRouting()
     if exitNode: