Merge pull request #301 from mhils/alpn-decorator
Always use alpn decorator
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index 9b27013..2317404 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -1952,13 +1952,11 @@
_lib.SSL_set_alpn_protos(self._ssl, input_str, input_str_len)
+ @_requires_alpn
def get_alpn_proto_negotiated(self):
"""
Get the protocol that was negotiated by ALPN.
"""
- if not _lib.Cryptography_HAS_ALPN:
- raise NotImplementedError("ALPN not available")
-
data = _ffi.new("unsigned char **")
data_len = _ffi.new("unsigned int *")