X509Chain Class
Represents a chain of trust to a X.509 certificate.
Syntax
public sealed class X509Chain : IDisposable
Remarks
The X509Chain class represents a chain of certificates that begins with the certificate for which the chain is being built and ends with a root certificate in the certificate store. The chain of trust is determined by the chain policy, which can be specified by creating an instance of the X509ChainPolicy class.
You can build a chain of trust for a X.509 certificate by calling the Build(X509Certificate2) method. The ChainElements property retrieves the elements of the chain, and the ChainStatus property retrieves the status of the chain.
Use the Dispose() method when you are finished using the X509Chain object. This releases the unmanaged resources used by the object.
Inheritance Hierarchy
System.Object
System.Security.Cryptography.X509Certificates.X509Chain
Thread Safety
Public static members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
Members
Methods
| Name | Description |
|---|---|
| Build(X509Certificate2) | Builds a chain of trust for the specified X.509 certificate. |
| Dispose() | Releases all resources used by the current instance of the X509Chain class. |
| Equals(object) | Determines whether the specified object is equal to the current object. |
| Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. |
| GetHashCode() | Serves as the default hash function. |
| GetType() | Gets the type of the current instance. |
| MemberwiseClone() | Creates a shallow copy of the current object. |
| Reset() | Resets the X509Chain object to its default state. |
| ToString() | Returns a string that represents the current object. |
Properties
| Name | Description |
|---|---|
| ChainElements | Gets the elements in the certificate chain. |
| ChainPolicy | Gets or sets the chain policy used to build the certificate chain. |
| ChainStatus | Gets the status of the certificate chain. |
| ChainValidationFlags | Gets or sets flags that control the chain validation process. |
| Context | Gets or sets the certificate store context used for chain building. |
| SafeHandle | Gets a handle to the unmanaged resources. |