summaryrefslogtreecommitdiff
path: root/src/OpenSSL/SSL.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-06-29 22:51:33 -0700
committerCory Benfield <lukasaoz@gmail.com>2017-06-30 06:51:33 +0100
commitd61c46a339354f533eb14331ca0c40b8d4dd72a2 (patch)
tree087bb22a1894652ea8c6d0d10cdd906fd53e3914 /src/OpenSSL/SSL.py
parente1d8db536024311eeef4b3557bcf54747711d9cb (diff)
downloadpyopenssl-d61c46a339354f533eb14331ca0c40b8d4dd72a2.tar.gz
Kill some commented out code and other cleanups (#649)
Diffstat (limited to 'src/OpenSSL/SSL.py')
-rw-r--r--src/OpenSSL/SSL.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index b17d25b..9ac9651 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -652,10 +652,6 @@ class Context(object):
self._ocsp_callback = None
self._ocsp_data = None
- # SSL_CTX_set_app_data(self->ctx, self);
- # SSL_CTX_set_mode(self->ctx, SSL_MODE_ENABLE_PARTIAL_WRITE |
- # SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER |
- # SSL_MODE_AUTO_RETRY);
self.set_mode(_lib.SSL_MODE_ENABLE_PARTIAL_WRITE)
def load_verify_locations(self, cafile, capath=None):
@@ -912,7 +908,6 @@ class Context(object):
_text_to_bytes_and_warn("cafile", cafile)
)
_openssl_assert(ca_list != _ffi.NULL)
- # SSL_CTX_set_client_CA_list doesn't return anything.
_lib.SSL_CTX_set_client_CA_list(self._context, ca_list)
def set_session_id(self, buf):
@@ -1269,8 +1264,7 @@ class Context(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.cast("unsigned", len(protostr))
- _lib.SSL_CTX_set_alpn_protos(self._context, input_str, input_str_len)
+ _lib.SSL_CTX_set_alpn_protos(self._context, input_str, len(protostr))
@_requires_alpn
def set_alpn_select_callback(self, callback):
@@ -2204,8 +2198,7 @@ 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.cast("unsigned", len(protostr))
- _lib.SSL_set_alpn_protos(self._ssl, input_str, input_str_len)
+ _lib.SSL_set_alpn_protos(self._ssl, input_str, len(protostr))
@_requires_alpn
def get_alpn_proto_negotiated(self):