added ability to specify tls protocol version

This commit is contained in:
JanEggers
2018-10-07 12:10:26 +02:00
parent ffc4f1408a
commit b7ab29473b
3 changed files with 20 additions and 3 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;