MCGalaxy
MCGalaxy copied to clipboard
WSS change
Modify Sockets.cs to support wss:// connections
Sorry about the whitespace changes
There seem to be three changes here
- Adding a lot of logging
- Changing ServicePointManager to TLS 1.2 only (seems unnecessary because something similar is already done in
ForceEnableTLS
method in Server.cs) - Changing SSLStream for secure websockets to use TLS 1.2 only
Seems like would be simpler to just change ssl.AuthenticateAsServer(cert);
to ssl.AuthenticateAsServer(cert, false, HttpUtil.TLS_ALL, false);
?
- Yes the logging helps the admin get the correct cert deployed. We should document the process of getting the correct type of cert.
- I saw the TLS code in the other module but it didn't seem to be working.Also the Tls12 enums weren't available in Sockets.js.
- Yes. We don't want to allow TLS 1.0 but 1.1 and later are OK. There are a bunch of options defined in the M$FT C# pages for AuthenticateAsServer but our compile system didn't recognize some of them. The one I put there works. We don't need the client to present or auth to us, unless we are going to a completely different level of authentication.
- Changing the x509 routine to the one that doesn't need a password. For a public cert we don't want a password.