Skip to content

Commit c1af7fc

Browse files
authored
Delete sa.GetMaxExpiration and sa.GetRevokedCerts (#8401)
These two SA methods were used only by the crl-updater's temporal (notAfter-based) sharding code. We now exclusively use explicit (CRLDP-based) sharding, and these methods have no callers. Fixes #8399 Part of #8322
1 parent 74c95b7 commit c1af7fc

8 files changed

Lines changed: 725 additions & 1242 deletions

File tree

crl/updater/updater_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@ func (f *fakeSAC) GetRevokedCertsByShard(ctx context.Context, req *sapb.GetRevok
6464
return &f.revokedCerts, nil
6565
}
6666

67-
func (f *fakeSAC) GetMaxExpiration(_ context.Context, req *emptypb.Empty, _ ...grpc.CallOption) (*timestamppb.Timestamp, error) {
68-
return timestamppb.New(f.maxNotAfter), nil
69-
}
70-
7167
func (f *fakeSAC) LeaseCRLShard(_ context.Context, req *sapb.LeaseCRLShardRequest, _ ...grpc.CallOption) (*sapb.LeaseCRLShardResponse, error) {
7268
if f.leaseError != nil {
7369
return nil, f.leaseError

docs/CRLS.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ contains an entry for every certificate, explicitly recording that newly-issued
3939
certificates are not revoked. The latter is less explicit but more scalable,
4040
containing rows only for certificates which have been revoked.
4141

42-
The SA exposes the two different types of recordkeeping in two different ways:
43-
`GetRevokedCerts` returns revoked certificates whose NotAfter dates fall within
44-
a requested range. `GetRevokedCertsByShard` returns revoked certificates whose
45-
`shardIdx` matches the requested shard. The crl-updater uses only the latter
46-
method, and the former will be removed in the future.
42+
The SA only exposes the latter of these two mechanisms via the
43+
`GetRevokedCertsByShard` method, which returns revoked certificates whose
44+
`shardIdx` matches the requested shard. The `certificateStatus` table will be
45+
removed in the near future.

mocks/sa.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -246,26 +246,11 @@ func (sa *StorageAuthority) GetPausedIdentifiers(_ context.Context, _ *sapb.Regi
246246
return nil, nil
247247
}
248248

249-
// GetRevokedCerts is a mock
250-
func (sa *StorageAuthorityReadOnly) GetRevokedCerts(ctx context.Context, _ *sapb.GetRevokedCertsRequest, _ ...grpc.CallOption) (sapb.StorageAuthorityReadOnly_GetRevokedCertsClient, error) {
251-
return &ServerStreamClient[corepb.CRLEntry]{}, nil
252-
}
253-
254-
// GetRevokedCerts is a mock
255-
func (sa *StorageAuthority) GetRevokedCerts(ctx context.Context, _ *sapb.GetRevokedCertsRequest, _ ...grpc.CallOption) (sapb.StorageAuthority_GetRevokedCertsClient, error) {
256-
return &ServerStreamClient[corepb.CRLEntry]{}, nil
257-
}
258-
259249
// GetRevokedCertsByShard is a mock
260250
func (sa *StorageAuthorityReadOnly) GetRevokedCertsByShard(ctx context.Context, _ *sapb.GetRevokedCertsByShardRequest, _ ...grpc.CallOption) (grpc.ServerStreamingClient[corepb.CRLEntry], error) {
261251
return &ServerStreamClient[corepb.CRLEntry]{}, nil
262252
}
263253

264-
// GetMaxExpiration is a mock
265-
func (sa *StorageAuthorityReadOnly) GetMaxExpiration(_ context.Context, req *emptypb.Empty, _ ...grpc.CallOption) (*timestamppb.Timestamp, error) {
266-
return nil, nil
267-
}
268-
269254
// AddRateLimitOverride is a mock
270255
func (sa *StorageAuthority) AddRateLimitOverride(_ context.Context, req *sapb.AddRateLimitOverrideRequest, _ ...grpc.CallOption) (*sapb.AddRateLimitOverrideResponse, error) {
271256
return nil, nil

0 commit comments

Comments
 (0)