pub struct Cert<'a> {Show 13 fields
pub(crate) serial: Input<'a>,
pub(crate) signed_data: SignedData<'a>,
pub(crate) issuer: Input<'a>,
pub(crate) validity: Input<'a>,
pub(crate) subject: Input<'a>,
pub(crate) spki: Input<'a>,
pub(crate) basic_constraints: Option<Input<'a>>,
pub(crate) key_usage: Option<Input<'a>>,
pub(crate) eku: Option<Input<'a>>,
pub(crate) name_constraints: Option<Input<'a>>,
pub(crate) subject_alt_name: Option<Input<'a>>,
pub(crate) crl_distribution_points: Option<Input<'a>>,
der: CertificateDer<'a>,
}
Expand description
A parsed X509 certificate.
Fields§
§serial: Input<'a>
§signed_data: SignedData<'a>
§issuer: Input<'a>
§validity: Input<'a>
§subject: Input<'a>
§spki: Input<'a>
§basic_constraints: Option<Input<'a>>
§key_usage: Option<Input<'a>>
§eku: Option<Input<'a>>
§name_constraints: Option<Input<'a>>
§subject_alt_name: Option<Input<'a>>
§crl_distribution_points: Option<Input<'a>>
§der: CertificateDer<'a>
Implementations§
Source§impl<'a> Cert<'a>
impl<'a> Cert<'a>
pub(crate) fn from_der(cert_der: Input<'a>) -> Result<Self, Error>
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 subject_public_key_info(&self) -> SubjectPublicKeyInfoDer<'static>
pub fn subject_public_key_info(&self) -> SubjectPublicKeyInfoDer<'static>
Get the RFC 5280-compliant SubjectPublicKeyInfoDer
(SPKI) of this Cert
.
Sourcepub(crate) fn crl_distribution_points(
&self,
) -> Option<impl Iterator<Item = Result<CrlDistributionPoint<'a>, Error>>>
pub(crate) fn crl_distribution_points( &self, ) -> Option<impl Iterator<Item = Result<CrlDistributionPoint<'a>, Error>>>
Returns an iterator over the certificate’s cRLDistributionPoints extension values, if any.
Sourcepub fn der(&self) -> CertificateDer<'a>
pub fn der(&self) -> CertificateDer<'a>
Raw DER encoded representation of the certificate.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Cert<'a>
impl<'a> RefUnwindSafe for Cert<'a>
impl<'a> Send for Cert<'a>
impl<'a> Sync for Cert<'a>
impl<'a> Unpin for Cert<'a>
impl<'a> UnwindSafe for Cert<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more