Merge pull request #118631 from champtar/ca-not-before

Make CA valid 1 hour in the past
This commit is contained in:
Kubernetes Prow Robot 2023-06-15 11:22:30 -07:00 committed by GitHub
commit 604584d1d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ func NewSelfSignedCACert(cfg Config, key crypto.Signer) (*x509.Certificate, erro
Organization: cfg.Organization,
},
DNSNames: []string{cfg.CommonName},
NotBefore: now.UTC(),
NotBefore: now.Add(-time.Hour).UTC(), // valid an hour earlier to avoid flakes
NotAfter: now.Add(duration365d * 10).UTC(),
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
BasicConstraintsValid: true,