Table of Contents

Class MqttClientTlsConfiguration

Namespace
Silverback.Messaging.Configuration.Mqtt
Assembly
Silverback.Integration.MQTT.dll

The TLS configuration.

public record MqttClientTlsConfiguration : IValidatableSettings, IEquatable<MqttClientTlsConfiguration>
Inheritance
MqttClientTlsConfiguration
Implements
Inherited Members

Constructors

MqttClientTlsConfiguration()

public MqttClientTlsConfiguration()

MqttClientTlsConfiguration(MqttClientTlsConfiguration)

protected MqttClientTlsConfiguration(MqttClientTlsConfiguration original)

Parameters

original MqttClientTlsConfiguration

Properties

AllowRenegotiation

Gets a value indicating whether renegotiation is allowed.

public bool AllowRenegotiation { get; init; }

Property Value

bool

AllowUntrustedCertificates

Gets a value indicating whether the client should accept untrusted certificates.

public bool AllowUntrustedCertificates { get; init; }

Property Value

bool

ApplicationProtocols

Gets the TLS protocols to use.

public IValueReadOnlyCollection<SslApplicationProtocol>? ApplicationProtocols { get; init; }

Property Value

IValueReadOnlyCollection<SslApplicationProtocol>

CertificateSelectionHandler

Gets the function to be used to select the client certificate.

public Func<MqttClientCertificateSelectionEventArgs, X509Certificate>? CertificateSelectionHandler { get; init; }

Property Value

Func<MqttClientCertificateSelectionEventArgs, X509Certificate>

CertificateValidationHandler

Gets the function to be used to validate the remote certificate.

public Func<MqttClientCertificateValidationEventArgs, bool>? CertificateValidationHandler { get; init; }

Property Value

Func<MqttClientCertificateValidationEventArgs, bool>

CipherSuitesPolicy

public CipherSuitesPolicy? CipherSuitesPolicy { get; init; }

Property Value

CipherSuitesPolicy

ClientCertificatesProvider

Gets the provider to be used to get the client certificates.

public IMqttClientCertificatesProvider? ClientCertificatesProvider { get; init; }

Property Value

IMqttClientCertificatesProvider

EncryptionPolicy

Gets the EncryptionPolicy.

public EncryptionPolicy EncryptionPolicy { get; init; }

Property Value

EncryptionPolicy

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

IgnoreCertificateChainErrors

Gets a value indicating whether the client should ignore the certificate chain errors.

public bool IgnoreCertificateChainErrors { get; init; }

Property Value

bool

IgnoreCertificateRevocationErrors

Gets a value indicating whether the client should ignore the certificate revocation errors.

public bool IgnoreCertificateRevocationErrors { get; init; }

Property Value

bool

RevocationMode

public X509RevocationMode RevocationMode { get; init; }

Property Value

X509RevocationMode

SslProtocol

Gets the protocol to be used. The default is TLS 1.3 or TLS 1.2.

public SslProtocols SslProtocol { get; init; }

Property Value

SslProtocols

TargetHost

Gets the target host. If the value is null or empty the same host as the TCP socket host will be used.

public string? TargetHost { get; init; }

Property Value

string

TrustChain

Gets the X509Certificate2Collection containing the trust chain.

public X509Certificate2Collection? TrustChain { get; init; }

Property Value

X509Certificate2Collection

UseTls

Gets a value indicating whether the client should use TLS.

public bool UseTls { get; init; }

Property Value

bool

Methods

Equals(MqttClientTlsConfiguration?)

public virtual bool Equals(MqttClientTlsConfiguration? other)

Parameters

other MqttClientTlsConfiguration

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Validate()

Throws a SilverbackConfigurationException if the configuration is not valid.

public void Validate()

Operators

operator ==(MqttClientTlsConfiguration?, MqttClientTlsConfiguration?)

public static bool operator ==(MqttClientTlsConfiguration? left, MqttClientTlsConfiguration? right)

Parameters

left MqttClientTlsConfiguration
right MqttClientTlsConfiguration

Returns

bool

operator !=(MqttClientTlsConfiguration?, MqttClientTlsConfiguration?)

public static bool operator !=(MqttClientTlsConfiguration? left, MqttClientTlsConfiguration? right)

Parameters

left MqttClientTlsConfiguration
right MqttClientTlsConfiguration

Returns

bool