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.