X509CertificateReader

Trait X509CertificateReader 

Source
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§