mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 18:43:10 +08:00
Add support for dotnet 10 (#2229)
* Add dotnet10 as target framework and fix breaking changes * Fix tests * Fix tests for CI * Fix typo
This commit is contained in:
@@ -202,9 +202,14 @@ public sealed class MqttTcpServerListener : IDisposable
|
||||
|
||||
clientCertificate = sslStream.RemoteCertificate as X509Certificate2;
|
||||
|
||||
// TODO: Check why this export is needed. Is there something else in the RemoteCertificate as a X509Certificate2???
|
||||
if (clientCertificate == null && sslStream.RemoteCertificate != null)
|
||||
{
|
||||
#if NET10_0_OR_GREATER
|
||||
clientCertificate = X509CertificateLoader.LoadCertificate(sslStream.RemoteCertificate.Export(X509ContentType.Cert));
|
||||
#else
|
||||
clientCertificate = new X509Certificate2(sslStream.RemoteCertificate.Export(X509ContentType.Cert));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user