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>
impl<'a, 'd> View<'a, '_, 'd>
Sourcepub fn cms_object(
&self,
envelope: Element<'d>,
operation: &Reader<'d>,
) -> Result<CmsObject<'a, 'd>>
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.
Sourcepub fn cms_object_snapshot(
&self,
envelope: Element<'d>,
snapshot: &CmsSnapshot<'_, 'd>,
operation: &Reader<'d>,
) -> Result<CmsObject<'a, 'd>, SnapshotError>
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>
impl<'a, 'm, 'd> View<'a, 'm, 'd>
Sourcepub 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,
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.
Sourcepub 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,
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>
impl<'a, 'm, 'd> View<'a, 'm, 'd>
Sourcepub 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,
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.
Sourcepub 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,
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.
Sourcepub 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,
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.
Sourcepub 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,
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>
impl<'a, 'm, 'd> View<'a, 'm, 'd>
Sourcepub fn required(&self) -> Required<'d>
pub fn required(&self) -> Required<'d>
Actual original typed mechanism/placement/attribute, not a level claim.
Sourcepub fn ordinal(&self) -> usize
pub fn ordinal(&self) -> usize
This preparation’s original proof ordinal; it is not a claimed date.
Sourcepub fn timestamps(&self) -> Range<usize> ⓘ
pub fn timestamps(&self) -> Range<usize> ⓘ
Every actual timestamp ordinal in the SAME complete preparation.
Sourcepub fn record(&self) -> Option<&'a EvidenceRecord<'d>>
pub fn record(&self) -> Option<&'a EvidenceRecord<'d>>
Actual first-read ERS alternative, including a PoE-carried ERS record.
Sourcepub fn poe(&self) -> Option<&'a LongTermValidation<'d>>
pub fn poe(&self) -> Option<&'a LongTermValidation<'d>>
Original PoE enclosure and its additional validation material.
Sourcepub fn prepared(&self) -> &'a Preparation<'m, 'd>
pub fn prepared(&self) -> &'a Preparation<'m, 'd>
Same complete original signature preparation, with no new identity.