mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
added support for Tls1.3 protocol
This commit is contained in:
+4
@@ -52,7 +52,11 @@ namespace MQTTnet.TestApp.NetCore
|
||||
if (channelOptions.TlsOptions.UseTls)
|
||||
{
|
||||
uri = "wss://" + channelOptions.Uri;
|
||||
#if NETCOREAPP3_0 || NET5_0
|
||||
sslProtocols = SslProtocols.Tls13;
|
||||
#else
|
||||
sslProtocols = SslProtocols.Tls12;
|
||||
#endif
|
||||
}
|
||||
|
||||
var subProtocol = channelOptions.SubProtocols.FirstOrDefault() ?? string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user