Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit revocation information for short-lived certificates #7679

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ type Config struct {
// to be the authoritative source of rate limiting information for
// new-account callers and disables the legacy rate limiting checks.
UseKvLimitsForNewAccount bool

// OmitShortLivedRevocation causes the AIA OCSP URL and/or the CRLDP URL to be
// omitted from certificates whose validity period is less than or equal to 7
// days. This validity period is the threshold to qualify as a "Short-Lived
// Certificate" per the BRs Section 1.6.1, and therefore to not require
// revocation information per the BRs Sections 4.9.1.1 and 7.1.2.11.2.
OmitShortLivedRevocation bool
}

var fMu = new(sync.RWMutex)
Expand Down
7 changes: 7 additions & 0 deletions issuance/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"github.com/letsencrypt/boulder/cmd"
"github.com/letsencrypt/boulder/config"
"github.com/letsencrypt/boulder/features"
"github.com/letsencrypt/boulder/linter"
"github.com/letsencrypt/boulder/precert"
)
Expand Down Expand Up @@ -324,6 +325,12 @@ func (i *Issuer) Prepare(prof *Profile, req *IssuanceRequest) ([]byte, *issuance
}
template.DNSNames = req.DNSNames

// Remove revocation information if the certificate is short-lived and the
// feature flag to do so is enabled.
if features.Get().OmitShortLivedRevocation && template.NotAfter.Before(template.NotBefore.Add(24*7*time.Hour)) {
template.OCSPServer = nil
}

switch req.PublicKey.(type) {
case *rsa.PublicKey:
if prof.omitKeyEncipherment {
Expand Down
4 changes: 3 additions & 1 deletion test/config-next/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@
"ocspLogMaxLength": 4000,
"ocspLogPeriod": "500ms",
"ctLogListFile": "test/ct-test-srv/log_list.json",
"features": {}
"features": {
"OmitShortLivedRevocation": true
}
},
"pa": {
"challenges": {
Expand Down
Loading