mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-24 14:43:04 +08:00
Add support for certificate validation callback for Web Socket connections.
This commit is contained in:
@@ -10,12 +10,15 @@ namespace MQTTnet.Client.Options
|
||||
{
|
||||
public bool UseTls { get; set; }
|
||||
|
||||
[Obsolete("This property will be removed soon. Use CertificateValidationHandler instead.")]
|
||||
public Func<X509Certificate, X509Chain, SslPolicyErrors, IMqttClientOptions, bool> CertificateValidationCallback
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public Func<MqttClientCertificateValidationCallbackContext, bool> CertificateValidationHandler { get; set; }
|
||||
|
||||
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12;
|
||||
|
||||
#if WINDOWS_UWP
|
||||
@@ -23,7 +26,6 @@ namespace MQTTnet.Client.Options
|
||||
#else
|
||||
public IEnumerable<X509Certificate> Certificates { get; set; }
|
||||
#endif
|
||||
|
||||
|
||||
public bool AllowUntrustedCertificates { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user