SSLValidationResultDetails Class

Namespace: System.Net.Security
Assembly: System (in System.dll)

Provides detailed information about the results of an SSL validation process.

Description

The SSLValidationResultDetails class is used to represent the outcome of an SSL/TLS certificate validation. It offers granular data about why a certificate might have failed validation or specific details about its chain and trust status. This class is crucial for applications that require fine-grained control over or reporting of SSL connection security.

Syntax

[SerializableAttribute]
public sealed class SSLValidationResultDetails : object

Methods

This class does not expose any public methods beyond those inherited from System.Object.

Properties

  • Chain:
    X509Chain? Chain { get; }
    Property

    Gets the X.509 certificate chain for the validated certificate.

  • Errors:
    System.Security.Cryptography.X509Certificates.X509ChainStatusFlags Errors { get; }
    Property

    Gets a set of flags that indicate the reasons for SSL validation failure or success.

  • IsValid:
    bool IsValid { get; }
    Property

    Gets a value indicating whether the SSL certificate is valid.

  • Result:
    System.Net.Security.SslPolicyErrors Result { get; }
    Property

    Gets the specific SSL policy errors that occurred during validation.

Remarks

When an SSL/TLS connection is established, the .NET Framework performs certificate validation. If this validation encounters issues, the SSLValidationResultDetails object can be used to inspect the nature of these issues. For instance, you might check the Errors property for specific certificate chain errors, or the Result property for higher-level policy violations.

Applications can use the information from this class to implement custom certificate validation logic or to provide detailed feedback to users about why a secure connection could not be established.

Keywords: SSL, TLS, certificate validation, security, X.509, chain, errors, policy, System.Net.Security