Przeglądaj źródła

let the OS choose the supported TLS ptotocols when connecting to a MQTT broker (#1271)

release/3.x.x
patagona 3 lat temu
committed by GitHub
rodzic
commit
b779d04636
Nie znaleziono w bazie danych klucza dla tego podpisu ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 3 dodań i 11 usunięć
  1. +1
    -5
      Source/MQTTnet/Client/Options/MqttClientOptionsBuilderTlsParameters.cs
  2. +2
    -6
      Source/MQTTnet/Client/Options/MqttClientTlsOptions.cs

+ 1
- 5
Source/MQTTnet/Client/Options/MqttClientOptionsBuilderTlsParameters.cs Wyświetl plik

@@ -19,11 +19,7 @@ namespace MQTTnet.Client.Options

public Func<MqttClientCertificateValidationCallbackContext, bool> CertificateValidationHandler { get; set; }

#if NETCOREAPP3_1 || NET5_0
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls13;
#else
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12;
#endif
public SslProtocols SslProtocol { get; set; } = SslProtocols.None;

#if WINDOWS_UWP
public IEnumerable<IEnumerable<byte>> Certificates { get; set; }


+ 2
- 6
Source/MQTTnet/Client/Options/MqttClientTlsOptions.cs Wyświetl plik

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Net.Security;
using System.Security.Authentication;
@@ -26,11 +26,7 @@ namespace MQTTnet.Client.Options
public List<SslApplicationProtocol> ApplicationProtocols { get; set; }
#endif

#if NETCOREAPP3_1 || NET5_0
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls13;
#else
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12;
#endif
public SslProtocols SslProtocol { get; set; } = SslProtocols.None;

[Obsolete("This property will be removed soon. Use CertificateValidationHandler instead.")]
public Func<X509Certificate, X509Chain, SslPolicyErrors, IMqttClientOptions, bool> CertificateValidationCallback { get; set; }


Ładowanie…
Anuluj
Zapisz