Table of Contents

Class DocumentSignatureValidationReport

Namespace
DocToolkit
Assembly
DocToolkit.Primitives.dll

The result of validating every signature a document carries.

public sealed class DocumentSignatureValidationReport
Inheritance
DocumentSignatureValidationReport
Inherited Members

Remarks

No revocation check and no network access ever happen, on any call, regardless of the options passed. RevocationStatus reflects only what a purely local check can determine.

An unsigned document reports IsCryptographicallyValid = false, the same as a tampered one — check HasSignatures first. "No signature" and "a signature that failed" are different findings a caller must not conflate; measured directly against a genuinely unsigned fixture, which reports HasSignatures = false with a single finding, no exception.

IsCryptographicallyValid is the tamper-detection verdict — the per-signature CryptographicStatus is not, despite the similar name; see that type's own remarks for why. For a document carrying exactly one signature, the two questions coincide in practice. For one carrying more than one, IsCryptographicallyValid is an aggregate across all of them: it answers "was anything covered by any signature altered since signing," not "which signature."

Constructors

DocumentSignatureValidationReport(bool, bool, bool, IEnumerable<DocumentSignatureValidationResult>, IEnumerable<string>)

Creates the result of validating every signature a document carries.

public DocumentSignatureValidationReport(bool hasSignatures, bool isCryptographicallyValid, bool isValidUnderPolicy, IEnumerable<DocumentSignatureValidationResult> signatures, IEnumerable<string> findings)

Parameters

hasSignatures bool

Whether the document carries at least one signature.

isCryptographicallyValid bool

Whether every signature's covered content matches what was signed — the aggregate tamper-detection verdict.

isValidUnderPolicy bool

Whether every signature passed every check this call actually performed (per the options given).

signatures IEnumerable<DocumentSignatureValidationResult>

One result per signature the document carries.

findings IEnumerable<string>

Human-readable diagnostic messages from the underlying validator.

Exceptions

ArgumentNullException

signatures or findings is null.

Properties

Findings

Human-readable diagnostic messages from the underlying validator.

public IReadOnlyList<string> Findings { get; }

Property Value

IReadOnlyList<string>

HasSignatures

Whether the document carries at least one signature.

public bool HasSignatures { get; }

Property Value

bool

IsCryptographicallyValid

Whether every signature's covered content matches what was signed. See the remarks on this type before reading false as "tampered" — it is also what an unsigned document reports.

public bool IsCryptographicallyValid { get; }

Property Value

bool

IsValidUnderPolicy

Whether every signature passed every check this call actually performed.

public bool IsValidUnderPolicy { get; }

Property Value

bool

Signatures

One result per signature the document carries.

public IReadOnlyList<DocumentSignatureValidationResult> Signatures { get; }

Property Value

IReadOnlyList<DocumentSignatureValidationResult>