X509::not_valid_after

Description

Returns the not-valid-after date of the specified X509 certificate.

Syntax

X509::not_valid_after <X509 certificate>

X509::not_valid_after

  • Returns the not-valid-after date of the specified X509 certificate using the format {%b %d %H:%M:%S %Y %Z} e.g. Jan 4 08:52:43 2019 GMT

Examples

when SERVERSSL_HANDSHAKE {
  set server_cert [SSL::cert 0]
  log local0. "Server Certificate Valid Date -
   [X509::not_valid_before $server_cert] -
   [X509::not_valid_after $server_cert]"
}