Browse Source

Fix build issue with UWP

release/3.x.x
Craig Lutgen 5 years ago
parent
commit
9d63500f95
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      Source/MQTTnet/Server/MqttServerOptionsBuilder.cs

+ 3
- 1
Source/MQTTnet/Server/MqttServerOptionsBuilder.cs View File

@@ -95,13 +95,15 @@ namespace MQTTnet.Server
return this; return this;
} }


#if !WINDOWS_UWP
public MqttServerOptionsBuilder WithClientCertificate(RemoteCertificateValidationCallback validationCallback = null, bool checkCertificateRevocation = false) public MqttServerOptionsBuilder WithClientCertificate(RemoteCertificateValidationCallback validationCallback = null, bool checkCertificateRevocation = false)
{ {
_options.TlsEndpointOptions.ClientCertificateRequired = true; _options.TlsEndpointOptions.ClientCertificateRequired = true;
_options.TlsEndpointOptions.CheckCertificateRevocation = checkCertificateRevocation; _options.TlsEndpointOptions.CheckCertificateRevocation = checkCertificateRevocation;
_options.TlsEndpointOptions.CertificateValidationCallback = validationCallback;
_options.TlsEndpointOptions.RemoteCertificateValidationCallback = validationCallback;
return this; return this;
} }
#endif


public MqttServerOptionsBuilder WithoutEncryptedEndpoint() public MqttServerOptionsBuilder WithoutEncryptedEndpoint()
{ {


Loading…
Cancel
Save