pub struct Content<'v, 's, S: RangeSource> { /* private fields */ }Expand description
Independent storage for one complete original decoded member. Its ASN.1 cursor always inherits the archive’s producing session and current query; neither moving storage nor reopening a cursor resets cumulative work.
Implementations§
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn check_assertion_actor<'c, 'd, P, PE, RE>(
&'d self,
token: &'d Token<'d>,
parent: &Reader<'d>,
provider: &'d P,
context: &CheckContext<'d, 'c>,
input: &impl Payload<'v, 's, S>,
kind: InputKind,
recognizes: impl FnMut(&TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>,
) -> ActorResult<'c, 'd, 'v, 's, S, PE, RE>where
P: for<'scope> SignatureProvider<'scope, Error = PE>,
pub async fn check_assertion_actor<'c, 'd, P, PE, RE>(
&'d self,
token: &'d Token<'d>,
parent: &Reader<'d>,
provider: &'d P,
context: &CheckContext<'d, 'c>,
input: &impl Payload<'v, 's, S>,
kind: InputKind,
recognizes: impl FnMut(&TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>,
) -> ActorResult<'c, 'd, 'v, 's, S, PE, RE>where
P: for<'scope> SignatureProvider<'scope, Error = PE>,
Checks one actual historical assertion over an original complete input. The role selects data versus archive-input mathematics, not container conformance. Only the source-derived graph can mint archive coverage.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn check_cades<'a, P: SignatureProvider<'a>>(
&'a self,
challenge: Challenge<'a, P>,
payload: &impl Payload<'v, 's, S>,
) -> Result<Checks<'a, 'v, 's, S>, Error<S::Error, P::Error, S::Document, S::Generation>>
pub async fn check_cades<'a, P: SignatureProvider<'a>>( &'a self, challenge: Challenge<'a, P>, payload: &impl Payload<'v, 's, S>, ) -> Result<Checks<'a, 'v, 's, S>, Error<S::Error, P::Error, S::Document, S::Generation>>
Validates both member/session identities and payload framing BEFORE initializing provider states, then drives the existing CMS batch with the sealed original member stream. Negative signer answers are retained.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub fn member(&self) -> &Member<'v, 's, S>
pub fn member(&self) -> &Member<'v, 's, S>
Exact original central-directory occurrence that supplied these bytes.
Sourcepub fn bytes(&self) -> &[u8] ⓘ
pub fn bytes(&self) -> &[u8] ⓘ
Complete decoded bytes, without copying or treating them as physical offsets.
Sourcepub fn enclosure(&self) -> Span
pub fn enclosure(&self) -> Span
Physical original local record, including any descriptor.
§Panics
Only if the private complete-content construction invariant is broken: complete CRC-checked bytes always have a validated local enclosure.
Sourcepub fn read<'q, W: Work + 'q>(
&'q self,
work: &W,
) -> ResultOf<(SignedData<'q>, Reader<'q>), S>
pub fn read<'q, W: Work + 'q>( &'q self, work: &W, ) -> ResultOf<(SignedData<'q>, Reader<'q>), S>
Inspects the original carried CMS without a replacement parser or copy.
Sourcepub fn read_timestamp<'q, W: Work + 'q>(
&'q self,
work: &W,
) -> ResultOf<(Token<'q>, Reader<'q>), S>
pub fn read_timestamp<'q, W: Work + 'q>( &'q self, work: &W, ) -> ResultOf<(Token<'q>, Reader<'q>), S>
Uses the existing complete RFC3161 envelope reader on this source.
Sourcepub fn read_evidence<'q, W: Work + 'q>(
&'q self,
work: &W,
) -> ResultOf<(EvidenceRecord<'q>, Reader<'q>), S>
pub fn read_evidence<'q, W: Work + 'q>( &'q self, work: &W, ) -> ResultOf<(EvidenceRecord<'q>, Reader<'q>), S>
Uses the shared RFC4998 grammar for one entire original member.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn check_manifest_evidence<'a, 'c, X, P, PE, A, RE, HE, FE>(
&'a self,
record: &'a EvidenceRecord<'a>,
parent: &Reader<'a>,
provider: &'a P,
authorities: &'a A,
utc: &LeapTable<'a>,
reference: Instant,
catalogue: &'c Catalogue<'v, 's, X::Id, X::Document, X::Generation, S>,
xml: &X,
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, 'a, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>,
) -> Result<Option<ManifestChecked<'a, 'c, 'v, 's, X::Id, X::Document, X::Generation, S>>, ManifestError<ArchiveError<S::Error>, VerificationError<ManifestInputError<ReadFailure<<S as RangeSource>::Error, <S as RangeSource>::Document, <S as RangeSource>::Generation>, Error<<X as Xml>::Error, Error<Infallible, PE>, <X as Xml>::Id, <X as Xml>::Document, <X as Xml>::Generation>, <X as Xml>::Id>, PE, RE, A::Error, HE, FE>, AccessError<X::Error, X::Id>>>where
X: OwnedBinaryXml,
P: for<'scope> SignatureProvider<'scope, Error = PE> + for<'scope> DigestProvider<'scope, X>,
A: Authorities<'a>,
pub async fn check_manifest_evidence<'a, 'c, X, P, PE, A, RE, HE, FE>(
&'a self,
record: &'a EvidenceRecord<'a>,
parent: &Reader<'a>,
provider: &'a P,
authorities: &'a A,
utc: &LeapTable<'a>,
reference: Instant,
catalogue: &'c Catalogue<'v, 's, X::Id, X::Document, X::Generation, S>,
xml: &X,
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, 'a, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>,
) -> Result<Option<ManifestChecked<'a, 'c, 'v, 's, X::Id, X::Document, X::Generation, S>>, ManifestError<ArchiveError<S::Error>, VerificationError<ManifestInputError<ReadFailure<<S as RangeSource>::Error, <S as RangeSource>::Document, <S as RangeSource>::Generation>, Error<<X as Xml>::Error, Error<Infallible, PE>, <X as Xml>::Id, <X as Xml>::Document, <X as Xml>::Generation>, <X as Xml>::Id>, PE, RE, A::Error, HE, FE>, AccessError<X::Error, X::Id>>>where
X: OwnedBinaryXml,
P: for<'scope> SignatureProvider<'scope, Error = PE> + for<'scope> DigestProvider<'scope, X>,
A: Authorities<'a>,
Verifies the exact referenced member group and its declared XML hashes through one all-chain digest pass per original object. A negative URI group returns None with its full inspection catalogue left available; it never becomes a successful subset. An unrelated record is caller misuse. Original XML source provenance is a separate producing boundary.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn check_evidence<'a, P, PE, A, RE, HE, FE>(
&'a self,
record: &'a EvidenceRecord<'a>,
parent: &Reader<'a>,
provider: &'a P,
authorities: &'a A,
utc: &LeapTable<'a>,
reference: Instant,
objects: Group<'v, 's, 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, 'a, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>,
) -> Result<Checked<'a, 'a, 'v, 's, S>, Error<S::Error, PE, RE, A::Error, HE, FE, S::Document, S::Generation>>where
P: for<'scope> SignatureProvider<'scope, Error = PE>,
A: Authorities<'a>,
pub async fn check_evidence<'a, P, PE, A, RE, HE, FE>(
&'a self,
record: &'a EvidenceRecord<'a>,
parent: &Reader<'a>,
provider: &'a P,
authorities: &'a A,
utc: &LeapTable<'a>,
reference: Instant,
objects: Group<'v, 's, 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, 'a, 'a, 'scope>) -> Result<(), ProfileFailure<FE>>,
) -> Result<Checked<'a, 'a, 'v, 's, S>, Error<S::Error, PE, RE, A::Error, HE, FE, S::Document, S::Generation>>where
P: for<'scope> SignatureProvider<'scope, Error = PE>,
A: Authorities<'a>,
Checks all original record participants, both renewal relations and chronology with the ONE shared ERS kernel. The original object group is preflighted before states and streamed once for all chain algorithms.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub fn material<'a>(
&'a self,
message: &'a SignedData<'a>,
parent: &Reader<'a>,
) -> Result<Pool<'a, 'v, 's, S>, Error<S::Error>>
pub fn material<'a>( &'a self, message: &'a SignedData<'a>, parent: &Reader<'a>, ) -> Result<Pool<'a, 'v, 's, S>, Error<S::Error>>
Reads every original certificate/revocation choice and every signer’s
validation values through the existing CMS/CAdES kernels. This applies
to carried TST SignedData without asserting that it is a CAdES signature.
§Panics
An internal CMS invariant fails if its retained revocation catalogue cannot supply a reader for an ordinal taken from that same catalogue.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn check_timestamp<'a, P, PE, RE>(
&'a self,
token: &'a Token<'a>,
parent: &Reader<'a>,
provider: &'a P,
context: Context<'_, 'a, '_>,
input: &impl Payload<'v, 's, S>,
recognizes: impl FnMut(&TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>,
) -> Result<Checked<'a, S::Document, S::Generation>, Error<S::Error, PE, RE, S::Document, S::Generation>>where
P: for<'scope> SignatureProvider<'scope, Error = PE>,
pub async fn check_timestamp<'a, P, PE, RE>(
&'a self,
token: &'a Token<'a>,
parent: &Reader<'a>,
provider: &'a P,
context: Context<'_, 'a, '_>,
input: &impl Payload<'v, 's, S>,
recognizes: impl FnMut(&TokenExtension<'_>, &Execution<'_>) -> Result<bool, RE>,
) -> Result<Checked<'a, S::Document, S::Generation>, Error<S::Error, PE, RE, S::Document, S::Generation>>where
P: for<'scope> SignatureProvider<'scope, Error = PE>,
Requires the actual carried token/source first, then invokes the shared full asynchronous timestamp validator on the sealed original payload. Candidate/key/time/extension recognition stay caller-provided contracts.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn with_signed_xml<F: SignatureFactory<'v, 's, S>, V: SignatureVisitor<'v, 's, F, S>, W: Work>(
self,
factory: &F,
visitor: V,
work: &W,
) -> Result<V::Output, Error<ReadFailure<S::Error, S::Document, S::Generation>, F::Error, V::Error, AccessError<F::Error, F::Id>>>
pub async fn with_signed_xml<F: SignatureFactory<'v, 's, S>, V: SignatureVisitor<'v, 's, F, S>, W: Work>( self, factory: &F, visitor: V, work: &W, ) -> Result<V::Output, Error<ReadFailure<S::Error, S::Document, S::Generation>, F::Error, V::Error, AccessError<F::Error, F::Id>>>
Moves the actual complete original member into owning XML verification, then keeps its view/state/source/current operation alive through await. No separately parsed snapshot can be attached to this source receipt.
Source§impl<'v, 's, S: RangeSource> Content<'v, 's, S>
impl<'v, 's, S: RangeSource> Content<'v, 's, S>
Sourcepub async fn with_xml<F: Factory, V: Visitor<'v, 's, F, S>, W: Work>(
self,
factory: &F,
visitor: V,
work: &W,
) -> Result<V::Output, Error<ReadFailure<S::Error, S::Document, S::Generation>, F::Error, V::Error, AccessError<F::Error, F::Id>>>
pub async fn with_xml<F: Factory, V: Visitor<'v, 's, F, S>, W: Work>( self, factory: &F, visitor: V, work: &W, ) -> Result<V::Output, Error<ReadFailure<S::Error, S::Document, S::Generation>, F::Error, V::Error, AccessError<F::Error, F::Id>>>
Moves the already complete allocation into XML production. Raw manifest signatures/time assertions can consume this same retained input first, avoiding a second ZIP acquisition, decode, CRC pass or buffer copy.