Skip to content

Commit

Permalink
Merge pull request cloudflare#312 from jsha/ocsp-round-down
Browse files Browse the repository at this point in the history
Truncate rather than round OCSP time.
  • Loading branch information
kisom committed Aug 20, 2015
2 parents f19974e + dd172b5 commit 190c5f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ocsp/ocsp.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ func (s StandardSigner) Sign(req SignRequest) ([]byte, error) {
return nil, cferr.New(cferr.OCSPError, cferr.IssuerMismatch)
}

// Round thisUpdate times to the nearest hour
thisUpdate := time.Now().Round(time.Hour)
// Round thisUpdate times down to the nearest hour
thisUpdate := time.Now().Truncate(time.Hour)
nextUpdate := thisUpdate.Add(s.interval)

status, ok := statusCode[req.Status]
Expand Down

0 comments on commit 190c5f9

Please sign in to comment.