liveBook · Manning

Validity period

As explained in Software Security for Developers

A certificate validity period is the interval between the times an X.509 certificate becomes valid and ceases to be valid.

The validity field defines when an X.509 certificate may be trusted or used. Its two timestamps are Not Before (notBefore), when validity begins, and Not After (notAfter), when the certificate expires. A certificate is valid only when the current time falls within that interval. section 8.1.6 section 8.3

A certificate’s usable window

A GitHub certificate shows Not Before: February 14, 2023 at 00:00 GMT and Not After: March 14, 2024 at 23:59:59 GMT. Before the first timestamp it is not usable; after the second it is expired. section 8.1.6

openssl x509 -in github-cert.pem -noout -dates

Inspect a certificate’s validity dates directly with OpenSSL; the output reports its notBefore and notAfter values. section 8.1.6

Treat the validity period as both a trust boundary and an operational concern:

  • Avoid certificates that last longer than necessary: a longer lifetime gives a stolen, leaked, or lost private key more time to be abused. section 8.1.6
  • Match the lifetime to the use case: Sigstore code-signing certificates may last 10 minutes, while Let’s Encrypt certificates commonly last 90 days. section 8.1.6
  • Remember that validity is one part of certificate validation; verification also considers signatures and whether the issuing CA is trusted. section 8.4

How Software Security for Developers covers it

How deep it goes
Explains both timestamps, their boundary behavior, security tradeoffs, practical lifetimes, and OpenSSL inspection, but not implementation internals.
Examples
Uses a GitHub certificate, short-lived Sigstore certificates, Let’s Encrypt certificates, and OpenSSL date output.
What it assumes
Assumes only basic familiarity with X.509 certificates and emphasizes the three developer-facing fields, including Validity.
What you can do after
Operate/configure certificate checks by reading validity dates and choosing a reasonable certificate lifetime.
How it connects
Connects validity to X.509 certificates, certificate validation, private-key protection, and certificate authorities.

Also explained in

Compare how 2 books explain validity period →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.