Skip to content

Commit

Permalink
Update vault_pki.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinschoonover authored Apr 25, 2024
1 parent 610511f commit e5ff6ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dependency/vault_pki.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func goodFor(cert *x509.Certificate) (time.Duration, bool) {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
lifespanMilliseconds := lifespanDur.Milliseconds()
// calculate the 'time the certificate should be rotated' by figuring out -3%
// - 3% + VaultLeaseRenewalThreshold of the lifespan and adding it to the
// - 2% + VaultLeaseRenewalThreshold of the lifespan and adding it to the
// start
rotationTime := start.Add(time.Millisecond * time.Duration(
float64(lifespanMilliseconds)*VaultLeaseRenewalThreshold+float64(lifespanMilliseconds*(int64(r.Intn(6)-3)/100.0)),
Expand Down

0 comments on commit e5ff6ee

Please sign in to comment.