STINNER Victor <vstin...@python.org> added the comment:

See my comparison of read() and write() errors on Linux vs Windows:
https://github.com/python/cpython/pull/26501#issuecomment-853489167

I wrote PR 26502 to fix test_wrong_cert_tls13() on Windows (currently, the test 
is skipped).

On Linux, read() always raises an exception when the connection is reset.

On Windows, read() sometimes fails with SSL_ERROR_SYSCALL+WSAECONNRESET, and in 
this case the internal C function raises a SSLEOFError. But the outer Python 
wrapper method converts SSLEOFError to an empty string because the SSL socket 
is created with suppress_ragged_eofs=True by default.

I don't know why on Linux read() only fails with SSL_ERROR_SSL with 
ERR_peek_last_error()=0x14094418, whereas it's not the case on Windows. It may 
be an implementation detail, different between Windows socket and Linux socket.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43921>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to