mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 02:53:06 +08:00
Adjusted default value for the supported Net frameworks versions where "None" is incompatible. (#1348)
This commit is contained in:
@@ -19,7 +19,11 @@ namespace MQTTnet.Client.Options
|
||||
|
||||
public Func<MqttClientCertificateValidationCallbackContext, bool> CertificateValidationHandler { get; set; }
|
||||
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.None;
|
||||
#if NET48 || NETCOREAPP3_1 || NET5 || NET6
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12 | SslProtocols.Tls13;
|
||||
#else
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12 | (SslProtocols)0x00003000 /*Tls13*/;
|
||||
#endif
|
||||
|
||||
#if WINDOWS_UWP
|
||||
public IEnumerable<IEnumerable<byte>> Certificates { get; set; }
|
||||
|
||||
@@ -26,7 +26,11 @@ namespace MQTTnet.Client.Options
|
||||
public List<SslApplicationProtocol> ApplicationProtocols { get; set; }
|
||||
#endif
|
||||
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.None;
|
||||
#if NET48 || NETCOREAPP3_1 || NET5 || NET6
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12 | SslProtocols.Tls13;
|
||||
#else
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12 | (SslProtocols)0x00003000 /*Tls13*/;
|
||||
#endif
|
||||
|
||||
[Obsolete("This property will be removed soon. Use CertificateValidationHandler instead.")]
|
||||
public Func<X509Certificate, X509Chain, SslPolicyErrors, IMqttClientOptions, bool> CertificateValidationCallback { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user