[or-cvs] r18491: {torflow} Improve SSL reporting. Kill cookie test. (torflow/trunk/NetworkScanners)

mikeperry at seul.org mikeperry at seul.org
Wed Feb 11 15:34:43 UTC 2009


Author: mikeperry
Date: 2009-02-11 10:34:43 -0500 (Wed, 11 Feb 2009)
New Revision: 18491

Modified:
   torflow/trunk/NetworkScanners/libsoat.py
   torflow/trunk/NetworkScanners/soat.py
Log:

Improve SSL reporting. Kill cookie test.



Modified: torflow/trunk/NetworkScanners/libsoat.py
===================================================================
--- torflow/trunk/NetworkScanners/libsoat.py	2009-02-11 15:23:39 UTC (rev 18490)
+++ torflow/trunk/NetworkScanners/libsoat.py	2009-02-11 15:34:43 UTC (rev 18491)
@@ -147,11 +147,11 @@
     ret += " Rotates: "+str(ssl_domain.cert_rotates)
     ret += " Changed: "+str(ssl_domain.cert_changed)+"\n" 
     if self.verbose:
-      for cert in ssl_domain.cert_map.iterkeys():
-        ret += "\nCert for "+ssl_domain.cert_map[cert]+":\n"
-        if self.verbose > 1: ret += cert
-        ret += self._dump_cert(cert)
       if self.exit_cert:
+        for cert in ssl_domain.cert_map.iterkeys():
+          ret += "\nCert for "+ssl_domain.cert_map[cert]+":\n"
+          if self.verbose > 1: ret += cert
+          ret += self._dump_cert(cert)
         if self.exit_ip: 
           ret += "\nExit node's cert for "+self.exit_ip+":\n"
         else:

Modified: torflow/trunk/NetworkScanners/soat.py
===================================================================
--- torflow/trunk/NetworkScanners/soat.py	2009-02-11 15:23:39 UTC (rev 18490)
+++ torflow/trunk/NetworkScanners/soat.py	2009-02-11 15:34:43 UTC (rev 18491)
@@ -422,11 +422,13 @@
     self.httpcode_fails = {}
 
   def check_cookies(self):
+    # FIXME: This test is badly broken..
+    # We probably only want to do this on a per-url basis.. Then
+    # we can do the 3-way compare..
+    return TEST_SUCCESS
     tor_cookies = "\n"
     plain_cookies = "\n"
-    # XXX: do we need to sort these? So far we have worse problems..
-    # We probably only want to do this on a per-url basis.. Then
-    # we can do the 3-way compare..
+    # FIXME: do we need to sort these? So far we have worse problems..
     for cookie in self.tor_cookie_jar:
       tor_cookies += "\t"+cookie.name+":"+cookie.domain+cookie.path+" discard="+str(cookie.discard)+"\n"
     for cookie in self.cookie_jar:
@@ -439,12 +441,10 @@
                             tor_cookies)
       self.results.append(result)
       self.datahandler.saveResult(result)
-      # XXX: this test is pretty spammy with false positives.. 
-      # It should not affect if a node "passes" or not yet.
-      #return TEST_FAILURE
-
+      return TEST_FAILURE
     return TEST_SUCCESS
 
+
   def run_test(self):
     # A single test should have a single cookie jar
     self.tor_cookie_jar = cookielib.MozillaCookieJar()
@@ -1219,6 +1219,7 @@
                              FAILURE_NOEXITCONTENT)
       self.datahandler.saveResult(result)
       self.results.append(result)
+      self.register_exit_failure(address, exit_node)
       return TEST_FAILURE
 
     if isinstance(cert, Exception):
@@ -1227,7 +1228,7 @@
                              FAILURE_MISCEXCEPTION+str(cert)) 
       self.results.append(result)
       self.datahandler.saveResult(result)
-      self.register_dynamic_failure(address, exit_node)
+      self.register_exit_failure(address, exit_node)
       return TEST_FAILURE
    
     try:
@@ -1239,7 +1240,7 @@
                              FAILURE_MISCEXCEPTION+str(e)) 
       self.results.append(result)
       self.datahandler.saveResult(result)
-      self.register_dynamic_failure(address, exit_node)
+      self.register_exit_failure(address, exit_node)
       return TEST_FAILURE
 
     # if certs match, everything is ok



More information about the tor-commits mailing list