WireIdentityReader

Trait WireIdentityReader 

Source
pub trait WireIdentityReader {
    // Required methods
    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

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

Implementations on Foreign Types§

Source§

impl WireIdentityReader for &[u8]

Source§

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§

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§

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§