Skip to content

Commit

Permalink
Ensure safety_buffer in PKI is greater than zero
Browse files Browse the repository at this point in the history
Fixes #4641
  • Loading branch information
jefferai committed May 28, 2018
1 parent 95978c2 commit 7590a7b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/logical/pki/path_tidy.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func (b *backend) pathTidyWrite(ctx context.Context, req *logical.Request, d *fr
tidyCertStore := d.Get("tidy_cert_store").(bool)
tidyRevocationList := d.Get("tidy_revocation_list").(bool)

if safetyBuffer < 1 {
return logical.ErrorResponse("safety_buffer must be greater than zero"), nil
}

bufferDuration := time.Duration(safetyBuffer) * time.Second

var resp *logical.Response
Expand Down

0 comments on commit 7590a7b

Please sign in to comment.