Skip to content

Commit 6feaeda

Browse files
committed
Refactoring PKI unit tests
1 parent 7d6ceaf commit 6feaeda

24 files changed

+1745
-1360
lines changed

x/pki/keeper/all_certificates_by_subject_key_id.go

+4-16
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
99
)
1010

11-
// SetAllCertificatesBySubjectKeyID set a specific AllCertificatesBySubjectKeyId in the store from its index.
11+
// SetAllCertificatesBySubjectKeyID set a specific AllCertificatesBySubjectKeyID in the store from its index.
1212
func (k Keeper) SetAllCertificatesBySubjectKeyID(ctx sdk.Context, allCertificatesBySubjectKeyID types.AllCertificatesBySubjectKeyId) {
1313
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
1414
b := k.cdc.MustMarshal(&allCertificatesBySubjectKeyID)
@@ -49,7 +49,7 @@ func (k Keeper) addAllCertificatesBySubjectKeyID(ctx sdk.Context, subjectKeyID s
4949
k.SetAllCertificatesBySubjectKeyID(ctx, AllCertificates)
5050
}
5151

52-
// GetAllCertificatesBySubjectKeyID returns a AllCertificatesBySubjectKeyId from its index.
52+
// GetAllCertificatesBySubjectKeyID returns a AllCertificatesBySubjectKeyID from its index.
5353
func (k Keeper) GetAllCertificatesBySubjectKeyID(
5454
ctx sdk.Context,
5555
subjectKeyID string,
@@ -69,7 +69,7 @@ func (k Keeper) GetAllCertificatesBySubjectKeyID(
6969
return val, true
7070
}
7171

72-
// RemoveAllCertificatesBySubjectKeyID removes a AllCertificatesBySubjectKeyId from the store.
72+
// RemoveAllCertificatesBySubjectKeyID removes a AllCertificatesBySubjectKeyID from the store.
7373
func (k Keeper) RemoveAllCertificatesBySubjectKeyID(
7474
ctx sdk.Context,
7575
subject string,
@@ -104,7 +104,7 @@ func (k Keeper) RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx sdk.Contex
104104
})
105105
}
106106

107-
// GetAllAllCertificatesBySubjectKeyID returns all AllCertificatesBySubjectKeyId.
107+
// GetAllAllCertificatesBySubjectKeyID returns all AllCertificatesBySubjectKeyID.
108108
func (k Keeper) GetAllAllCertificatesBySubjectKeyID(ctx sdk.Context) (list []types.AllCertificatesBySubjectKeyId) {
109109
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
110110
iterator := sdk.KVStorePrefixIterator(store, []byte{})
@@ -145,15 +145,3 @@ func (k Keeper) _removeAllCertificatesFromSubjectKeyIDState(ctx sdk.Context, sub
145145
k.SetAllCertificatesBySubjectKeyID(ctx, certs)
146146
}
147147
}
148-
149-
// IsCertificatesBySubjectKeyIdPresent Check if the Certificate By Subject Key ID is present in the store.
150-
func (k Keeper) IsCertificatesBySubjectKeyIdPresent(
151-
ctx sdk.Context,
152-
subjectKeyID string,
153-
) bool {
154-
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
155-
156-
return store.Has(types.AllCertificatesBySubjectKeyIDKey(
157-
subjectKeyID,
158-
))
159-
}

x/pki/keeper/approved_certificates_by_subject_key_id.go

-12
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,3 @@ func (k Keeper) _removeApprovedCertificatesFromSubjectKeyIDState(ctx sdk.Context
145145
k.SetApprovedCertificatesBySubjectKeyID(ctx, certs)
146146
}
147147
}
148-
149-
// IsApprovedCertificatesBySubjectKeyIdPresent Check if the Approved Certificate By Subject Key ID is present in the store.
150-
func (k Keeper) IsApprovedCertificatesBySubjectKeyIdPresent(
151-
ctx sdk.Context,
152-
subjectKeyID string,
153-
) bool {
154-
store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.ApprovedCertificatesBySubjectKeyIDKeyPrefix))
155-
156-
return store.Has(types.ApprovedCertificatesBySubjectKeyIDKey(
157-
subjectKeyID,
158-
))
159-
}

x/pki/tests/handler_add_noc_ica_cert_test.go

+59-78
Original file line numberDiff line numberDiff line change
@@ -21,107 +21,88 @@ func TestHandler_AddNocIntermediateCert(t *testing.T) {
2121
accAddress := setup.CreateVendorAccount(testconstants.Vid)
2222

2323
// add NOC root certificate
24-
utils.AddNocRootCertificate(setup, accAddress, testconstants.NocRootCert1)
24+
rootCertificate := utils.CreateTestNocRoot1Cert()
25+
utils.AddNocRootCertificate(setup, accAddress, rootCertificate.PEM)
2526

2627
// add NOC ICA certificate
2728
icaCertificate := utils.CreateTestNocIca1Cert()
28-
utils.AddNocIntermediateCertificate(setup, accAddress, testconstants.NocCert1)
29+
utils.AddNocIntermediateCertificate(setup, accAddress, icaCertificate.PEM)
2930

3031
// Check indexes
31-
indexes := []utils.TestIndex{
32-
{Key: types.AllCertificatesKeyPrefix, Exist: true},
33-
{Key: types.AllCertificatesBySubjectKeyPrefix, Exist: true},
34-
{Key: types.AllCertificatesBySubjectKeyIDKeyPrefix, Exist: true},
35-
{Key: types.NocCertificatesKeyPrefix, Exist: true},
36-
{Key: types.NocCertificatesBySubjectKeyPrefix, Exist: true},
37-
{Key: types.NocCertificatesBySubjectKeyIDKeyPrefix, Exist: true},
38-
{Key: types.NocCertificatesByVidAndSkidKeyPrefix, Exist: true},
39-
{Key: types.NocRootCertificatesKeyPrefix, Exist: true, Count: 1}, // we create root certificate as well but ica should not get there
40-
{Key: types.NocIcaCertificatesKeyPrefix, Exist: true},
41-
{Key: types.UniqueCertificateKeyPrefix, Exist: true},
42-
{Key: types.ChildCertificatesKeyPrefix, Exist: true},
43-
{Key: types.ProposedCertificateKeyPrefix, Exist: false},
44-
{Key: types.ApprovedCertificatesKeyPrefix, Exist: false},
45-
{Key: types.ApprovedCertificatesBySubjectKeyPrefix, Exist: false},
46-
{Key: types.ApprovedCertificatesBySubjectKeyIDKeyPrefix, Exist: false},
47-
{Key: types.ApprovedRootCertificatesKeyPrefix, Exist: false},
32+
indexes := utils.TestIndexes{
33+
Present: []utils.TestIndex{
34+
{Key: types.AllCertificatesKeyPrefix},
35+
{Key: types.AllCertificatesBySubjectKeyPrefix},
36+
{Key: types.AllCertificatesBySubjectKeyIDKeyPrefix},
37+
{Key: types.NocCertificatesKeyPrefix},
38+
{Key: types.NocCertificatesBySubjectKeyPrefix},
39+
{Key: types.NocCertificatesBySubjectKeyIDKeyPrefix},
40+
{Key: types.NocCertificatesByVidAndSkidKeyPrefix},
41+
{Key: types.NocRootCertificatesKeyPrefix, Count: 1}, // we create root certificate as well but ica should not be there
42+
{Key: types.NocIcaCertificatesKeyPrefix},
43+
{Key: types.UniqueCertificateKeyPrefix},
44+
{Key: types.ChildCertificatesKeyPrefix},
45+
},
46+
Missing: []utils.TestIndex{
47+
{Key: types.ProposedCertificateKeyPrefix},
48+
{Key: types.ApprovedCertificatesKeyPrefix},
49+
{Key: types.ApprovedCertificatesBySubjectKeyPrefix},
50+
{Key: types.ApprovedCertificatesBySubjectKeyIDKeyPrefix},
51+
{Key: types.ApprovedRootCertificatesKeyPrefix},
52+
},
4853
}
4954
utils.CheckCertificateStateIndexes(t, setup, icaCertificate, indexes)
5055
}
5156

5257
// Extra cases
5358

54-
func TestHandler_AddNocX509Cert_Renew(t *testing.T) {
59+
func TestHandler_AddNocIntermediateCert_SameSubjectAndSkid_DifferentSerialNumber(t *testing.T) {
5560
setup := utils.Setup(t)
5661

57-
accAddress := utils.GenerateAccAddress()
58-
vid := testconstants.Vid
59-
setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid)
62+
accAddress := setup.CreateVendorAccount(testconstants.Vid)
6063

6164
// add NOC root certificate
62-
utils.AddNocRootCertificate(setup, accAddress, testconstants.NocRootCert1)
65+
rootCertificate := utils.CreateTestNocRoot1Cert()
66+
utils.AddNocRootCertificate(setup, accAddress, rootCertificate.PEM)
6367

6468
// Store the NOC certificate
65-
newNocCertificate := types.NewNocCertificate(
66-
testconstants.NocCert1,
67-
testconstants.NocCert1Subject,
68-
testconstants.NocCert1SubjectAsText,
69-
testconstants.NocCert1SubjectKeyID,
70-
testconstants.NocCert1SerialNumber,
71-
testconstants.NocRootCert1Subject,
72-
testconstants.NocRootCert1SubjectKeyID,
73-
testconstants.NocRootCert1Subject,
74-
testconstants.NocRootCert1SubjectKeyID,
75-
accAddress.String(),
76-
vid,
77-
testconstants.SchemaVersion,
78-
)
79-
newNocCertificate.SerialNumber = testconstants.TestSerialNumber
80-
81-
setup.Keeper.AddAllCertificate(setup.Ctx, newNocCertificate)
82-
setup.Keeper.AddNocCertificate(setup.Ctx, newNocCertificate)
83-
setup.Keeper.AddNocCertificateBySubjectKeyID(setup.Ctx, newNocCertificate)
84-
setup.Keeper.AddNocCertificateBySubject(setup.Ctx, newNocCertificate)
85-
setup.Keeper.AddNocIcaCertificate(setup.Ctx, newNocCertificate)
86-
uniqueCertificate := types.UniqueCertificate{
87-
Issuer: newNocCertificate.Issuer,
88-
SerialNumber: newNocCertificate.SerialNumber,
89-
Present: true,
90-
}
91-
setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate)
69+
icaCertificate := utils.CreateTestNocIca1Cert()
70+
intermediateCertificate := utils.NocIntermediateCertificate(accAddress)
71+
intermediateCertificate.SerialNumber = testconstants.TestSerialNumber
72+
utils.AddMokedNocCertificate(setup, intermediateCertificate, false)
9273

9374
// add the new NOC certificate
94-
addNocX509Cert := types.NewMsgAddNocX509IcaCert(accAddress.String(), testconstants.NocCert1, testconstants.CertSchemaVersion)
75+
addNocX509Cert := types.NewMsgAddNocX509IcaCert(
76+
accAddress.String(),
77+
icaCertificate.PEM,
78+
testconstants.CertSchemaVersion)
9579
_, err := setup.Handler(setup.Ctx, addNocX509Cert)
9680
require.NoError(t, err)
9781

9882
// query noc certificate by Subject and SKID
99-
nocCertificates, err := utils.QueryNocCertificates(setup, newNocCertificate.Subject, newNocCertificate.SubjectKeyId)
100-
require.NoError(t, err)
101-
require.Equal(t, len(nocCertificates.Certs), 2)
102-
require.Equal(t, &newNocCertificate, nocCertificates.Certs[0])
103-
104-
// query noc certificate by Subject
105-
nocCertificatesBySubject, err := utils.QueryNocCertificatesBySubject(setup, newNocCertificate.Subject)
106-
require.NoError(t, err)
107-
require.Equal(t, 1, len(nocCertificatesBySubject.SubjectKeyIds))
108-
109-
// query noc certificate by SKID
110-
nocCertificatesBySubjectKeyID, err := utils.QueryNocCertificatesBySubjectKeyID(setup, newNocCertificate.SubjectKeyId)
111-
require.NoError(t, err)
112-
require.Equal(t, 1, len(nocCertificatesBySubjectKeyID))
113-
require.Equal(t, 2, len(nocCertificatesBySubjectKeyID[0].Certs))
114-
require.Equal(t, testconstants.NocCert1Subject, nocCertificatesBySubjectKeyID[0].Certs[0].Subject)
115-
require.Equal(t, testconstants.NocCert1SubjectKeyID, nocCertificatesBySubjectKeyID[0].Certs[0].SubjectKeyId)
116-
require.Equal(t, vid, nocCertificatesBySubjectKeyID[0].Certs[0].Vid)
117-
118-
// query noc certificate by VID
119-
nocCertificatesByVid, err := utils.QueryNocIcaCertificatesByVid(setup, testconstants.Vid)
120-
require.NoError(t, err)
121-
require.Equal(t, len(nocCertificatesByVid.Certs), 2)
122-
require.Equal(t, testconstants.NocCert1Subject, nocCertificatesByVid.Certs[0].Subject)
123-
require.Equal(t, testconstants.NocCert1SubjectKeyID, nocCertificatesByVid.Certs[0].SubjectKeyId)
124-
require.Equal(t, vid, nocCertificatesByVid.Certs[0].Vid)
83+
indexes := utils.TestIndexes{
84+
Present: []utils.TestIndex{
85+
{Key: types.AllCertificatesKeyPrefix, Count: 2},
86+
{Key: types.AllCertificatesBySubjectKeyPrefix},
87+
{Key: types.AllCertificatesBySubjectKeyIDKeyPrefix, Count: 2},
88+
{Key: types.NocCertificatesKeyPrefix, Count: 2},
89+
{Key: types.NocCertificatesBySubjectKeyPrefix},
90+
{Key: types.NocCertificatesBySubjectKeyIDKeyPrefix, Count: 2},
91+
{Key: types.NocCertificatesByVidAndSkidKeyPrefix, Count: 2},
92+
{Key: types.NocRootCertificatesKeyPrefix, Count: 1}, // we create root certificate as well but ica should not be there
93+
{Key: types.NocIcaCertificatesKeyPrefix, Count: 2},
94+
{Key: types.UniqueCertificateKeyPrefix},
95+
{Key: types.ChildCertificatesKeyPrefix},
96+
},
97+
Missing: []utils.TestIndex{
98+
{Key: types.ProposedCertificateKeyPrefix},
99+
{Key: types.ApprovedCertificatesKeyPrefix},
100+
{Key: types.ApprovedCertificatesBySubjectKeyPrefix},
101+
{Key: types.ApprovedCertificatesBySubjectKeyIDKeyPrefix},
102+
{Key: types.ApprovedRootCertificatesKeyPrefix},
103+
},
104+
}
105+
utils.CheckCertificateStateIndexes(t, setup, icaCertificate, indexes)
125106
}
126107

127108
// Error cases

x/pki/tests/handler_add_noc_root_cert_test.go

+53-73
Original file line numberDiff line numberDiff line change
@@ -21,96 +21,76 @@ func TestHandler_AddNocRootCert(t *testing.T) {
2121

2222
// add NOC root certificate
2323
rootCertificate := utils.CreateTestNocRoot1Cert()
24-
utils.AddNocRootCertificate(setup, accAddress, testconstants.NocRootCert1)
24+
utils.AddNocRootCertificate(setup, accAddress, rootCertificate.PEM)
2525

2626
// Check indexes
27-
indexes := []utils.TestIndex{
28-
{Key: types.AllCertificatesKeyPrefix, Exist: true},
29-
{Key: types.AllCertificatesBySubjectKeyPrefix, Exist: true},
30-
{Key: types.AllCertificatesBySubjectKeyIDKeyPrefix, Exist: true},
31-
{Key: types.NocCertificatesKeyPrefix, Exist: true},
32-
{Key: types.NocCertificatesBySubjectKeyPrefix, Exist: true},
33-
{Key: types.NocCertificatesBySubjectKeyIDKeyPrefix, Exist: true},
34-
{Key: types.NocCertificatesByVidAndSkidKeyPrefix, Exist: true},
35-
{Key: types.NocRootCertificatesKeyPrefix, Exist: true},
36-
{Key: types.NocIcaCertificatesKeyPrefix, Exist: false},
37-
{Key: types.UniqueCertificateKeyPrefix, Exist: true},
38-
{Key: types.ProposedCertificateKeyPrefix, Exist: false},
39-
{Key: types.ApprovedCertificatesKeyPrefix, Exist: false},
40-
{Key: types.ApprovedCertificatesBySubjectKeyPrefix, Exist: false},
41-
{Key: types.ApprovedCertificatesBySubjectKeyIDKeyPrefix, Exist: false},
42-
{Key: types.ApprovedRootCertificatesKeyPrefix, Exist: false},
27+
indexes := utils.TestIndexes{
28+
Present: []utils.TestIndex{
29+
{Key: types.AllCertificatesKeyPrefix},
30+
{Key: types.AllCertificatesBySubjectKeyPrefix},
31+
{Key: types.AllCertificatesBySubjectKeyIDKeyPrefix},
32+
{Key: types.NocCertificatesKeyPrefix},
33+
{Key: types.NocCertificatesBySubjectKeyPrefix},
34+
{Key: types.NocCertificatesBySubjectKeyIDKeyPrefix},
35+
{Key: types.NocCertificatesByVidAndSkidKeyPrefix},
36+
{Key: types.NocRootCertificatesKeyPrefix},
37+
{Key: types.UniqueCertificateKeyPrefix},
38+
},
39+
Missing: []utils.TestIndex{
40+
{Key: types.NocIcaCertificatesKeyPrefix},
41+
{Key: types.ProposedCertificateKeyPrefix},
42+
{Key: types.ApprovedCertificatesKeyPrefix},
43+
{Key: types.ApprovedCertificatesBySubjectKeyPrefix},
44+
{Key: types.ApprovedCertificatesBySubjectKeyIDKeyPrefix},
45+
{Key: types.ApprovedRootCertificatesKeyPrefix},
46+
},
4347
}
4448
utils.CheckCertificateStateIndexes(t, setup, rootCertificate, indexes)
4549
}
4650

4751
// Extra cases
4852

49-
func TestHandler_AddNocX509RootCert_Renew(t *testing.T) {
53+
func TestHandler_AddNocRootCert_SameSubjectAndSkid_DifferentSerialNumber(t *testing.T) {
5054
setup := utils.Setup(t)
5155

52-
accAddress := utils.GenerateAccAddress()
53-
setup.AddAccount(accAddress, []dclauthtypes.AccountRole{dclauthtypes.Vendor}, testconstants.Vid)
56+
accAddress := setup.CreateVendorAccount(testconstants.Vid)
5457

5558
// Store the NOC root certificate
56-
nocRootCertificate := utils.RootCertificate(accAddress)
57-
nocRootCertificate.SerialNumber = testconstants.TestSerialNumber
58-
nocRootCertificate.CertificateType = types.CertificateType_OperationalPKI
59-
nocRootCertificate.Approvals = nil
60-
nocRootCertificate.Rejects = nil
61-
62-
setup.Keeper.AddAllCertificate(setup.Ctx, nocRootCertificate)
63-
setup.Keeper.AddNocCertificate(setup.Ctx, nocRootCertificate)
64-
setup.Keeper.AddNocRootCertificate(setup.Ctx, nocRootCertificate)
65-
setup.Keeper.AddNocCertificateBySubject(setup.Ctx, nocRootCertificate)
66-
67-
uniqueCertificate := types.UniqueCertificate{
68-
Issuer: nocRootCertificate.Issuer,
69-
SerialNumber: nocRootCertificate.SerialNumber,
70-
Present: true,
71-
}
72-
setup.Keeper.SetUniqueCertificate(setup.Ctx, uniqueCertificate)
73-
74-
// new NOC root certificate
75-
newNocCertificate := utils.RootCertificate(accAddress)
76-
newNocCertificate.CertificateType = types.CertificateType_OperationalPKI
77-
newNocCertificate.Approvals = nil
78-
newNocCertificate.Rejects = nil
59+
rootCertificate1 := utils.CreateTestNocRoot1Cert()
60+
utils.AddNocRootCertificate(setup, accAddress, rootCertificate1.PEM)
7961

8062
// add the new NOC root certificate
81-
addNocX509RootCert := types.NewMsgAddNocX509RootCert(accAddress.String(), newNocCertificate.PemCert, testconstants.CertSchemaVersion)
63+
rootCertificate2 := utils.CreateTestNocRoot2Cert()
64+
addNocX509RootCert := types.NewMsgAddNocX509RootCert(
65+
accAddress.String(),
66+
rootCertificate2.PEM,
67+
testconstants.CertSchemaVersion)
8268
_, err := setup.Handler(setup.Ctx, addNocX509RootCert)
8369
require.NoError(t, err)
8470

85-
// query noc root certificate by Subject and SKID
86-
nocCertificates, err := utils.QueryNocCertificates(setup, newNocCertificate.Subject, newNocCertificate.SubjectKeyId)
87-
require.NoError(t, err)
88-
require.Equal(t, len(nocCertificates.Certs), 2)
89-
require.Equal(t, &newNocCertificate, nocCertificates.Certs[1])
90-
91-
// query noc root certificate by Subject
92-
nocCertificatesBySubject, err := utils.QueryNocCertificatesBySubject(setup, newNocCertificate.Subject)
93-
require.NoError(t, err)
94-
require.Equal(t, 1, len(nocCertificatesBySubject.SubjectKeyIds))
95-
require.Equal(t, newNocCertificate.SubjectKeyId, nocCertificatesBySubject.SubjectKeyIds[0])
96-
97-
// query noc root certificate by SKID
98-
nocCertificatesBySubjectKeyID, err := utils.QueryNocCertificatesBySubjectKeyID(setup, newNocCertificate.SubjectKeyId)
99-
require.NoError(t, err)
100-
require.Equal(t, 1, len(nocCertificatesBySubjectKeyID))
101-
require.Equal(t, 1, len(nocCertificatesBySubjectKeyID[0].Certs))
102-
require.Equal(t, &newNocCertificate, nocCertificatesBySubjectKeyID[0].Certs[0])
103-
104-
// query noc root certificate by VID
105-
nocRootCertificates, err := utils.QueryNocRootCertificatesByVid(setup, testconstants.Vid)
106-
require.NoError(t, err)
107-
require.Equal(t, len(nocRootCertificates.Certs), 2)
108-
require.Equal(t, &newNocCertificate, nocRootCertificates.Certs[1])
109-
110-
// query noc root certificate by VID and SKID
111-
renewedNocRootCertificate, err := utils.QueryNocCertificatesByVidAndSkid(setup, testconstants.Vid, newNocCertificate.SubjectKeyId)
112-
require.NoError(t, err)
113-
require.Equal(t, &newNocCertificate, renewedNocRootCertificate.Certs[0])
71+
// check indexes
72+
indexes := utils.TestIndexes{
73+
Present: []utils.TestIndex{
74+
{Key: types.AllCertificatesKeyPrefix, Count: 2},
75+
{Key: types.AllCertificatesBySubjectKeyPrefix},
76+
{Key: types.AllCertificatesBySubjectKeyIDKeyPrefix, Count: 2},
77+
{Key: types.NocCertificatesKeyPrefix, Count: 2},
78+
{Key: types.NocCertificatesBySubjectKeyPrefix},
79+
{Key: types.NocCertificatesBySubjectKeyIDKeyPrefix, Count: 2},
80+
{Key: types.NocRootCertificatesKeyPrefix, Count: 2},
81+
{Key: types.UniqueCertificateKeyPrefix},
82+
},
83+
Missing: []utils.TestIndex{
84+
{Key: types.NocIcaCertificatesKeyPrefix},
85+
{Key: types.ProposedCertificateKeyPrefix},
86+
{Key: types.ApprovedCertificatesKeyPrefix},
87+
{Key: types.ApprovedCertificatesBySubjectKeyPrefix},
88+
{Key: types.ApprovedCertificatesBySubjectKeyIDKeyPrefix},
89+
{Key: types.ApprovedRootCertificatesKeyPrefix},
90+
},
91+
}
92+
utils.CheckCertificateStateIndexes(t, setup, rootCertificate1, indexes)
93+
utils.CheckCertificateStateIndexes(t, setup, rootCertificate2, indexes)
11494
}
11595

11696
// Error cases

0 commit comments

Comments
 (0)