[tor-commits] [ooni-probe/develop] Fix import statements to include X509Name class.

isis at torproject.org isis at torproject.org
Thu Jun 6 16:41:37 UTC 2013


commit ebdf72719f82a575717a2713f52d5fa2665bf835
Author: Isis Lovecruft <isis at torproject.org>
Date:   Thu Feb 28 13:23:45 2013 +0000

    Fix import statements to include X509Name class.
---
 nettests/experimental/tls_handshake.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/nettests/experimental/tls_handshake.py b/nettests/experimental/tls_handshake.py
index 5dcc107..34a917c 100644
--- a/nettests/experimental/tls_handshake.py
+++ b/nettests/experimental/tls_handshake.py
@@ -33,6 +33,7 @@ import types
 from ipaddr                 import IPAddress
 from OpenSSL                import SSL
 from OpenSSL.crypto         import dump_certificate, FILETYPE_PEM
+from OpenSSL.crypto         import X509Name
 from twisted.internet       import defer
 from twisted.python         import usage
 from twisted.python.failure import Failure
@@ -215,9 +216,9 @@ class TLSHandshakeTest(nettest.NetTestCase):
         x509_name = None
 
         try:
-            assert isinstance(certificate, crypto.X509Name), \
+            assert isinstance(certificate, X509Name), \
                 "getX509Name takes OpenSSL.crypto.X509Name as first argument!"
-            x509_name = crypto.X509Name(certificate)
+            x509_name = X509Name(certificate)
         except AssertionError as ae:
             log.err(ae)
         except Exception as exc:





More information about the tor-commits mailing list