Skip to content

Commit c2d9286

Browse files
Fix reference and description of OCSP lint (#937)
Co-authored-by: Christopher Henderson <chris@chenderson.org>
1 parent b60a4b1 commit c2d9286

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

v3/lint/source.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const (
3232
RFC5280 LintSource = "RFC5280"
3333
RFC5480 LintSource = "RFC5480"
3434
RFC5891 LintSource = "RFC5891"
35+
RFC6960 LintSource = "RFC6960"
3536
RFC6962 LintSource = "RFC6962"
3637
RFC8813 LintSource = "RFC8813"
3738
CABFBaselineRequirements LintSource = "CABF_BR"
@@ -57,6 +58,7 @@ func (s *LintSource) UnmarshalJSON(data []byte) error {
5758
RFC5280,
5859
RFC5480,
5960
RFC5891,
61+
RFC6960,
6062
RFC6962,
6163
RFC8813,
6264
CABFBaselineRequirements,

v3/lints/rfc/lint_ocsp_this_update_not_after_produced_at.go

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,22 @@ import (
2323
type OCSPThisUpdateNotAfterProducedAt struct{}
2424

2525
/*
26-
***********************************************
27-
RFC 5280: 5.3.1
28-
29-
CRL issuers are strongly
30-
encouraged to include meaningful reason codes in CRL entries;
31-
however, the reason code CRL entry extension SHOULD be absent instead
32-
of using the unspecified (0) reasonCode value.
33-
34-
***********************************************
26+
RFC 6960: 2.4
27+
thisUpdate The most recent time at which the status being
28+
indicated is known by the responder to have been
29+
correct.
30+
producedAt The time at which the OCSP responder signed this
31+
response.
3532
*/
33+
3634
func init() {
3735
lint.RegisterOcspResponseLint(&lint.OcspResponseLint{
3836
LintMetadata: lint.LintMetadata{
3937
Name: "e_this_update_not_after_produced_at",
40-
Description: "If a CRL entry has a reason code, it MUST be in RFC5280 section 5.3.1 and SHOULD be absent instead of using unspecified (0)",
41-
Citation: "RFC 5280: 5.3.1",
42-
Source: lint.RFC5280,
43-
EffectiveDate: util.RFC5280Date,
38+
Description: "The value of thisUpdate MUST be prior to the time at which the response is produced, i.e., the value of producedAt",
39+
Source: lint.RFC6960,
40+
Citation: "RFC 6960: 2.4",
41+
EffectiveDate: util.RFC6960Date,
4442
},
4543
Lint: NewOCSPThisUpdateNotAfterProducedAt,
4644
})

v3/util/time.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var (
3737
RFC4630Date = time.Date(2006, time.August, 1, 0, 0, 0, 0, time.UTC)
3838
RFC5280Date = time.Date(2008, time.May, 1, 0, 0, 0, 0, time.UTC)
3939
RFC6818Date = time.Date(2013, time.January, 1, 0, 0, 0, 0, time.UTC)
40+
RFC6960Date = time.Date(2013, time.June, 1, 0, 0, 0, 0, time.UTC)
4041
RFC6962Date = time.Date(2013, time.June, 1, 0, 0, 0, 0, time.UTC)
4142
RFC8813Date = time.Date(2020, time.August, 1, 0, 0, 0, 0, time.UTC)
4243
CABEffectiveDate = time.Date(2012, time.July, 1, 0, 0, 0, 0, time.UTC)

0 commit comments

Comments
 (0)