diff options
author | Cory Benfield <lukasaoz@gmail.com> | 2015-04-12 08:51:52 -0400 |
---|---|---|
committer | Cory Benfield <lukasaoz@gmail.com> | 2015-04-13 16:11:48 -0400 |
commit | 9c1979af492c9aa5acd95bba2d18b87f2f87884a (patch) | |
tree | 3ef91fdf1df7fc97390249bf090e9b88025dc0f5 | |
parent | e871af54b4f368c55faac6b4fff6cdfa08a8590c (diff) | |
download | pyopenssl-9c1979af492c9aa5acd95bba2d18b87f2f87884a.tar.gz |
Further CFFI problems.
-rw-r--r-- | OpenSSL/SSL.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py index 675e8a6..1e40917 100644 --- a/OpenSSL/SSL.py +++ b/OpenSSL/SSL.py @@ -1017,7 +1017,7 @@ class Context(object): self._alpn_select_callback = _ffi.callback( "int (*)(SSL *, unsigned char **, unsigned char *, " - "const unsigned char *, unsigned int, void *", + "const unsigned char *, unsigned int, void *)", wrapper) _lib.SSL_CTX_set_alpn_select_cb( self._context, self._alpn_select_callback, _ffi.NULL) @@ -1848,8 +1848,8 @@ class Connection(object): # 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_set_alpn_protos(self._ssl, input_str) + input_str_len = _ffi.cast("unsigned", len(protostr)) + _lib.SSL_set_alpn_protos(self._ssl, input_str, input_str_len) def get_alpn_proto_negotiated(self): |