Use jmhodges/clock for OCSP signer
Open
- Dominant language
- Go
- Stars
- 9.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/jmhodges/clock/ provides a `Clock` interface, which can be satisfied either by the system clock or a `FakeClock`. This is really useful for testing any code that uses `time.Now()`.
In the OCSP signer in particular, it would be nice to take a `Clock` variable as part of the constructor, and use that when signing. That way code that depends on the OCSP signer (e.g. in Boulder) could pass in a `FakeClock` when testing.
Contributor guide
Assessment
This issue has not been assessed yet.