fix ALPN checks
This commit is contained in:
parent
b7af845523
commit
fc9fa87827
|
@ -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. "
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue