pub struct Certificate { /* private fields */ }
Expand description
Encapsulated certificate and private key.
Implementations§
Source§impl Certificate
impl Certificate
Sourcepub fn private_key(&self) -> &str
pub fn private_key(&self) -> &str
The PEM encoded private key.
Sourcepub fn private_key_der(&self) -> Vec<u8> ⓘ
pub fn private_key_der(&self) -> Vec<u8> ⓘ
The private key as DER.
Sourcepub fn certificate(&self) -> &str
pub fn certificate(&self) -> &str
The PEM encoded issued certificate.
Sourcepub fn certificate_der(&self) -> Vec<u8> ⓘ
pub fn certificate_der(&self) -> Vec<u8> ⓘ
The issued certificate as DER.
Sourcepub fn valid_days_left(&self) -> i64
pub fn valid_days_left(&self) -> i64
Inspect the certificate to count the number of (whole) valid days left.
It’s up to the ACME API provider to decide how long an issued certificate is valid. Let’s Encrypt sets the validity to 90 days. This function reports 89 days for newly issued cert, since it counts whole days.
It is possible to get negative days for an expired certificate.
Trait Implementations§
Source§impl Clone for Certificate
impl Clone for Certificate
Source§fn clone(&self) -> Certificate
fn clone(&self) -> Certificate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Certificate
impl Debug for Certificate
Source§impl PartialEq for Certificate
impl PartialEq for Certificate
impl Eq for Certificate
impl StructuralPartialEq for Certificate
Auto Trait Implementations§
impl Freeze for Certificate
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
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