[issue31711] ssl.SSLSocket.send(b"") fails

2021-04-18 Thread Christian Heimes
Christian Heimes added the comment: Thanks to PEP 644 the issue will be fixed in 3.10 by using SSL_read_ex and SSL_write_ex() functions. I couldn't use the functions earlier because Python had to support older OpenSSL versions and LibreSSL. See https://github.com/python/cpython/pull/25468 a

[issue31711] ssl.SSLSocket.send(b"") fails

2019-12-23 Thread Jörn Heissler
Jörn Heissler added the comment: Manpage (openssl 1.1.1d) now states: You should not call SSL_write() with num=0, it will return an error. SSL_write_ex() can be called with num=0, but will not send application data to the peer. SSL_write_ex was added in 1.1.1 So it looks like openssl cleane

[issue31711] ssl.SSLSocket.send(b"") fails

2019-12-23 Thread César
Change by César : -- pull_requests: +17144 pull_request: https://github.com/python/cpython/pull/17671 ___ Python tracker ___ ___ Pyth

[issue31711] ssl.SSLSocket.send(b"") fails

2019-06-25 Thread Shivaram Lingamneni
Shivaram Lingamneni added the comment: Are there any possible next steps on this? This issue is very counterintuitive and challenging to debug --- it commonly presents as a nondeterministic edge case, and it appears to be a failed system call but doesn't show up in strace. Thanks for your t

[issue31711] ssl.SSLSocket.send(b"") fails

2018-06-09 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +7191 stage: needs patch -> patch review ___ Python tracker ___ ___ Pyt

[issue31711] ssl.SSLSocket.send(b"") fails

2018-02-26 Thread Nathaniel Smith
Nathaniel Smith added the comment: My point is that SSL_write(3ssl) says "WARNING: When calling SSL_write() with num=0 bytes to be sent the behaviour is undefined." Apparently on the particular openssl you're looking at, it gives SSL_ERROR_SYSCALL with error code == 0 and len == 0, but the op

[issue31711] ssl.SSLSocket.send(b"") fails

2018-02-26 Thread Christian Heimes
Christian Heimes added the comment: The message "EOF occurred in violation of protocol" is set by Python. Python maps SSL_ERROR_SYSCALL with SSL error code == 0 and len == 0 to that error message. https://github.com/python/cpython/blob/master/Modules/_ssl.c#L682-L689 https://github.com/pytho

[issue31711] ssl.SSLSocket.send(b"") fails

2018-02-26 Thread Nathaniel Smith
Nathaniel Smith added the comment: If openssl says the behavior is undefined, then don't we have to first make it defined before we can document it? And if we're going to detect this case and guarantee some behavior, making it a no-op like it is on regular sockets seems the way to go...

[issue31711] ssl.SSLSocket.send(b"") fails

2018-02-26 Thread Christian Heimes
Christian Heimes added the comment: It's a bit too late to change the behavior of send(). Let's document the issue instead. -- assignee: christian.heimes -> docs@python components: +Documentation nosy: +alex, docs@python, dstufft, janssen, njs stage: -> needs patch versions: +Python 2

[issue31711] ssl.SSLSocket.send(b"") fails

2017-10-06 Thread Jörn Heissler
New submission from Jörn Heissler : Traceback (most recent call last): File "client.py", line 10, in conn.send(b'') File "/usr/lib/python3.6/ssl.py", line 941, in send return self._sslobj.write(data) File "/usr/lib/python3.6/ssl.py", line 642, in write return self._sslobj.write