Skip to content

Commit

Permalink
Merge pull request kubernetes#118631 from champtar/ca-not-before
Browse files Browse the repository at this point in the history
Make CA valid 1 hour in the past
  • Loading branch information
k8s-ci-robot committed Jun 15, 2023
2 parents 79ca192 + e1735b9 commit 604584d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion staging/src/k8s.io/client-go/util/cert/cert.go
Expand Up @@ -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,
Expand Down

0 comments on commit 604584d

Please sign in to comment.