Skip to main content

Verifier

Trait Verifier 

Source
pub trait Verifier {
    type Info;

    // Required method
    fn verify(
        &self,
        attestation: &Attestation,
    ) -> Result<(PublicKey, Self::Info), String>;
}
Expand description

Trust policy for the device attestation a server presents in the handshake. It owns everything the wire deliberately does not (which roots to trust, self-signing rules, recovery overrides) and decides which Arks a session is opened with.

Required Associated Types§

Source

type Info

Session info extracted from an accepted attestation.

Required Methods§

Source

fn verify( &self, attestation: &Attestation, ) -> Result<(PublicKey, Self::Info), String>

Verifies the device attestation, returning the server’s identity key along with any info extracted from the attestation. The handshake signature is checked against the returned key, so this decision is what authenticates the session. Rejecting the attestation aborts the handshake.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Verifier for PublicKey

A pinned identity, accepting any attestation and handing it back as presented. The handshake is authenticated against the pinned key instead.

Source§

type Info = Attestation

Source§

fn verify( &self, attestation: &Attestation, ) -> Result<(PublicKey, Self::Info), String>

Implementors§