commit 021f0e213c431bb7922d6f587d96c2fc4cfe5add Author: Isis Lovecruft isis@torproject.org Date: Thu Feb 28 04:38:18 2013 +0000
Add reporting of statistics for when the handshake fails. --- nettests/experimental/tls_handshake.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/nettests/experimental/tls_handshake.py b/nettests/experimental/tls_handshake.py index da6cbc0..c1e7ca5 100644 --- a/nettests/experimental/tls_handshake.py +++ b/nettests/experimental/tls_handshake.py @@ -561,6 +561,23 @@ class TLSHandshakeTest(nettest.NetTestCase): ## xxx do we need this? #return connection
+ def handshakeFailed(connection, host): + """ + xxx fill me in + + @param connection: A :class:`twisted.python.failure.Failure` or + :class:`exceptions.Exception`. + @param host: A tuple of the host IP and port, i.e. ('1.1.1.1', 443). + @returns: None. + """ + addr, port = host + log.msg("Handshake with %s:%d failed!" % host) + self.report['host'] = host + self.report['port'] = port + self.report['state'] = "HANDSHAKE_FAILED" + ## xxx do we need this? + #return connection + else: return handshakeSucceeded(connection)
tor-commits@lists.torproject.org