Skip to main content

SignatureXml

Trait SignatureXml 

Source
pub trait SignatureXml: Xml {
    // Required methods
    fn signature_status<W: Work>(
        &self,
        snapshot: Snapshot<Self::Document, Self::Generation>,
        signature: Self::Id,
        execution: &W,
    ) -> Result<Status, Self::Error>;
    fn reference_count<W: Work>(
        &self,
        snapshot: Snapshot<Self::Document, Self::Generation>,
        signature: Self::Id,
        execution: &W,
    ) -> Result<usize, Self::Error>;
    fn reference<R, W: Work>(
        &self,
        snapshot: Snapshot<Self::Document, Self::Generation>,
        signature: Self::Id,
        ordinal: usize,
        execution: &W,
        visitor: impl for<'view> FnOnce(Reference<'view, Self::Id>) -> R,
    ) -> Result<R, Self::Error>;
    fn qualifying_target<W: Work>(
        &self,
        snapshot: Snapshot<Self::Document, Self::Generation>,
        qualifying: Self::Id,
        execution: &W,
    ) -> Result<Target<Self::Id>, Self::Error>;
}
Expand description

Read-only access to actual XMLDSig evidence, never an untrusted XML assertion.

The adapter checks original identity/generation and maps only the chosen signature’s evidence. It must not substitute another valid signature, a Manifest reference or a URI string for authenticated original-node coverage. Every data-dependent lookup is admitted through current Work and XML policy. These queries do not repeat signature verification or perform implicit I/O.

Required Methods§

Source

fn signature_status<W: Work>( &self, snapshot: Snapshot<Self::Document, Self::Generation>, signature: Self::Id, execution: &W, ) -> Result<Status, Self::Error>

Returns the exact selected signature’s completed XMLDSig outcome. Path trust, trusted lists and application acceptance are separate facts.

Source

fn reference_count<W: Work>( &self, snapshot: Snapshot<Self::Document, Self::Generation>, signature: Self::Id, execution: &W, ) -> Result<usize, Self::Error>

Counts only the chosen signature’s direct SignedInfo references.

Source

fn reference<R, W: Work>( &self, snapshot: Snapshot<Self::Document, Self::Generation>, signature: Self::Id, ordinal: usize, execution: &W, visitor: impl for<'view> FnOnce(Reference<'view, Self::Id>) -> R, ) -> Result<R, Self::Error>

Inspects one original SignedInfo reference in ordinal order.

Source

fn qualifying_target<W: Work>( &self, snapshot: Snapshot<Self::Document, Self::Generation>, qualifying: Self::Id, execution: &W, ) -> Result<Target<Self::Id>, Self::Error>

Resolves Target using the XML owner’s URI/ID kernel, without acquisition. URI syntax, namespace-independent attribute access and ID uniqueness are checked by the owner; resource/processing errors must not become Other.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§