Merge pull request #238 from hynek/redundant-type-check
Remove redundant check for bytes
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index d0cc933..e67bd13 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -1415,9 +1415,6 @@
if self._into_ssl is None:
raise TypeError("Connection sock was not None")
- if not isinstance(buf, bytes):
- raise TypeError("buf must be a byte string")
-
result = _lib.BIO_write(self._into_ssl, buf, len(buf))
if result <= 0:
self._handle_bio_errors(self._into_ssl, result)
@@ -1898,6 +1895,7 @@
return _ffi.buffer(data[0], data_len[0])[:]
+
@_requires_alpn
def set_alpn_protos(self, protos):
"""