public void Start() { if (_SupportedCipherSuites.Count == 0) { _SupportedCipherSuites.Add(TCipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8); //Test 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256); //Tested 1.0 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256); //Tested 1.0 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_PSK_WITH_AES_128_CCM_8); //Test 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA256); //Tested 1.0 1.2 } _Socket = SetupSocket(_LocalEndPoint.AddressFamily); #if DEBUG Console.WriteLine($"Socket setup complete"); #endif if (_Socket != null) { _Handshake = new ServerHandshake(_Socket, _MaxPacketSize, _PSKIdentities, _SupportedCipherSuites, _RequireClientCertificate, ValidatePSK) { Certificate = _Certificate, PrivateKey = _PrivateKey, Sessions = _Sessions }; _Socket.Bind(_LocalEndPoint); #if DEBUG Console.WriteLine($"Socket bind complete"); #endif StartReceive(_Socket); } }
public void Start() { if (_SupportedCipherSuites.Count == 0) { _SupportedCipherSuites.Add(TCipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8); //Test 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256); //Tested 1.0 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256); //Tested 1.0 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_PSK_WITH_AES_128_CCM_8); //Test 1.2 _SupportedCipherSuites.Add(TCipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA256); //Tested 1.0 1.2 } _Socket = SetupSocket(_LocalEndPoint.AddressFamily); if (_Socket != null) { _Handshake = new ServerHandshake(_Socket, _MaxPacketSize, _PSKIdentities, _SupportedCipherSuites, _RequireClientCertificate, ValidatePSK); _Handshake.Certificate = _Certificate; _Handshake.PrivateKey = _PrivateKey; _Handshake.Sessions = _Sessions; _Socket.Bind(_LocalEndPoint); StartReceive(_Socket); } }