My client supports TLS up to 1.2. imc server is TLSv1
I think that
| ssl.wrap_socket = partial(ssl.wrap_socket, ssl_version=ssl.PROTOCOL_TLSv1) |
does not do the job at all. (ImcHandle.py:188)
Client still uses default context with PROTOCOL_SSLv23.
Also better way to handle failed handshake is to try PROTOCOL_SSLv23 first then drop to PROTOCOL_TLSv1_1 and PROTOCOL_TLSv1.