mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +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:
@@ -59,10 +59,12 @@ public static class Server_TLS_Samples
|
||||
certRequest.CertificateExtensions.Add(sanBuilder.Build());
|
||||
|
||||
using var certificate = certRequest.CreateSelfSigned(DateTimeOffset.Now.AddMinutes(-10), DateTimeOffset.Now.AddMinutes(10));
|
||||
#pragma warning disable SYSLIB0057
|
||||
var pfxCertificate = new X509Certificate2(
|
||||
certificate.Export(X509ContentType.Pfx),
|
||||
(string)null!,
|
||||
X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.Exportable);
|
||||
#pragma warning restore SYSLIB0057
|
||||
|
||||
return pfxCertificate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user