-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Currently, there is no way via WampSharp to specify the supported SSL protocols for Fleck. Support for specifying this was added in Fleck Issue 141 via the WebSocketServer.EnabledSslProtocols property. It has become much more common these days to see TLS 1.0 turned off by eager IT via registry changes or tools such as IISCrypto, in which case an SSL channel cannot be created.
It is likewise necessary to properly set websocket4net on the client side via WebSocket.Security.EnabledSslProtocols and was easy enough to do by deriving from WebSocket4NetTextConnection(in my usage, anyway) and setting that property in the constructors.
I couldn't fathom the way to cleanly integrate this via a pull request, but perhaps it makes most sense to by default enable TLS 1.0, 1.1, and 1.2 (I believe this is minimum .NET 4.5. Alternatively, perhaps WampSharp could, by default, set these properties to match that of ServicePointManager.SecurityProtocol.
For normal .NET classes, such as TcpClient, the ServicePointManager.SecurityProtocol is what is typically used. Some folks may also use the registry key SchUseStrongCrypto Also see the note here.
In any case, making these modifications to both Fleck and WebSocket4Net seems to properly negotiate TLS 1.2 connections over the websocket.