New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_ftplib is failing with TLS 1.3 #78572
Comments
Related to bpo-32947 Four ftplib tests are failing with OpenSSL 1.1.1-pre8 and TLS 1.3 enabled. All failing tests use a separate data connection and transfer data on the server. For store operations, the client never calls recv(). This breaks bidirectional shutdown. I assume there are session tickets stuck on the wire. ====================================================================== Traceback (most recent call last):
File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 591, in test_storbinary
self.client.storbinary('stor', f)
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 514, in storbinary
conn.unwrap()
File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 1091, in unwrap
s = self._sslobj.shutdown()
OSError: [Errno 0] Error ====================================================================== Traceback (most recent call last):
File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 603, in test_storbinary_rest
self.client.storbinary('stor', f, rest=r)
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 514, in storbinary
conn.unwrap()
File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 1091, in unwrap
s = self._sslobj.shutdown()
OSError: [Errno 0] Error ====================================================================== Traceback (most recent call last):
File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 608, in test_storlines
self.client.storlines('stor', f)
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 545, in storlines
conn.unwrap()
File "/home/heimes/dev/python/cpython/Lib/ssl.py", line 1091, in unwrap
s = self._sslobj.shutdown()
OSError: [Errno 0] Error ====================================================================== Traceback (most recent call last):
File "/home/heimes/dev/python/cpython/Lib/test/test_ftplib.py", line 889, in test_data_connection
self.assertEqual(self.client.voidresp(), "226 transfer complete")
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 251, in voidresp
resp = self.getresp()
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 236, in getresp
resp = self.getmultiline()
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 222, in getmultiline
line = self.getline()
File "/home/heimes/dev/python/cpython/Lib/ftplib.py", line 204, in getline
line = self.file.readline(self.maxline + 1)
File "/home/heimes/dev/python/cpython/Lib/socket.py", line 589, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out Ran 88 tests in 9.402s FAILED (errors=4, skipped=1) |
The "OSError: [Errno 0] Error" failures are caused by session ticket handling in two way shutdown. I reported the issue a while ago openssl/openssl#6262 and it's fixed in OpenSSL git master (to be released as 1.1.1-pre9). The error in test_data_connection is actually "[SSL] shutdown while in init". The dummy server code is failing, because the client starts a two way shutdown before the full handshake has been established. A simple recv() call is good enough to finalize the handshake. |
Is there more to do on this? Tests pass on Windows with 1 skip, but I don't know if the failure condition applies here. |
I don't think there is anything left to do. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: