pub struct Cert<'a> { /* private fields */ }
Expand description
A parsed X509 certificate.
Implementations§
Source§impl<'a> Cert<'a>
impl<'a> Cert<'a>
Sourcepub fn valid_dns_names(&self) -> impl Iterator<Item = &str>
pub fn valid_dns_names(&self) -> impl Iterator<Item = &str>
Returns a list of valid DNS names provided in the subject alternative names extension
This function must not be used to implement custom DNS name verification. Checking that a certificate is valid for a given subject name should always be done with EndEntityCert::verify_is_valid_for_subject_name.
Sourcepub fn serial(&self) -> &[u8] ⓘ
pub fn serial(&self) -> &[u8] ⓘ
Raw certificate serial number.
This is in big-endian byte order, in twos-complement encoding.
If the caller were to add an INTEGER
tag and suitable length, this
would become a valid DER encoding.
Sourcepub fn issuer(&self) -> &[u8] ⓘ
pub fn issuer(&self) -> &[u8] ⓘ
Raw DER-encoded certificate issuer.
This does not include the outer SEQUENCE
tag or length.
Sourcepub fn subject(&self) -> &[u8] ⓘ
pub fn subject(&self) -> &[u8] ⓘ
Raw DER encoded certificate subject.
This does not include the outer SEQUENCE
tag or length.
Sourcepub fn subject_public_key_info(&self) -> SubjectPublicKeyInfoDer<'static>
Available on crate feature alloc
only.
pub fn subject_public_key_info(&self) -> SubjectPublicKeyInfoDer<'static>
alloc
only.Get the RFC 5280-compliant SubjectPublicKeyInfoDer
(SPKI) of this Cert
.
This does include the outer SEQUENCE
tag and length.
Sourcepub fn der(&self) -> CertificateDer<'a>
pub fn der(&self) -> CertificateDer<'a>
Raw DER-encoded representation of the certificate.