Skip to main content

View

Struct View 

Source
pub struct View<'a, 'm, 'd> { /* private fields */ }
Expand description

One immutable original preservation enclosure from a preparation. Its tokens are the SAME models used by the full TSA census and material pool.

Implementations§

Source§

impl<'a, 'd> View<'a, '_, 'd>

Source

pub fn cms_object( &self, envelope: Element<'d>, operation: &Reader<'d>, ) -> Result<CmsObject<'a, 'd>>

Selects the actual full CMS object for RFC4998 Appendix A. The supplied ContentInfo must contain this SAME parsed SignedData, not equal bytes from another parser/model. No serialization or second CMS parse occurs.

Source

pub fn cms_object_snapshot( &self, envelope: Element<'d>, snapshot: &CmsSnapshot<'_, 'd>, operation: &Reader<'d>, ) -> Result<CmsObject<'a, 'd>, SnapshotError>

Replay a genuine earlier whole CMS encoding. Only enclosing length spellings may differ from the final-message projection; all original signed fields, material, parallel signers and retained attributes must match exactly before a digest/provider/source callback is started.

Source§

impl<'a, 'm, 'd> View<'a, 'm, 'd>

Source

pub fn check_poe<'path, P, PE, A, S, RE, HE>( &self, provider: &P, operation: &Reader<'d>, authorities: &'path A, utc: &LeapTable<'d>, reference: Instant, detached: Option<&mut S>, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, '_>, &Execution<'_>) -> Result<Decision, HE>, ) -> CheckResult<'a, 'm, 'd, 'path, S::Error, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'d>, S: Source, 'd: 'path,

Verifies the original TS101733 §6.5.1 PoE, either a timestamp or an entire ERS record with BOTH renewal mechanisms. Each algorithm uses its own complete eight-hash recipe. Actual content is acquired once, after the selected candidate/key and signed ESS profile preflight.

poeDate selects earlier instances only; it cannot establish historical authority. The callback must establish path/status/algorithm validity at the following authenticated proof, or at explicit reference for the final proof. Closing ALL other original obligations remains separate.

Source

pub fn check_poe_with_later<'path, P, PE, A, S, RE, HE>( &self, provider: &P, operation: &Reader<'d>, authorities: &'path A, utc: &LeapTable<'d>, reference: Instant, detached: Option<&mut S>, later: &[Later<'_, 'm, 'd>], recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, '_>, &Execution<'_>) -> Result<Decision, HE>, ) -> CheckResult<'a, 'm, 'd, 'path, S::Error, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'d>, S: Source, 'd: 'path,

Same source recipe, excluding ONLY a subsequently added ATSv3/Annex B proof whose already verified coverage authenticates this actual PoE. EN319122-1 §5.5.3 requires this admission before ignoring later proofs; untrusted dates/order never authorize an exclusion.

Source§

impl<'a, 'm, 'd> View<'a, 'm, 'd>

Source

pub fn check_internal<'path, P, PE, A, RE, HE>( &self, envelope: Element<'d>, provider: &P, operation: &Reader<'d>, authorities: &'path A, utc: &LeapTable<'d>, reference: Instant, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, '_>, &Execution<'_>) -> Result<Decision, HE>, ) -> CheckResult<'a, 'm, 'd, 'path, Infallible, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'d>, 'd: 'path,

Verifies RFC4998 Appendix A’s INTERNAL original whole-CMS recipe. Whole record/history/path and every actual contained TSA are checked.

Source

pub fn check_internal_snapshot<'path, P, PE, A, RE, HE>( &self, envelope: Element<'d>, snapshot: &CmsSnapshot<'_, 'd>, provider: &P, operation: &Reader<'d>, authorities: &'path A, utc: &LeapTable<'d>, reference: Instant, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, '_>, &Execution<'_>) -> Result<Decision, HE>, ) -> CheckResult<'a, 'm, 'd, 'path, Infallible, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'d>, 'd: 'path,

Same complete INTERNAL record with a genuine earlier CMS source. The snapshot must preserve all selected fields and prior attributes; lost historical BER coding is never reconstructed from a claimed date.

Source

pub fn check_external<'path, P, PE, A, S, RE, HE>( &self, envelope: Element<'d>, detached: &mut S, provider: &P, operation: &Reader<'d>, authorities: &'path A, utc: &LeapTable<'d>, reference: Instant, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, '_>, &Execution<'_>) -> Result<Decision, HE>, ) -> CheckResult<'a, 'm, 'd, 'path, S::Error, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'d>, S: Source, 'd: 'path,

Verifies EXTERNAL whole CMS plus the ACTUAL separately supplied signed content as one exact document group. No whole-content buffering occurs.

Source

pub fn check_external_snapshot<'path, P, PE, A, S, RE, HE>( &self, envelope: Element<'d>, snapshot: &CmsSnapshot<'_, 'd>, detached: &mut S, provider: &P, operation: &Reader<'d>, authorities: &'path A, utc: &LeapTable<'d>, reference: Instant, recognizes: impl FnMut(usize, &TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>, historical: impl FnMut(Historical<'_, '_>, &Execution<'_>) -> Result<Decision, HE>, ) -> CheckResult<'a, 'm, 'd, 'path, S::Error, PE, RE, A::Error, HE>
where P: for<'scope> SignatureProvider<'scope, Error = PE>, A: Authorities<'d>, S: Source, 'd: 'path,

EXTERNAL group using the genuine previous CMS encoding plus actual separate content. Snapshot binding runs before source/provider work.

Source§

impl<'a, 'm, 'd> View<'a, 'm, 'd>

Source

pub fn required(&self) -> Required<'d>

Actual original typed mechanism/placement/attribute, not a level claim.

Source

pub fn ordinal(&self) -> usize

This preparation’s original proof ordinal; it is not a claimed date.

Source

pub fn timestamps(&self) -> Range<usize> ⓘ

Every actual timestamp ordinal in the SAME complete preparation.

Source

pub fn record(&self) -> Option<&'a EvidenceRecord<'d>>

Actual first-read ERS alternative, including a PoE-carried ERS record.

Source

pub fn poe(&self) -> Option<&'a LongTermValidation<'d>>

Original PoE enclosure and its additional validation material.

Source

pub fn prepared(&self) -> &'a Preparation<'m, 'd>

Same complete original signature preparation, with no new identity.

Auto Trait Implementations§

§

impl<'a, 'm, 'd> !RefUnwindSafe for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> !Send for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> !Sync for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> !UnwindSafe for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> Forget for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> Freeze for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> Unpin for View<'a, 'm, 'd>

§

impl<'a, 'm, 'd> UnsafeUnpin for View<'a, 'm, '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.