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

art at torproject.org art at torproject.org
Tue Apr 30 13:01:43 UTC 2013


commit 0dc64291dcf0c4ad6459d20b33123fc9cbe71ed6
Author: Isis Lovecruft <isis at torproject.org>
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)'],





More information about the tor-commits mailing list