Struct x509_parser::certificate::Validity
source · [−]Fields
not_before: ASN1Time
not_after: ASN1Time
Implementations
sourceimpl Validity
impl Validity
sourcepub fn time_to_expiration(&self) -> Option<Duration>
pub fn time_to_expiration(&self) -> Option<Duration>
The time left before the certificate expires.
If the certificate is not currently valid, then None
is
returned. Otherwise, the Duration
until the certificate
expires is returned.
sourcepub fn is_valid_at(&self, time: ASN1Time) -> bool
pub fn is_valid_at(&self, time: ASN1Time) -> bool
Check the certificate time validity for the provided date/time
Trait Implementations
sourceimpl<'a> FromDer<'a, X509Error> for Validity
impl<'a> FromDer<'a, X509Error> for Validity
sourcefn from_der(i: &[u8]) -> X509Result<'_, Self>
fn from_der(i: &[u8]) -> X509Result<'_, Self>
Attempt to parse input bytes into a DER object (enforcing constraints)
impl StructuralPartialEq for Validity
Auto Trait Implementations
impl RefUnwindSafe for Validity
impl Send for Validity
impl Sync for Validity
impl Unpin for Validity
impl UnwindSafe for Validity
Blanket Implementations
sourceimpl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for T where
T: 'a,
sourceimpl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for T where
T: 'a,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more