pub trait X509CertificateReader {
    type Error: IntoAnyError;

    // Required methods
    fn subject_bytes(
        &self,
        certificate: &DerCertificate
    ) -> Result<Vec<u8>, Self::Error>;
    fn subject_components(
        &self,
        certificate: &DerCertificate
    ) -> Result<Vec<SubjectComponent>, Self::Error>;
    fn subject_alt_names(
        &self,
        certificate: &DerCertificate
    ) -> Result<Vec<SubjectAltName>, Self::Error>;
    fn public_key(
        &self,
        certificate: &DerCertificate
    ) -> Result<SignaturePublicKey, Self::Error>;
}
Expand description

Trait for X.509 certificate parsing.

Required Associated Types§

Required Methods§

source

fn subject_bytes( &self, certificate: &DerCertificate ) -> Result<Vec<u8>, Self::Error>

Der encoded bytes of a certificate subject field.

source

fn subject_components( &self, certificate: &DerCertificate ) -> Result<Vec<SubjectComponent>, Self::Error>

Parsed certificate subject field components.

source

fn subject_alt_names( &self, certificate: &DerCertificate ) -> Result<Vec<SubjectAltName>, Self::Error>

Parsed subject alt name extensions of a certificate.

source

fn public_key( &self, certificate: &DerCertificate ) -> Result<SignaturePublicKey, Self::Error>

Get the subject public key of a certificate.

Implementors§