[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Try to debug key rotation problem; misc cleanups



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

Modified Files:
	ServerKeys.py 
Log Message:
Try to debug key rotation problem; misc cleanups

Index: ServerKeys.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerKeys.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- ServerKeys.py	15 Jan 2004 21:01:20 -0000	1.64
+++ ServerKeys.py	27 Jan 2004 05:15:38 -0000	1.65
@@ -422,7 +422,7 @@
         #     * it did not become invalid until keyOverlap seconds ago
 
         return [ (va,vu,k) for (va,vu,k) in self.keySets
-                 if va < now and vu > cutoff ]
+                 if va <= now and vu >= cutoff ]
 
     def getServerKeysets(self, now=None):
         """Return list of ServerKeyset objects for the currently live keys.
@@ -433,9 +433,6 @@
             ks.load()
             keysets.append(ks)
 
-        if len(keysets) > 2:
-            LOG.error("Got >2 active keys! That's not supposed to happen.")
-
         return keysets
 
     def _getDHFile(self):
@@ -471,7 +468,7 @@
            This function is idempotent.
         """
         self.checkKeys()
-        deadKeys = self.getDeadKeys()
+        deadKeys = self.getDeadKeys(when)
         self.currentKeys = keys = self.getServerKeysets(when)
         keyNames = [k.keyname for k in keys]
         deadKeyNames = [k.keyname for msg, k in deadKeys]
@@ -877,9 +874,10 @@
 
     info_testing = info.get("Testing",{})
     if info_testing.get("Platform", "") != getPlatformSummary():
-        warn("Mismatched platform summary")
+        warn("Mismatched platform: running %r, but %r published",
+             getPlatformSummary(), info_testing.get("Platform",""))
     if not warn.errors and info_testing.get("Configuration", "") != config.getConfigurationSummary():
-        warn("Mismatched configuration summary")
+        warn("Configuration has changed since last publication")
 
     if warn.errors:
         return "bad"
@@ -993,7 +991,8 @@
         "MMTPProtocolsOut" : mmtpProtocolsOut,
         "PacketVersion" : mixminion.Packet.PACKET_VERSION,
         "mm_version" : mixminion.__version__,
-        "Secure" : secure
+        "Secure" : secure,
+        "Contact" : contact,
         }
 
     # If we don't know our IP address, try to guess
@@ -1036,11 +1035,10 @@
         Packet-Versions: %(PacketVersion)s
         Software: Mixminion %(mm_version)s
         Secure-Configuration: %(Secure)s
+        Contact: %(Contact)s
         """ % fields
     if insecurities:
         info += "Why-Insecure: %s\n"%(", ".join(insecurities))
-    if contact:
-        info += "Contact: %s\n"%contact
     if comments:
         info += "Comments: %s\n"%comments