Delen via


TlsVersions Class

Definition

A common place to specify TLS information for the project, when the code must be explicit or a user requires an override.

public class TlsVersions
type TlsVersions = class
Public Class TlsVersions
Inheritance
TlsVersions

Remarks

As newer TLS versions come out, we should simply update them here and have all code that needs to know reference this class so they all get updated and we don't risk missing a line.

Fields

Instance

A static instance of this class to be used by the Azure IoT .NET SDKs when opening connections

Properties

CertificateRevocationCheck

To enable certificate revocation check. Default to be false.

MinimumTlsVersions

The acceptable versions of TLS to use when the SDK must be explicit.

Preferred

The version of TLS to use by default.

Methods

SetLegacyAcceptableVersions()

Sets the acceptable versions of TLS over HTTPS or websocket for .NET framework 4.5.1, as it does not offer a "SystemDefault" option. No-op for other .NET versions. Sets CheckCertificateRevocationList property to value of CertificateRevocationCheck for .NET framework 4.5.1

SetMinimumTlsVersions(SslProtocols)

Sets the minimum acceptable versions of TLS.

Applies to