X Tutup
Skip to content

Commit 35c19c2

Browse files
authored
Deprecate StoreKeyHashes flag (letsencrypt#4927)
The StoreKeyHashes feature flag controls whether rows are added to the keyHashToSerial table. This feature is now enabled everywhere, so the flag-protected code can be turned on unconditionally and the flag removed from configs. Related to letsencrypt#4895
1 parent 71df093 commit 35c19c2

File tree

6 files changed

+17
-27
lines changed

6 files changed

+17
-27
lines changed

features/featureflag_string.go

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

features/features.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const (
1919
ParallelCheckFailedValidation
2020
DeleteUnusedChallenges
2121
BlockedKeyTable
22+
StoreKeyHashes
2223

2324
// Currently in-use features
2425
// Check CAA and respect validationmethods parameter.
@@ -48,8 +49,6 @@ const (
4849
// StoreIssuerInfo enables storage of information identifying the issuer of
4950
// a certificate in the certificateStatus table.
5051
StoreIssuerInfo
51-
// StoreKeyHashes enables storage of SPKI hashes associated with certificates.
52-
StoreKeyHashes
5352
// StoreRevokerInfo enables storage of the revoker and a bool indicating if the row
5453
// was checked for extant unrevoked certificates in the blockedKeys table.
5554
StoreRevokerInfo

sa/precertificates.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
corepb "github.com/letsencrypt/boulder/core/proto"
1313
"github.com/letsencrypt/boulder/db"
1414
berrors "github.com/letsencrypt/boulder/errors"
15-
"github.com/letsencrypt/boulder/features"
1615
bgrpc "github.com/letsencrypt/boulder/grpc"
1716
sapb "github.com/letsencrypt/boulder/sa/proto"
1817
)
@@ -111,10 +110,8 @@ func (ssa *SQLStorageAuthority) AddPrecertificate(ctx context.Context, req *sapb
111110
if err := addIssuedNames(txWithCtx, parsed, isRenewal); err != nil {
112111
return nil, err
113112
}
114-
if features.Enabled(features.StoreKeyHashes) {
115-
if err := addKeyHash(txWithCtx, parsed); err != nil {
116-
return nil, err
117-
}
113+
if err := addKeyHash(txWithCtx, parsed); err != nil {
114+
return nil, err
118115
}
119116

120117
return nil, nil

sa/precertificates_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
"github.com/letsencrypt/boulder/db"
1111
berrors "github.com/letsencrypt/boulder/errors"
12-
"github.com/letsencrypt/boulder/features"
1312
sapb "github.com/letsencrypt/boulder/sa/proto"
1413
"github.com/letsencrypt/boulder/sa/satest"
1514
"github.com/letsencrypt/boulder/test"
@@ -108,13 +107,10 @@ func TestAddPrecertificateKeyHash(t *testing.T) {
108107
sa, _, cleanUp := initSA(t)
109108
defer cleanUp()
110109
reg := satest.CreateWorkingRegistration(t, sa)
111-
err := features.Set(map[string]bool{"StoreKeyHashes": true})
112-
test.AssertNotError(t, err, "failed to set features")
113-
defer features.Reset()
114110

115111
serial, testCert := test.ThrowAwayCert(t, 1)
116112
issued := testCert.NotBefore.UnixNano()
117-
_, err = sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{
113+
_, err := sa.AddPrecertificate(ctx, &sapb.AddCertificateRequest{
118114
Der: testCert.Raw,
119115
RegID: &reg.ID,
120116
Ocsp: []byte{1, 2, 3},

test/config-next/sa.json

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

test/config/sa.json

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

0 commit comments

Comments
 (0)
X Tutup