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§
Required Methods§
Sourcefn verify(
&self,
algorithm: &AlgorithmIdentifier<'_>,
key: WorkingKey<'_>,
signed: &[u8],
signature: BitString<'_>,
execution: &Memory,
) -> Result<Verified, Self::Error>
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".