Browse Source

Fix client SslStream certificate chain CRL validation. The logic was inverse and CRLs were never checked.

Add a missing dispose in managed client.
release/3.x.x
Craig Lutgen 5 years ago
parent
commit
d7948afd98
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs
  2. +1
    -1
      Source/MQTTnet/Implementations/MqttTcpChannel.cs

+ 1
- 0
Source/MQTTnet.Extensions.ManagedClient/ManagedMqttClient.cs View File

@@ -252,6 +252,7 @@ namespace MQTTnet.Extensions.ManagedClient
_maintainConnectionTask = null;
}

_messageQueueLock.Dispose();
_mqttClient.Dispose();
}



+ 1
- 1
Source/MQTTnet/Implementations/MqttTcpChannel.cs View File

@@ -86,7 +86,7 @@ namespace MQTTnet.Implementations
var sslStream = new SslStream(networkStream, false, InternalUserCertificateValidationCallback);
_stream = sslStream;

await sslStream.AuthenticateAsClientAsync(_options.Server, LoadCertificates(), _options.TlsOptions.SslProtocol, _options.TlsOptions.IgnoreCertificateRevocationErrors).ConfigureAwait(false);
await sslStream.AuthenticateAsClientAsync(_options.Server, LoadCertificates(), _options.TlsOptions.SslProtocol, !_options.TlsOptions.IgnoreCertificateRevocationErrors).ConfigureAwait(false);
}
else
{


Loading…
Cancel
Save