Handle server closing connection while client is in the handshake process.
When using encryption filter use tls configuration if exists, if not create on the fly keys for the server and trust any key in the client.