Merge from master.

This commit is contained in:
Christian Kratky
2018-10-20 00:34:28 +02:00
9 changed files with 92 additions and 6 deletions
@@ -1,5 +1,6 @@
using System;
using System.Net;
using System.Security.Authentication;
namespace MQTTnet.Server
{
@@ -80,6 +81,12 @@ namespace MQTTnet.Server
return this;
}
public MqttServerOptionsBuilder WithEncryptionSslProtocol(SslProtocols value)
{
_options.TlsEndpointOptions.SslProtocol = value;
return this;
}
public MqttServerOptionsBuilder WithoutEncryptedEndpoint()
{
_options.TlsEndpointOptions.IsEnabled = false;
@@ -1,4 +1,6 @@
namespace MQTTnet.Server
using System.Security.Authentication;
namespace MQTTnet.Server
{
public class MqttServerTlsTcpEndpointOptions : MqttServerTcpEndpointBaseOptions
{
@@ -8,5 +10,8 @@
}
public byte[] Certificate { get; set; }
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12;
}
}