Skip to main content

EvidenceRecord

Struct EvidenceRecord 

Source
pub struct EvidenceRecord<'d> { /* private fields */ }
Expand description

Original evidence record. Flat ownership makes traversal and drop stack-safe.

Implementations§

Source§

impl<'document> EvidenceRecord<'document>

Source

pub fn input_plan( &self, operation: &Reader<'_>, ) -> Result<InputPlan<'_, 'document>, PlanError>

Validates every timestamp format/tree width/digest advertisement and same-chain algorithm before covered-object acquisition or provider work.

Source

pub fn verify<'a, P, PE, A, S, RE, HE>( &'a self, provider: &'a P, operation: &Reader<'a>, authorities: &'a A, utc: &LeapTable<'a>, reference: Instant, objects: &mut [S], membership: Membership, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, 'a>, &Execution<'_>) -> Result<Decision, HE>, ) -> VerificationResult<'a, 'document, S::Error, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'document>, S: Source, 'document: 'a,

Verifies every timestamp, both renewal relations, the digest union and actual chronology. Objects are read ONCE with all chain algorithms in DigestBatch’s shared fan-out. Reverse execution exposes the next already checked participant to the caller’s historical validator.

Historical Valid must cover actual path/status, signed ESS restrictions, signature/hash suitability at the next token and tree suitability through the next chain’s first token. The last participant is validated at the explicit verification reference. Unprotected hints never satisfy this.

Source

pub fn verify_with_profile<'a, P, PE, A, S, RE, HE, FE>( &'a self, provider: &'a P, operation: &Reader<'a>, authorities: &'a A, utc: &LeapTable<'a>, reference: Instant, objects: &mut [S], membership: Membership, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, 'a>, &Execution<'_>) -> Result<Decision, HE>, profile: impl for<'view, 'scope> FnMut(usize, ProfileInput<'view, 'document, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>, ) -> VerificationResult<'a, 'document, S::Error, PE, RE, A::Error, HE, FE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'document>, S: Source, 'document: 'a,

Same complete sequence check with one schema/profile callback per actual timestamp. It sees the SAME ESS and TSTInfo readings before signature or covered-input callbacks; no second token parse or provider is used.

Source

pub fn verify_requests_with_profile<'a, P, PE, A, S, RE, HE, FE>( &'a self, provider: &'a P, operation: &Reader<'a>, authorities: &'a A, utc: &LeapTable<'a>, reference: Instant, objects: &mut [S], membership: Membership, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, 'a>, &Execution<'_>) -> Result<Decision, HE>, profile: impl for<'view, 'scope> FnMut(usize, ProfileInput<'view, 'document, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>, ) -> VerificationResult<'a, 'document, S::Error, PE, RE, A::Error, HE, FE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'document>, S: RequestSource<'a, P>, 'document: 'a,

Checks schema-defined algorithm-dependent object preimages (for example the TS101733 PoE eight-hash recipe) through the SAME sequence kernel. Request ordinals refer to original chains; repeated identities share their completed output. No arbitrary finalized digest is accepted.

Source§

impl<'d> EvidenceRecord<'d>

Source

pub fn read(parent: &Reader<'d>, element: &Element<'d>) -> Result<Self>

Reads one original embedded record. Parent encoding/depth are inherited.

Source

pub fn original(&self) -> Original<'d>

Whole original record, without serializing its retained views.

Source

pub fn digest_algorithms(&self) -> &[AlgorithmIdentifier<'d>]

Declared union; semantic membership is checked with the selected provider.

Source

pub fn crypto_infos(&self) -> Option<&[Attribute<'d>]>

Unprotected validation hints; no trust is inferred from their presence.

Source

pub fn encryption_info(&self) -> Option<&EncryptionInfo<'d>>

Unprotected exact re-encryption context.

Source

pub fn sequence(&self) -> Original<'d>

Whole original sequence of timestamp-renewal chains.

Source

pub fn chains(&self) -> &[Chain<'d>]

Actual chain order; not a trusted chronology before verification.

Source

pub fn timestamps(&self) -> &[ArchiveTimeStamp<'d>]

Flat original timestamp catalogue; chain ranges select their members.

Trait Implementations§

Source§

impl<'d> Debug for EvidenceRecord<'d>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'d> !Freeze for EvidenceRecord<'d>

§

impl<'d> !RefUnwindSafe for EvidenceRecord<'d>

§

impl<'d> !Send for EvidenceRecord<'d>

§

impl<'d> !Sync for EvidenceRecord<'d>

§

impl<'d> !UnwindSafe for EvidenceRecord<'d>

§

impl<'d> Unpin for EvidenceRecord<'d>

§

impl<'d> UnsafeUnpin for EvidenceRecord<'d>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.