Skip to main content

WireIdentityReader

Trait WireIdentityReader 

Source
pub trait WireIdentityReader {
    // Required methods
    async fn extract_identity(
        &self,
        env: &PkiEnvironment,
        hash_alg: HashAlgorithm,
    ) -> Result<WireIdentity, CertificateError>;
    fn extract_created_at(&self) -> Result<u64, CertificateError>;
    fn extract_public_key(&self) -> Result<Vec<u8>, CertificateError>;
}

Required Methods§

Source

async fn extract_identity( &self, env: &PkiEnvironment, hash_alg: HashAlgorithm, ) -> Result<WireIdentity, CertificateError>

Verifies a proof of identity, may it be a x509 certificate (or a Verifiable Presentation (later)). We do not verify anything else e.g. expiry, it is left to MLS implementation

Source

fn extract_created_at(&self) -> Result<u64, CertificateError>

returns the ‘Not Before’ claim which usually matches the creation timestamp

Source

fn extract_public_key(&self) -> Result<Vec<u8>, CertificateError>

returns the ‘Subject Public Key Info’ claim

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WireIdentityReader for &[u8]

Source§

async fn extract_identity( &self, env: &PkiEnvironment, hash_alg: HashAlgorithm, ) -> Result<WireIdentity, CertificateError>

Source§

fn extract_created_at(&self) -> Result<u64, CertificateError>

Source§

fn extract_public_key(&self) -> Result<Vec<u8>, CertificateError>

Source§

impl WireIdentityReader for Vec<u8>

Source§

async fn extract_identity( &self, env: &PkiEnvironment, hash_alg: HashAlgorithm, ) -> Result<WireIdentity, CertificateError>

Source§

fn extract_created_at(&self) -> Result<u64, CertificateError>

Source§

fn extract_public_key(&self) -> Result<Vec<u8>, CertificateError>

Source§

impl WireIdentityReader for Certificate

Source§

async fn extract_identity( &self, env: &PkiEnvironment, hash_alg: HashAlgorithm, ) -> Result<WireIdentity, CertificateError>

Source§

fn extract_created_at(&self) -> Result<u64, CertificateError>

Source§

fn extract_public_key(&self) -> Result<Vec<u8>, CertificateError>

Implementors§