Add support for certificate validation callback for Web Socket connections.

This commit is contained in:
Christian Kratky
2020-04-18 13:46:20 +02:00
parent bb5f023b74
commit 7931af7487
15 changed files with 234 additions and 113 deletions
@@ -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; }