-
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 client options (#1984)
* Expose certificate selection in MQTTnet options * Fix .NET Framework builds * Update release notes
- Loading branch information
Showing
7 changed files
with
124 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
* [Core] Optimized packet serialization of PUBACK and PUBREC packets for protocol version 5.0.0 (#1939, thanks to @Y-Sindo). | ||
* [Core] The package inspector is now fully async (#1941). | ||
* [Client] Added a dedicated exception when the client is not connected (#1954, thanks to @marcpiulachs). | ||
* [Server] The server will no longer send _NoMatchingSubscribers_ when the actual subscription was non success (#1965, BREAKING CHANGE!). | ||
* [Client] Exposed the certificate selection event handler in client options (#1984). | ||
* [Server] The server will no longer send _NoMatchingSubscribers_ when the actual subscription was non success (#1965, BREAKING CHANGE!). | ||
* [Server] Fixed broken support for _null_ in _AddServer_ method in ASP.NET integration (#1981). | ||
* [ManagedClient] Added a new event (SubscriptionsChangedAsync) which is fired when a subscription or unsubscription was made (#1894, thanks to @pdufrene). | ||
* [TopicTemplate] Added new extension which provides a template engine for topics (#1932, thanks to @simonthum). |
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