[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Add reporting of statistics for when the handshake fails.
commit 021f0e213c431bb7922d6f587d96c2fc4cfe5add
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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 files changed, 17 insertions(+), 0 deletions(-)
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits