forked from dotnet/MQTTnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor proxy usage and support. Refactor TLS parameter usage.
- Loading branch information
Showing
5 changed files
with
95 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Source/MQTTnet/Client/MqttClientOptionsBuilderTlsParameters.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Security; | ||
using System.Security.Authentication; | ||
using System.Security.Cryptography.X509Certificates; | ||
|
||
namespace MQTTnet.Client | ||
{ | ||
public class MqttClientOptionsBuilderTlsParameters | ||
{ | ||
public bool UseTls { get; set; } | ||
|
||
public Func<X509Certificate, X509Chain, SslPolicyErrors, IMqttClientOptions, bool> CertificateValidationCallback | ||
{ | ||
get; | ||
set; | ||
} | ||
|
||
public SslProtocols SslProtocol { get; set; } = SslProtocols.Tls12; | ||
|
||
public IEnumerable<IEnumerable<byte>> Certificates { get; set; } | ||
|
||
public bool AllowUntrustedCertificates { get; set; } | ||
|
||
public bool IgnoreCertificateChainErrors { get; set; } | ||
|
||
public bool IgnoreCertificateRevocationErrors { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters