Example #1
0
        private static void runSSLServer()
        {
            SslServer sslServer = new SslServer(new X509Certificate(CertificatesAndCAs.device), new X509Certificate[] {  }, SslVerification.NoVerification, new SslProtocols[] { SslProtocols.Default }, false);

            while (true)
            {
                try
                {
                    sslServer.RunServer();
                }
                catch (Exception ex)
                {
                    Debug.Print(ex.Message);
                    // throw;
                }
            }
        }
Example #2
0
        public MFTestResults TestMethod1()
        {
            MFTestResults testResult = MFTestResults.Fail;

            Log.Comment("Create the client and server sockets");

            SslServer sslServer = new SslServer();
            SslClient sslClient = new SslClient();

            try
            {
                // Set up the server here
                Log.Comment("Create server thread");
                sslServer.RunServer();

                // Set up the client here
                sslClient.serverEp = sslServer.serverEp;
                sslClient.RunClient();

                if( sslClient.messageSent == sslClient.messageReceived )
                    testResult = MFTestResults.Pass;
            }
            catch (Exception e)
            {
                Log.Comment("Incorrect Exception caught: " + e.ToString());
            }
            finally
            {
                try
                {
                    sslServer.Close();
                    sslClient.Close();
                }
                catch
                {
                }
            }

            Log.Comment("known issue: 20848	SSL tests don't work with loopback");
            return (testResult == MFTestResults.Fail ? MFTestResults.KnownFailure : testResult);
        }
Example #3
0
 public MulticastSession(SslServer server) : base(server)
 {
 }
Example #4
0
 public EchoSession(SslServer server) : base(server)
 {
 }
Example #5
0
 public ChatSession(SslServer server) : base(server)
 {
 }
Example #6
0
 public NATP_SSL_SignalingSession(SslServer server) : base(server)
 {
     sigCore = new NATP_ServerCore(this);
 }