Table of Contents

Class SignatureValidationResult

Namespace
MiPdf.Signatures
Assembly
MiPdf.dll

Result of verifying one signature.

public sealed class SignatureValidationResult
Inheritance
SignatureValidationResult
Inherited Members

Properties

Certificates

Certificates embedded in the signature container.

public IReadOnlyList<X509Certificate2> Certificates { get; init; }

Property Value

IReadOnlyList<X509Certificate2>

CertificationLevel

DocMDP level of a certification signature, null for approval signatures.

public CertificationLevel? CertificationLevel { get; init; }

Property Value

CertificationLevel?

Cms

The DER-encoded signature container (CMS SignedData or time-stamp token).

public byte[]? Cms { get; init; }

Property Value

byte[]

CoversWholeDocument

The signature covers the complete file (no later incremental updates).

public bool CoversWholeDocument { get; init; }

Property Value

bool

Errors

Problems found during verification (invalid byte range, digest mismatch, invalid time-stamp, untrusted chain, ...).

public IReadOnlyList<string> Errors { get; init; }

Property Value

IReadOnlyList<string>

FieldLock

Form fields locked by this signature (FieldMDP), null if it locks none.

public PdfFieldLock? FieldLock { get; init; }

Property Value

PdfFieldLock

FieldName

Fully qualified name of the signature field.

public required string FieldName { get; init; }

Property Value

string

HasTimestamp

True if a verified time-stamp is present (TimestampTime is set).

public bool HasTimestamp { get; }

Property Value

bool

IsCertificateTrusted

Result of building the certificate chain (null if not checked).

public bool? IsCertificateTrusted { get; init; }

Property Value

bool?

IsDocumentTimestamp

True for a document time-stamp (/SubFilter ETSI.RFC3161) rather than a signature.

public bool IsDocumentTimestamp { get; }

Property Value

bool

IsIntegrityValid

The signed bytes are unchanged and the cryptographic signature is valid.

public bool IsIntegrityValid { get; init; }

Property Value

bool

Level

PAdES level, derived from the time-stamp, the Document Security Store and later document time-stamps (null for document time-stamps).

public PadesLevel? Level { get; }

Property Value

PadesLevel?

Location

The /Location entry of the signature dictionary, or null.

public string? Location { get; init; }

Property Value

string

ModifiedLockedFields

Locked fields (FieldLock) whose value was changed or that were removed after signing. Validators such as Adobe Acrobat treat such a signature as invalid even though IsIntegrityValid is true.

public IReadOnlyList<string> ModifiedLockedFields { get; }

Property Value

IReadOnlyList<string>

Reason

The /Reason entry of the signature dictionary, or null.

public string? Reason { get; init; }

Property Value

string

Revocation

Revocation status of the signer's certificate chain at the time of signing, evaluated from the OCSP responses and CRLs stored in the document (DSS) or in the signature (adbe-revocationInfoArchival); null if the document contains no revocation data. For document time-stamps this is the chain of the time-stamping authority. The time of signing is the verified signature time-stamp, otherwise the earliest later document time-stamp, otherwise the time of validation โ€“ the claimed signing time is not trusted. Details per certificate: RevocationDetails.

public RevocationStatus? Revocation { get; }

Property Value

RevocationStatus?

RevocationDetails

Revocation status per certificate of the chain (signer first; roots are not checked).

public IReadOnlyList<CertificateRevocation> RevocationDetails { get; }

Property Value

IReadOnlyList<CertificateRevocation>

SignatureDictionary

The signature dictionary (/V), e.g. to read application-specific entries.

public PdfDictionary? SignatureDictionary { get; init; }

Property Value

PdfDictionary

SignedRevisionLength

Number of bytes covered (= length of the signed revision).

public long SignedRevisionLength { get; init; }

Property Value

long

SignerCertificate

The certificate of the signer (for document time-stamps: of the time-stamping authority); null if it could not be determined.

public X509Certificate2? SignerCertificate { get; init; }

Property Value

X509Certificate2

SignerName

The /Name of the signature dictionary, otherwise the common name of the SignerCertificate.

public string? SignerName { get; init; }

Property Value

string

SigningTime

Claimed signing time (/M or CMS signing-time).

public DateTimeOffset? SigningTime { get; init; }

Property Value

DateTimeOffset?

SubFilter

"ETSI.CAdES.detached", "adbe.pkcs7.detached", "ETSI.RFC3161", ...

public required string SubFilter { get; init; }

Property Value

string

TimestampTime

Time from a verified signature or document time-stamp.

public DateTimeOffset? TimestampTime { get; init; }

Property Value

DateTimeOffset?

Methods

GetSignatureDictionaryText(string)

Returns a text entry of the signature dictionary (e.g. a custom "/Biometrics" entry), or null.

public string? GetSignatureDictionaryText(string key)

Parameters

key string

Returns

string

GetSignedAttribute(string)

Returns the DER value of a signed CMS attribute (e.g. biometric data), or null.

public byte[]? GetSignedAttribute(string oid)

Parameters

oid string

Returns

byte[]

GetUnsignedAttribute(string)

Returns the DER value of an unsigned CMS attribute, or null.

public byte[]? GetUnsignedAttribute(string oid)

Parameters

oid string

Returns

byte[]

ToString()

Returns a one-line summary (field, validity, signer, coverage, time-stamp and errors), for logging.

public override string ToString()

Returns

string