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
hasSignaturesboolWhether the document carries at least one signature.
isCryptographicallyValidboolWhether every signature's covered content matches what was signed — the aggregate tamper-detection verdict.
isValidUnderPolicyboolWhether every signature passed every check this call actually performed (per the options given).
signaturesIEnumerable<DocumentSignatureValidationResult>One result per signature the document carries.
findingsIEnumerable<string>Human-readable diagnostic messages from the underlying validator.
Exceptions
- ArgumentNullException
signaturesorfindingsis null.
Properties
Findings
Human-readable diagnostic messages from the underlying validator.
public IReadOnlyList<string> Findings { get; }
Property Value
HasSignatures
Whether the document carries at least one signature.
public bool HasSignatures { get; }
Property Value
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
IsValidUnderPolicy
Whether every signature passed every check this call actually performed.
public bool IsValidUnderPolicy { get; }
Property Value
Signatures
One result per signature the document carries.
public IReadOnlyList<DocumentSignatureValidationResult> Signatures { get; }