# CertificateValidator

Validates an X.509 certificate through the shared OfficeIMO trust-policy engine.

Class 

`OfficeIMO.Security`

**Namespace**

`OfficeIMO.Security`

**Assembly**

`OfficeIMO.Security`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[CertificateValidator.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Security/CertificateValidator.cs#L22)

**Modifiers**

static

Validates an X.509 certificate through the shared OfficeIMO trust-policy engine.

## Inheritance

- object
- CertificateValidator

Filter members 

Show inherited

## Methods

`public static CertificateTrustValidationResult Validate(X509Certificate2 certificate, IEnumerable<X509Certificate2>? additionalCertificates = null, CertificateValidationOptions? options = null, CertificateValidationPurpose purpose = DocumentSigning)` [#](#member-cbe7e116cb58a00f6cbb2fb9)

[CertificateValidator.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Security/CertificateValidator.cs#L22)

Builds the platform chain, applies revocation and usage policy, and invokes the optional caller trust callback.

Parameters

**certificate System.Security.Cryptography.X509Certificates.X509Certificate2 required**

Certificate being validated.

**additionalCertificates System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>? = null optional**

Optional intermediate, root, or peer certificates supplied by the artifact.

**options OfficeIMO.Security.CertificateValidationOptions? = null optional**

Caller-controlled platform trust and revocation policy.

**purpose OfficeIMO.Security.CertificateValidationPurpose = DocumentSigning optional**

Expected certificate usage.

Returns

`CertificateTrustValidationResult`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:9E31455592BB2C333CC7427027FA5D726D4EB4820607ABDEB43345138C973AA1 -->
