mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
* Expose certificate selection in MQTTnet options * Fix .NET Framework builds * Update release notes
36 lines
1.2 KiB
C#
36 lines
1.2 KiB
C#
// 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; }
|
|
}
|
|
} |