Skip to main content

VerifiedSession

Struct VerifiedSession 

Source
pub struct VerifiedSession<'view, 'scope, 'inputs, W: Work> { /* private fields */ }
Expand description

A verified request’s scoped continuation. No document, policy, resolver or budget is reconstructed when selecting a signature or replaying a reference.

Implementations§

Source§

impl<W: Work> VerifiedSession<'_, '_, '_, W>

Source

pub fn with_key_association_in<Q: Work, R, E>( &self, signature: NodeIdentity, expected: WorkingKey<'_>, work: &Q, visitor: impl FnOnce(KeyAssociation) -> Result<R, E>, ) -> Result<R, CatalogueError<E>>

Associate an original authenticated Signature’s successful key using only the supplied current query execution. Selection, receipt gates, provider comparison and callback admission all charge work, never the completed verification’s producer-local execution. Retained storage keeps its original account; no Reference catalogue, resolver or verifier is run.

The original document/generation, policy, provider and terminal capture cause remain binding. Same is key association, not certificate trust.

Source§

impl<W: Work> VerifiedSession<'_, '_, '_, W>

Source

pub fn resolve_bare_name_in<Q: Work>( &self, uri: &str, work: &Q, ) -> Result<BareNameTarget, DsigError>

Resolve #id through this operation’s ID registrations, fragment unescaping and same-document ID semantics, charging work. XMLDSig 1.1 §4.4.3.3 defines the bare-name form; XPointer and non-fragment forms are reported, never interpreted. https://www.w3.org/TR/2013/REC-xmldsig-core1-20130411/#sec-Same-Document

Source

pub fn resolve_digest_method_in<Q: Work>( &self, method: NodeIdentity, work: &Q, ) -> Result<DigestMethodResolution, DsigError>

Interpret an original DigestMethod element. A recognized algorithm that the operation policy forbids is a policy error, not Unsupported.

Source

pub fn begin_digest( &self, algorithm: DigestAlgorithm, ) -> Result<SessionDigest<'_>, DsigError>

Start an incremental digest with the selected provider under the compiled digest policy.

Source

pub fn execution(&self) -> &W

This verified request’s own execution. A continuation that funds its work from the request, rather than from a separately supplied query account, keeps the caller’s local and aggregate ceilings.

Source

pub fn certificate_parser(&self) -> Parser

A DER certificate parser bounded by this operation’s X.509 resource policy (max_x509_work, max_x509_workspace_bytes, under the hard ceilings), on a fresh account of its own, as verification’s certificate processing is. Path validation and certificate storage that use its account obey the same limits.

Source

pub fn certificate_path_bounds(&self) -> ValidationBounds

Shared path-processor bounds from this operation’s key-trust policy, the same bounds verification applied to its own paths.

Source

pub fn certificate_path_verifier<'a, 'p>( &'p self, chain: &'p [&'a Certificate<'a>], anchor: &'a Certificate<'a>, ) -> CertificatePathVerifier<'a, 'p>

Certificate-path signature checks for chain and anchor through this operation’s provider and certificate trust policy.

Source§

impl<'view, 'scope, 'inputs, W: Work> VerifiedSession<'view, 'scope, 'inputs, W>

Source

pub fn view(&self) -> DocumentView<'view>

Original immutable view; identities never cross a second parse/projection.

Source

pub fn evidence(&self) -> &VerifyEvidence<OwnedVec<SignatureEvidence, W>>

Results of the original verification. Inspect errors and target status independently of selected instruction authentication.

Source

pub fn into_evidence(self) -> VerifyEvidence<OwnedVec<SignatureEvidence, W>>

Transfer independently owned result facts with their retained account. This transfers no document or operation borrow and no replay capability.

Source

pub fn select_signature( &self, identity: NodeIdentity, ) -> Result<SelectedSignature<'_, 'view, 'scope, 'inputs, W>, DsigError>

Select only a Signature whose original cryptographic decision succeeded. A failed child Manifest digest does not erase that decision.

Source

pub fn with_query<Q: Work, R, E>( &self, identity: NodeIdentity, work: &Q, visitor: impl for<'query> FnOnce(SelectedSignature<'query, 'view, 'scope, 'inputs, W, Q>) -> Result<R, E>, ) -> Result<R, CatalogueError<E>>

Continue an original authenticated signature with a separate current execution. Query scratch cannot escape the callback; the document, provider, policy, authentication and retained storage remain original. Selection, inspection, resolution and transform replay spend work; the original compiled policy’s cumulative allowances are not reset. Use select_signature instead to retain producer-funded execution.

Auto Trait Implementations§

§

impl<'view, 'scope, 'inputs, W> !Freeze for VerifiedSession<'view, 'scope, 'inputs, W>

§

impl<'view, 'scope, 'inputs, W> !RefUnwindSafe for VerifiedSession<'view, 'scope, 'inputs, W>

§

impl<'view, 'scope, 'inputs, W> !Send for VerifiedSession<'view, 'scope, 'inputs, W>

§

impl<'view, 'scope, 'inputs, W> !Sync for VerifiedSession<'view, 'scope, 'inputs, W>

§

impl<'view, 'scope, 'inputs, W> !UnwindSafe for VerifiedSession<'view, 'scope, 'inputs, W>

§

impl<'view, 'scope, 'inputs, W> Unpin for VerifiedSession<'view, 'scope, 'inputs, W>
where VerifyEvidence<OwnedVec<SignatureEvidence, W>>: Unpin, OwnedVec<CapturedOperation<&'scope VerificationPolicy, &'scope VerificationOperationBudgets<'inputs>, ScopedCapture<'scope, W>>, W>: Unpin, &'scope W: Unpin,

§

impl<'view, 'scope, 'inputs, W> UnsafeUnpin for VerifiedSession<'view, 'scope, 'inputs, W>
where VerifyEvidence<OwnedVec<SignatureEvidence, W>>: UnsafeUnpin, OwnedVec<CapturedOperation<&'scope VerificationPolicy, &'scope VerificationOperationBudgets<'inputs>, ScopedCapture<'scope, W>>, W>: UnsafeUnpin, &'scope W: UnsafeUnpin,

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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> Same for T

Source§

type Output = T

Should always be Self
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.