Skip to content

PdfCertificateCheck class

View as Markdown

Namespace: PdfNetStack.Signing
Assembly: PdfNetStack.dll
Package: PdfNetStack

The checks made on one certificate of a chain.

public sealed class PdfCertificateCheck

Inheritance

object ← PdfCertificateCheck

The certificate.

public X509Certificate2 Certificate { get; }

X509Certificate2

True for the trust anchor that ends the chain. Its validity, usage and revocation are taken as given.

public bool IsTrustAnchor { get; }

bool

The certificate may be used for its role: key usage (digital signature or non-repudiation for a signer, certificate signing and the CA flag with its path length for a CA), the critical time stamping usage for a time stamp authority, and no critical extension the library does not understand.

public PdfCheckStatus KeyUsage { get; }

PdfCheckStatus

The certificate’s names (subject, alternative names, and email addresses in the subject when it has no alternative names) fall within the name constraints of the certificates above it, the trust anchor’s included. Passed when no constraint applies. A self-issued CA certificate inside the chain is not checked, as RFC 5280 says. Failed when a name cannot be read or judged against a constraint, and when a certificate above has constraints that cannot be read.

public PdfCheckStatus NameConstraints { get; }

PdfCheckStatus

The certificate policies the certificate asserts, as object identifiers; empty when it asserts none.

public IReadOnlyList<string> Policies { get; }

IReadOnlyList<string>

What did not pass, or null.

public string? Problem { get; }

string?

The certificate’s qualified certificate statements, or null when it has none.

public PdfQcStatements? QcStatements { get; }

PdfQcStatements?

Revocation, from a verified OCSP response or CRL that is current at the validation time.

public PdfCheckStatus Revocation { get; }

PdfCheckStatus

Where the revocation answer came from, such as “OCSP (document security store)”.

public string? RevocationSource { get; }

string?

When the certificate was revoked, when revocation data says it was.

public DateTimeOffset? RevocationTime { get; }

DateTimeOffset?

The validation time lies within the certificate’s validity period.

public PdfCheckStatus Validity { get; }

PdfCheckStatus