Add options builder methods for remote certificate validation callback.

This commit is contained in:
Christian Kratky
2019-07-11 23:03:56 +02:00
parent 1ae3324581
commit e7ba3f76dc
3 changed files with 13 additions and 2 deletions
@@ -1,5 +1,6 @@
using System;
using System.Net;
using System.Net.Security;
using System.Security.Authentication;
namespace MQTTnet.Server
@@ -98,7 +99,15 @@ namespace MQTTnet.Server
_options.TlsEndpointOptions.IsEnabled = false;
return this;
}
#if !WINDOWS_UWP
public MqttServerOptionsBuilder WithRemoteCertificateValidationCallback(RemoteCertificateValidationCallback value)
{
_options.TlsEndpointOptions.RemoteCertificateValidationCallback = value;
return this;
}
#endif
public MqttServerOptionsBuilder WithStorage(IMqttServerStorage value)
{
_options.Storage = value;