-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose certificate selection in MQTTnet options
- Loading branch information
Showing
6 changed files
with
120 additions
and
31 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Source/MQTTnet/Client/Options/MqttClientCertificateSelectionEventArgs.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,36 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using System.Security.Cryptography.X509Certificates; | ||
|
||
namespace MQTTnet.Client | ||
{ | ||
public sealed class MqttClientCertificateSelectionEventArgs : EventArgs | ||
{ | ||
public MqttClientCertificateSelectionEventArgs( | ||
string targetHost, | ||
X509CertificateCollection localCertificates, | ||
X509Certificate remoteCertificate, | ||
string[] acceptableIssuers, | ||
MqttClientTcpOptions tcpOptions) | ||
{ | ||
TargetHost = targetHost; | ||
LocalCertificates = localCertificates; | ||
RemoveCertificate = remoteCertificate; | ||
AcceptableIssuers = acceptableIssuers; | ||
TcpOptions = tcpOptions ?? throw new ArgumentNullException(nameof(tcpOptions)); | ||
} | ||
|
||
public string[] AcceptableIssuers { get; } | ||
|
||
public X509CertificateCollection LocalCertificates { get; } | ||
|
||
public X509Certificate RemoveCertificate { get; } | ||
|
||
public string TargetHost { get; } | ||
|
||
public MqttClientTcpOptions TcpOptions { get; } | ||
} | ||
} |
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
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