cloudflare / cloudflare/cfssl

Use jmhodges/clock for OCSP signer

Open
#558 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.