Skip to main content

Verify

Trait Verify 

Source
pub trait Verify {
    type Error;

    // Required method
    fn verify(
        &self,
        algorithm: &AlgorithmIdentifier<'_>,
        key: WorkingKey<'_>,
        signed: &[u8],
        signature: BitString<'_>,
        execution: &Memory,
    ) -> Result<Verified, Self::Error>;
}
Expand description

Who checks a signature.

Which algorithms may verify what belongs to the algorithm registry rather than to this crate, so the check is asked for rather than performed here. A caller that supplies no verifier gets no path: nothing else in a path binds one certificate to the next.

Required Associated Types§

Source

type Error

The original policy, provider or resource failure of this implementation.

Required Methods§

Source

fn verify( &self, algorithm: &AlgorithmIdentifier<'_>, key: WorkingKey<'_>, signed: &[u8], signature: BitString<'_>, execution: &Memory, ) -> Result<Verified, Self::Error>

Whether the signature over signed is the one the key in key makes under algorithm.

The key arrives with the parameters in force rather than as the encoding alone, since a certificate may omit them and stand in the ones an authority above it wrote.

A key may also be offered before those are known: while a path is being looked for, an authority is asked about with the key exactly as its certificate wrote it, because what it stands in is above and above has not been reached. An implementation that cannot judge a key without parameters it was not given answers Unsupported rather than No. The two are not interchangeable here: No prunes the branch, and a key that merely could not be judged yet is asked about again from the anchor down.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Verify for ()

Nothing is verified, which is what a caller without a registry has.

Source§

type Error = !

Source§

fn verify( &self, _algorithm: &AlgorithmIdentifier<'_>, _key: WorkingKey<'_>, _signed: &[u8], _signature: BitString<'_>, _execution: &Memory, ) -> Result<Verified, Self::Error>

Implementors§