Skip to content

Commit 2ef4571

Browse files
authored
ALPN is always available now (#1326)
1 parent 8dd9457 commit 2ef4571

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/OpenSSL/SSL.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -805,11 +805,6 @@ def explode(*args, **kwargs): # type: ignore[no-untyped-def]
805805
return _requires_decorator
806806

807807

808-
_requires_alpn = _make_requires(
809-
_lib.Cryptography_HAS_ALPN, "ALPN not available"
810-
)
811-
812-
813808
_requires_keylog = _make_requires(
814809
getattr(_lib, "Cryptography_HAS_KEYLOG", 0), "Key logging not available"
815810
)
@@ -1646,7 +1641,6 @@ def set_tlsext_use_srtp(self, profiles: bytes) -> None:
16461641
_lib.SSL_CTX_set_tlsext_use_srtp(self._context, profiles) == 0
16471642
)
16481643

1649-
@_requires_alpn
16501644
def set_alpn_protos(self, protos: List[bytes]) -> None:
16511645
"""
16521646
Specify the protocols that the client is prepared to speak after the
@@ -1684,7 +1678,6 @@ def set_alpn_protos(self, protos: List[bytes]) -> None:
16841678
== 0
16851679
)
16861680

1687-
@_requires_alpn
16881681
def set_alpn_select_callback(self, callback: _ALPNSelectCallback) -> None:
16891682
"""
16901683
Specify a callback function that will be called on the server when a
@@ -2882,7 +2875,6 @@ def get_protocol_version(self) -> int:
28822875
version = _lib.SSL_version(self._ssl)
28832876
return version
28842877

2885-
@_requires_alpn
28862878
def set_alpn_protos(self, protos: List[bytes]) -> None:
28872879
"""
28882880
Specify the client's ALPN protocol list.
@@ -2917,7 +2909,6 @@ def set_alpn_protos(self, protos: List[bytes]) -> None:
29172909
_lib.SSL_set_alpn_protos(self._ssl, input_str, len(protostr)) == 0
29182910
)
29192911

2920-
@_requires_alpn
29212912
def get_alpn_proto_negotiated(self) -> bytes:
29222913
"""
29232914
Get the protocol that was negotiated by ALPN.

0 commit comments

Comments
 (0)