not_after_unix_secs

Function not_after_unix_secs 

Source
pub fn not_after_unix_secs(cert: &CertificateDer<'_>) -> Option<i64>
Expand description

Extract the notAfter timestamp of a leaf certificate (DW-035) as Unix epoch seconds. The validity SEQUENCE holds two time values: notBefore then notAfter, each a UTCTime (tag 0x17, YYMMDDHHMMSSZ) or GeneralizedTime (tag 0x18, YYYYMMDDHHMMSSZ). Returns None on any structural shortcoming or an unparseable time. THE CERTIFICATE IS ALREADY VERIFIED at the TLS layer when this runs; extraction only reads the value for the X-Client-Cert-Not-After forwarding header.