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

[tor-commits] [ooni-probe/master] Add Exception classes for conditions when the network is not reachable and



commit 0dc64291dcf0c4ad6459d20b33123fc9cbe71ed6
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Thu Feb 28 01:45:54 2013 +0000

    Add Exception classes for conditions when the network is not reachable and
    when a TLS/SSL context was not chosen from the test commandline options.
---
 nettests/experimental/tls_handshake.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/nettests/experimental/tls_handshake.py b/nettests/experimental/tls_handshake.py
index d909603..fc673cb 100644
--- a/nettests/experimental/tls_handshake.py
+++ b/nettests/experimental/tls_handshake.py
@@ -54,6 +54,22 @@ firefox_ciphers = ["ECDHE-ECDSA-AES256-SHA",
                    "DHE-DSS-CAMELLIA128-SHA",]
 
 
+class NoSSLContextError(Exception):
+    """
+    Raised when we're missing the SSL context method, which should be one of
+    the following:
+
+        * :attr:`OpenSSL.SSL.SSLv2_METHOD`
+        * :attr:`OpenSSL.SSL.SSLv23_METHOD`
+        * :attr:`OpenSSL.SSL.SSLv3_METHOD`
+        * :attr:`OpenSSL.SSL.TLSv1_METHOD`
+    """
+    pass
+
+class HostUnreachableError(Exception):
+    """Raised when there the host IP address appears to be unreachable."""
+    pass
+
 class UsageOptions(usage.Options):
     optParameters = [
         ['host', 'h', None, 'Remote host IP address (v4/v6)'],



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits