Secure websocket using specific ciphers

Aug 4, 2015 at 2:58 PM
Hi I'm trying to figure out how to start the SuperWebSocketServer using specific ciphers. I couldn't find documentation of setting the cipher on the server configuration. It needs to support TLS_RSA_WITH_AES_256_CBC_SHA.
public override void StartListening()
        {
            RootConfig root = new RootConfig();
            ServerConfig config = new ServerConfig { Name = "Weblink", Ip = "Any", Port = 443, Mode = SocketMode.Tcp, Security = "tls" };
            CertificateConfig cert = new CertificateConfig { FilePath = @"C:\Myservercert.cer", Password = "mypswd" };
            config.Certificate = cert;
            SocketServerFactory factory = new SocketServerFactory();

            if (aServer != null)
            {
                aServer.Stop();
                aServer = null;
            }
            aServer = new SuperWebSocket.WebSocketServer();
            if (!aServer.Setup(root, config, factory))
            {
                logThis("Failed to setup!", LoggerService.Condition.Error);
                return;
            }

            aServer.NewMessageReceived += new SessionHandler<WebSocketSession, string>(OnReceive);
            aServer.NewSessionConnected += new SessionHandler<WebSocketSession>(OnConnect);
            aServer.SessionClosed += new SessionHandler<WebSocketSession, CloseReason>(OnDisconnect);

            if (!aServer.Start())
            {
                logThis("Failed to start!", LoggerService.Condition.Error);
                return;
            }
            isAlive = true;
            logThis("Started listening for WebSocket connections on port " + myPort);
        }
Coordinator
Aug 4, 2015 at 3:50 PM
Do you know how to do it with SslStream in .NET?
SuperWebSocket only support loading certificate from file or local certificate store.