17.343. Class CertificateValidator
Namespace: ArmoniK.Core.Utils
Assembly: ArmoniK.Core.Utils.dll
Provides utilities for validating SSL/TLS certificates.
public static class CertificateValidator
17.343.1. Inheritance
17.343.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
17.343.3. Methods
17.343.3.1. CreateCallback(string, bool, ILogger)
Creates a certificate validation callback from a Certificate Authority (CA) file.
public static RemoteCertificateValidationCallback CreateCallback(string caFilePath, bool allowHostMismatch, ILogger logger)
17.343.3.1.1. Parameters
caFilePath string
The file path to the CA certificate.
allowHostMismatch bool
Do not consider host mismatch between request and certificate as an error
logger ILogger
The logger to use for logging validation details.
17.343.3.1.2. Returns
RemoteCertificateValidationCallback
A
17.343.3.1.3. Exceptions
Thrown if the specified CA certificate file is not found.
17.343.3.2. ValidationCallback(ILogger, X509Certificate2Collection, bool)
Creates a callback function to validate SSL/TLS certificates during a secure connection.
public static RemoteCertificateValidationCallback ValidationCallback(ILogger logger, X509Certificate2Collection authority, bool allowHostMismatch)
17.343.3.2.1. Parameters
logger ILogger
The logger to use for logging validation details.
authority X509Certificate2Collection
The root certificate authority to trust during validation.
allowHostMismatch bool
Ignore HostMismatch error
17.343.3.2.2. Returns
RemoteCertificateValidationCallback
A