diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2021-01-16 11:41:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-16 10:41:11 -0600 |
commit | 90f09650e289022e10570702eaf007f44d1cac05 (patch) | |
tree | ec1e5047288ab01ff03a443e8f433c6f388f4fc7 /src/OpenSSL/SSL.py | |
parent | 2f26202d0e8acc24e22bede20b1456d63c3ed107 (diff) | |
download | pyopenssl-master.tar.gz |
cleanup from_buffer now that we just use cffi natively (#989)master
Diffstat (limited to 'src/OpenSSL/SSL.py')
-rw-r--r-- | src/OpenSSL/SSL.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index e5fea1e..1900b8c 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -12,7 +12,6 @@ from OpenSSL._util import ( UNSPECIFIED as _UNSPECIFIED, exception_from_error_queue as _exception_from_error_queue, ffi as _ffi, - from_buffer as _from_buffer, lib as _lib, make_assert as _make_assert, native as _native, @@ -1641,7 +1640,7 @@ class Connection(object): # Backward compatibility buf = _text_to_bytes_and_warn("buf", buf) - with _from_buffer(buf) as data: + with _ffi.from_buffer(buf) as data: # check len(buf) instead of len(data) for testability if len(buf) > 2147483647: raise ValueError( @@ -1668,7 +1667,7 @@ class Connection(object): """ buf = _text_to_bytes_and_warn("buf", buf) - with _from_buffer(buf) as data: + with _ffi.from_buffer(buf) as data: left_to_send = len(buf) total_sent = 0 @@ -1798,7 +1797,7 @@ class Connection(object): if self._into_ssl is None: raise TypeError("Connection sock was not None") - with _from_buffer(buf) as data: + with _ffi.from_buffer(buf) as data: result = _lib.BIO_write(self._into_ssl, data, len(data)) if result <= 0: self._handle_bio_errors(self._into_ssl, result) |