github / smimesign

An S/MIME signing utility for use with Git
MIT License
587 stars 135 forks source link

Make TSA timestamp checks inclusive. #121

Closed wlynch closed 2 weeks ago

wlynch commented 1 year ago

time.Before/After checks are exclusive, but these checks should be inclusive.

From https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.5:

The validity period for a certificate is the period of time from notBefore through notAfter, inclusive.

(doc whitespace changes are coming from Go 1.19 gofmt)

Signed-off-by: Billy Lynch billy@chainguard.dev