pub fn verify_evidence_record(
record: &EvidenceRecord,
artifact: &[u8],
trusted_tsas: &[Tsa],
) -> Result<ErsVerificationResult, ErsError>Expand description
Verify an Evidence Record end-to-end against the artifact it protects and the set of trusted TSAs.
Checks, per RFC 4998 as realized by this data model:
digest_algorithms.len()matches the sequence count.- Every sequence’s
hashed_messageequals the digest ofartifactunder that sequence’s declared algorithm (each renewal re-hashes the same artifact under a stronger hash). - Every
time_stamp.tsa_idis intrusted_tsas. applied_attimestamps are non-decreasing across sequences.
Sequences using algorithms whose digests don’t fit the model’s
32-byte fields (SHA-384/512, SHA3-256) are reported as
unsupported — see ErsError::UnsupportedAlgorithm — rather
than being silently skipped or truncated.