Fixup some CFFI problems.
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index dc983b5..675e8a6 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -975,8 +975,8 @@
# Build a C string from the list. We don't need to save this off
# because OpenSSL immediately copies the data out.
input_str = _ffi.new("unsigned char[]", protostr)
- input_str_len = _ffi.new("unsigned", len(protostr))
- _lib.SSL_CTX_set_alpn_protos(self._context, input_str)
+ input_str_len = _ffi.cast("unsigned", len(protostr))
+ _lib.SSL_CTX_set_alpn_protos(self._context, input_str, input_str_len)
def set_alpn_select_callback(self, callback):
"""