Skip to content

Commit fc5c8f7

Browse files
Roland Bracewell Shoemakercpu
authored andcommitted
Remove unused features (letsencrypt#3393)
This removes a number of unused features (i.e. they are never checked anywhere).
1 parent 308a4f4 commit fc5c8f7

File tree

12 files changed

+14
-53
lines changed

12 files changed

+14
-53
lines changed

features/featureflag_string.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

features/features.go

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,14 @@ type FeatureFlag int
1111

1212
const (
1313
unused FeatureFlag = iota // unused is used for testing
14-
AllowAccountDeactivation
15-
AllowKeyRollover
16-
ResubmitMissingSCTsOnly
1714
UseAIAIssuerURL
1815
AllowTLS02Challenges
19-
GenerateOCSPEarly
2016
// For new-authz requests, if there is no valid authz, but there is a pending
2117
// authz, return that instead of creating a new one.
2218
ReusePendingAuthz
2319
CountCertificatesExact
24-
RandomDirectoryEntry
2520
IPv6First
26-
DirectoryMeta
2721
AllowRenewalFirstRL
28-
RecheckCAA
29-
UDPDNS
30-
ROCACheck
3122
// Allow issuance of wildcard domains for ACMEv2
3223
WildcardDomains
3324
// Enforce prevention of use of disabled challenge types
@@ -38,25 +29,16 @@ const (
3829

3930
// List of features and their default value, protected by fMu
4031
var features = map[FeatureFlag]bool{
41-
unused: false,
42-
AllowAccountDeactivation: false,
43-
AllowKeyRollover: false,
44-
ResubmitMissingSCTsOnly: false,
45-
UseAIAIssuerURL: false,
46-
AllowTLS02Challenges: false,
47-
GenerateOCSPEarly: false,
48-
ReusePendingAuthz: false,
49-
CountCertificatesExact: false,
50-
RandomDirectoryEntry: false,
51-
IPv6First: false,
52-
DirectoryMeta: false,
53-
AllowRenewalFirstRL: false,
54-
RecheckCAA: false,
55-
UDPDNS: false,
56-
ROCACheck: false,
57-
WildcardDomains: false,
58-
EnforceChallengeDisable: false,
59-
TLSSNIRevalidation: false,
32+
unused: false,
33+
UseAIAIssuerURL: false,
34+
AllowTLS02Challenges: false,
35+
ReusePendingAuthz: false,
36+
CountCertificatesExact: false,
37+
IPv6First: false,
38+
AllowRenewalFirstRL: false,
39+
WildcardDomains: false,
40+
EnforceChallengeDisable: false,
41+
TLSSNIRevalidation: false,
6042
}
6143

6244
var fMu = new(sync.RWMutex)

sa/sa_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"github.com/letsencrypt/boulder/core"
2727
corepb "github.com/letsencrypt/boulder/core/proto"
2828
berrors "github.com/letsencrypt/boulder/errors"
29-
"github.com/letsencrypt/boulder/features"
3029
blog "github.com/letsencrypt/boulder/log"
3130
"github.com/letsencrypt/boulder/metrics"
3231
"github.com/letsencrypt/boulder/revocation"
@@ -530,7 +529,6 @@ func TestAddCertificate(t *testing.T) {
530529
test.Assert(t, certificateStatus2.OCSPLastUpdated.IsZero(), "OCSPLastUpdated should be nil")
531530

532531
// Test adding OCSP response with cert
533-
_ = features.Set(map[string]bool{"GenerateOCSPEarly": true})
534532
certDER3, err := ioutil.ReadFile("test-cert2.der")
535533
test.AssertNotError(t, err, "Couldn't read example cert DER")
536534
serial = "ffa0160630d618b2eb5c0510824b14274856"

test/config-next/ca.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@
132132
"maxConcurrentRPCServerRequests": 100000,
133133
"features": {
134134
"WildcardDomains": true,
135-
"AllowTLS02Challenges": true,
136-
"GenerateOCSPEarly": true
135+
"AllowTLS02Challenges": true
137136
}
138137
},
139138

test/config-next/ra.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@
4444
"features": {
4545
"WildcardDomains": true,
4646
"TLSSNIRevalidation": true,
47-
"AllowKeyRollover": true,
4847
"AllowTLS02Challenges": true,
4948
"CountCertificatesExact": true,
50-
"RecheckCAA": true,
5149
"ReusePendingAuthz": true,
5250
"EnforceChallengeDisable": true
5351
}

test/config-next/sa.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
},
2828
"features": {
2929
"WildcardDomains": true,
30-
"AllowAccountDeactivation": true,
3130
"AllowRenewalFirstRL": true,
3231
"EnforceChallengeDisable": true
3332
}

test/config-next/wfe.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929
"timeout": "15s"
3030
},
3131
"features": {
32-
"AllowAccountDeactivation": true,
33-
"AllowKeyRollover": true,
34-
"UseAIAIssuerURL": true,
35-
"RandomDirectoryEntry": true,
36-
"DirectoryMeta": true
32+
"UseAIAIssuerURL": true
3733
}
3834
},
3935

test/config/ca.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@
130130
},
131131
"maxConcurrentRPCServerRequests": 100000,
132132
"features": {
133-
"GenerateOCSPEarly": true
134133
}
135134
},
136135

test/config/ra.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
]
4242
},
4343
"features": {
44-
"AllowKeyRollover": true,
4544
"CountCertificatesExact": true,
46-
"RecheckCAA": true,
4745
"ReusePendingAuthz": false,
4846
"EnforceChallengeDisable": true
4947
}

test/config/sa.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
]
2626
},
2727
"features": {
28-
"AllowAccountDeactivation": true,
2928
"EnforceChallengeDisable": true
3029
}
3130
},

0 commit comments

Comments
 (0)