Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ func (m *mkcert) makeCert(hosts []string) {
fatalIfErr(err, "failed to generate certificate key")
pub := priv.(crypto.Signer).Public()

// Certificates last for 2 years and 3 months, which is always less than
// 825 days, the limit that macOS/iOS apply to all certificates,
// including custom roots. See https://support.apple.com/en-us/HT210176.
expiration := time.Now().AddDate(2, 3, 0)
// Certificates last for 1 year and 1 month, which is always less than
// 398 days, the limit will be effective after March 15 2026.
// See https://github.com/cabforum/servercert/blob/main/docs/BR.md#421-performing-identification-and-authentication-functions.
expiration := time.Now().AddDate(1, 1, 0)

tpl := &x509.Certificate{
SerialNumber: randomSerialNumber(),
Expand Down Expand Up @@ -225,7 +225,7 @@ func (m *mkcert) makeCertFromCSR() {
fatalIfErr(err, "failed to parse the CSR")
fatalIfErr(csr.CheckSignature(), "invalid CSR signature")

expiration := time.Now().AddDate(2, 3, 0)
expiration := time.Now().AddDate(1, 1, 0)
tpl := &x509.Certificate{
SerialNumber: randomSerialNumber(),
Subject: csr.Subject,
Expand Down