The "OSError: [Errno 0] Error" failures are caused by session ticket handling in two way shutdown. I reported the issue a while ago https://github.com/openssl/openssl/issues/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. |