diff options
-rw-r--r-- | pathod/libpathod/pathoc.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_protocol_http2.py | 2 | ||||
-rw-r--r-- | test/netlib/http/http2/test_connections.py | 4 | ||||
-rw-r--r-- | test/netlib/test_tcp.py | 2 | ||||
-rw-r--r-- | test/pathod/test_pathoc.py | 2 | ||||
-rw-r--r-- | test/pathod/test_pathod.py | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/pathod/libpathod/pathoc.py b/pathod/libpathod/pathoc.py index 55c2a6e0..c0a33b62 100644 --- a/pathod/libpathod/pathoc.py +++ b/pathod/libpathod/pathoc.py @@ -207,7 +207,7 @@ class Pathoc(tcp.TCPClient): self.ws_framereader = None if self.use_http2: - if not OpenSSL._util.lib.Cryptography_HAS_ALPN: # pragma: nocover + if not tcp.HAS_ALPN: # pragma: nocover log.write_raw( self.fp, "HTTP/2 requires ALPN support. " diff --git a/test/mitmproxy/test_protocol_http2.py b/test/mitmproxy/test_protocol_http2.py index c2c736af..6d3bb43f 100644 --- a/test/mitmproxy/test_protocol_http2.py +++ b/test/mitmproxy/test_protocol_http2.py @@ -26,7 +26,7 @@ import h2 from . import tservers requires_alpn = pytest.mark.skipif( - not OpenSSL._util.lib.Cryptography_HAS_ALPN, + not netlib.tcp.HAS_ALPN, reason="requires OpenSSL with ALPN support") diff --git a/test/netlib/http/http2/test_connections.py b/test/netlib/http/http2/test_connections.py index a115fc7c..8be127e4 100644 --- a/test/netlib/http/http2/test_connections.py +++ b/test/netlib/http/http2/test_connections.py @@ -70,7 +70,7 @@ class TestCheckALPNMatch(tservers.ServerTestBase): alpn_select=b'h2', ) - if OpenSSL._util.lib.Cryptography_HAS_ALPN: + if tcp.HAS_ALPN: def test_check_alpn(self): c = tcp.TCPClient(("127.0.0.1", self.port)) @@ -86,7 +86,7 @@ class TestCheckALPNMismatch(tservers.ServerTestBase): alpn_select=None, ) - if OpenSSL._util.lib.Cryptography_HAS_ALPN: + if tcp.HAS_ALPN: def test_check_alpn(self): c = tcp.TCPClient(("127.0.0.1", self.port)) diff --git a/test/netlib/test_tcp.py b/test/netlib/test_tcp.py index 2b091ef0..8ae3aa51 100644 --- a/test/netlib/test_tcp.py +++ b/test/netlib/test_tcp.py @@ -512,7 +512,7 @@ class TestALPNClient(tservers.ServerTestBase): alpn_select=b"bar" ) - if OpenSSL._util.lib.Cryptography_HAS_ALPN: + if tcp.HAS_ALPN: def test_alpn(self): c = tcp.TCPClient(("127.0.0.1", self.port)) c.connect() diff --git a/test/pathod/test_pathoc.py b/test/pathod/test_pathoc.py index 62696a64..e1d32f79 100644 --- a/test/pathod/test_pathoc.py +++ b/test/pathod/test_pathoc.py @@ -263,7 +263,7 @@ class TestDaemon(_TestDaemon): class TestDaemonHTTP2(_TestDaemon): ssl = True - if OpenSSL._util.lib.Cryptography_HAS_ALPN: + if tcp.HAS_ALPN: def test_http2(self): c = pathoc.Pathoc( diff --git a/test/pathod/test_pathod.py b/test/pathod/test_pathod.py index 98da7d28..ee5fc7bd 100644 --- a/test/pathod/test_pathod.py +++ b/test/pathod/test_pathod.py @@ -282,7 +282,7 @@ class TestHTTP2(tutils.DaemonTests): noapi = True nohang = True - if OpenSSL._util.lib.Cryptography_HAS_ALPN: + if tcp.HAS_ALPN: def test_http2(self): r, _ = self.pathoc(["GET:/"], ssl=True, use_http2=True) |