Open Kittyfisto opened 7 years ago
This feature shouldn't break backwards compatibility because the api will not allow encryption to be optional. Either both endpoints agree on which mode to use or they're out of luck and no connection will be established.
Start with tests to see how SslStream.Read behaves and figure out an exceptionless way (if possible), to abort a read. If not possible, then read may need to be changed to block not forever, but a short amount of time (100ms), followed by checking if the connection shall be dropped.
SharpRemote should offer secure connections via existing components (SslStream). Both client and server should offer validation of the other via certificates.
The already existing validation shall stay as it doesn't deal with malicious clients/servers.