pub struct Certificate {
pub chain: Vec<CertificateDer<'static>>,
pub private_key: Option<Arc<PrivateKeyDer<'static>>>,
pub ocsp_staple: Option<Vec<u8>>,
pub names: Vec<String>,
pub tags: Vec<String>,
/* private fields */
}Expand description
A certificate with its chain, key, names, and maintenance metadata .
Fields§
§chain: Vec<CertificateDer<'static>>The full certificate chain (leaf first).
private_key: Option<Arc<PrivateKeyDer<'static>>>The encoded private key, when available. Challenge certificates may retain a provider signing key instead; external managers may omit it.
ocsp_staple: Option<Vec<u8>>The most recent OCSP staple served with the certificate.
names: Vec<String>All names the certificate covers, normalized (lowercased, trimmed).
User tags attached to this certificate.
Implementations§
Source§impl Certificate
impl Certificate
Sourcepub fn issuer_key(&self) -> &str
pub fn issuer_key(&self) -> &str
The issuer key (storage prefix) for this certificate.
Sourcepub fn expired_at(&self, now: OffsetDateTime) -> bool
pub fn expired_at(&self, now: OffsetDateTime) -> bool
Whether the leaf has expired. false when no parsed leaf is available
(e.g. synthesized TLS-ALPN challenge certificates).
Sourcepub fn lifetime_remaining(&self, now: OffsetDateTime) -> Option<Duration>
pub fn lifetime_remaining(&self, now: OffsetDateTime) -> Option<Duration>
Remaining lifetime of the leaf, if parsed.
Sourcepub fn lifetime(&self) -> Option<Duration>
pub fn lifetime(&self) -> Option<Duration>
Total lifetime of the leaf (NotAfter − NotBefore), if parsed.
Sourcepub fn pem_bundle(&self) -> Vec<u8> ⓘ
pub fn pem_bundle(&self) -> Vec<u8> ⓘ
The full PEM bundle of the chain (leaf first), used for OCSP staple keys.
Sourcepub fn ari_replaces_id(&self) -> Option<String>
pub fn ari_replaces_id(&self) -> Option<String>
The ARI replaces certID for this certificate
(draft-ietf-acme-ari-03 §4.1): base64url(AKI keyIdentifier) + "." + base64url(serial). None when the leaf has no AKI
extension or has not been parsed.
Trait Implementations§
Source§impl Clone for Certificate
impl Clone for Certificate
Auto Trait Implementations§
impl !RefUnwindSafe for Certificate
impl !UnwindSafe for Certificate
impl Freeze for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnsafeUnpin for Certificate
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request