From 88e8691ce07ff587d9b56445c1e4feb0e8b1553d Mon Sep 17 00:00:00 2001 From: Ben Origas Date: Tue, 26 Nov 2019 08:38:18 -0600 Subject: [PATCH] Move server x509 certs into non-uwp compiler flags --- Source/MQTTnet/Server/MqttServerOptionsBuilder.cs | 2 ++ Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs b/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs index ae0ae2d..05102a5 100644 --- a/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs +++ b/Source/MQTTnet/Server/MqttServerOptionsBuilder.cs @@ -90,11 +90,13 @@ namespace MQTTnet.Server return this; } +#if !WINDOWS_UWP public MqttServerOptionsBuilder WithEncryptionCertificate(X509Certificate2 certificate) { _options.TlsEndpointOptions.X509Certificate = certificate; return this; } +#endif public MqttServerOptionsBuilder WithEncryptionSslProtocol(SslProtocols value) { diff --git a/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs b/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs index 02da53b..f0b5416 100644 --- a/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs +++ b/Source/MQTTnet/Server/MqttServerTlsTcpEndpointOptions.cs @@ -13,7 +13,9 @@ namespace MQTTnet.Server public byte[] Certificate { get; set; } +#if !WINDOWS_UWP public X509Certificate2 X509Certificate { get; set; } +#endif public IMqttServerCertificateCredentials CertificateCredentials { get; set; }