Revert "Remove dedicated UWP builds and code."

This reverts commit 6d0e2c2022.
This commit is contained in:
Christian Kratky
2019-08-11 22:19:49 +02:00
parent 232605304e
commit 9ac726b271
19 changed files with 783 additions and 26 deletions
@@ -95,6 +95,7 @@ namespace MQTTnet.Server
return this;
}
#if !WINDOWS_UWP
public MqttServerOptionsBuilder WithClientCertificate(RemoteCertificateValidationCallback validationCallback = null, bool checkCertificateRevocation = false)
{
_options.TlsEndpointOptions.ClientCertificateRequired = true;
@@ -102,6 +103,7 @@ namespace MQTTnet.Server
_options.TlsEndpointOptions.RemoteCertificateValidationCallback = validationCallback;
return this;
}
#endif
public MqttServerOptionsBuilder WithoutEncryptedEndpoint()
{
@@ -109,12 +111,14 @@ namespace MQTTnet.Server
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;
@@ -12,6 +12,10 @@ namespace MQTTnet.Server
public bool NoDelay { get; set; } = true;
#if WINDOWS_UWP
public int BufferSize { get; set; } = 4096;
#endif
public IPAddress BoundInterNetworkAddress { get; set; } = IPAddress.Any;
public IPAddress BoundInterNetworkV6Address { get; set; } = IPAddress.IPv6Any;
@@ -17,8 +17,10 @@ namespace MQTTnet.Server
public bool ClientCertificateRequired { get; set; }
public bool CheckCertificateRevocation { get; set; }
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
#if !WINDOWS_UWP
public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; }
#endif
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12;
}
}