Trait mls_rs::identity::x509::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§
type Error: IntoAnyError
Required Methods§
sourcefn subject_bytes(
&self,
certificate: &DerCertificate
) -> Result<Vec<u8>, Self::Error>
fn subject_bytes( &self, certificate: &DerCertificate ) -> Result<Vec<u8>, Self::Error>
Der encoded bytes of a certificate subject field.
sourcefn subject_components(
&self,
certificate: &DerCertificate
) -> Result<Vec<SubjectComponent>, Self::Error>
fn subject_components( &self, certificate: &DerCertificate ) -> Result<Vec<SubjectComponent>, Self::Error>
Parsed certificate subject field components.
sourcefn subject_alt_names(
&self,
certificate: &DerCertificate
) -> Result<Vec<SubjectAltName>, Self::Error>
fn subject_alt_names( &self, certificate: &DerCertificate ) -> Result<Vec<SubjectAltName>, Self::Error>
Parsed subject alt name extensions of a certificate.
sourcefn public_key(
&self,
certificate: &DerCertificate
) -> Result<SignaturePublicKey, Self::Error>
fn public_key( &self, certificate: &DerCertificate ) -> Result<SignaturePublicKey, Self::Error>
Get the subject public key of a certificate.