From 6ce46a342012fafcf567ecf7937ce4ea36efaec0 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Wed, 24 Jul 2024 19:30:25 +0300 Subject: [PATCH 01/16] renamed NocRootCertificatesByVidAndSkid files Signed-off-by: DenisRybas --- .../grpc_rest/pki/noc_cert_helpers.go | 14 +- .../pki/genesis.proto | 4 +- ...=> noc_certificates_by_vid_and_skid.proto} | 2 +- .../pki/query.proto | 14 +- .../client/cli/query_noc_root_certificates.go | 6 +- x/pki/genesis.go | 6 +- x/pki/genesis_test.go | 4 +- x/pki/handler_add_noc_root_cert_test.go | 18 +- x/pki/handler_remove_noc_root_cert_test.go | 8 +- x/pki/handler_revoke_noc_root_cert_test.go | 8 +- ...query_noc_certificates_by_vid_and_skid.go} | 6 +- ..._noc_certificates_by_vid_and_skid_test.go} | 20 +- .../msg_server_add_noc_x_509_root_cert.go | 2 +- .../msg_server_remove_noc_x_509_root_cert.go | 2 +- ...go => noc_certificates_by_vid_and_skid.go} | 58 +-- ... noc_certificates_by_vid_and_skid_test.go} | 26 +- x/pki/types/genesis.go | 6 +- x/pki/types/genesis.pb.go | 126 +++--- x/pki/types/genesis_test.go | 4 +- ...y_noc_root_certificates_by_vid_and_skid.go | 8 +- ...=> noc_certificates_by_vid_and_skid.pb.go} | 179 ++++---- x/pki/types/query.pb.go | 414 +++++++++--------- x/pki/types/query.pb.gw.go | 28 +- 23 files changed, 481 insertions(+), 482 deletions(-) rename proto/zigbeealliance/distributedcomplianceledger/pki/{noc_root_certificates_by_vid_and_skid.proto => noc_certificates_by_vid_and_skid.proto} (91%) rename x/pki/keeper/{grpc_query_noc_root_certificates_by_vid_and_skid.go => grpc_query_noc_certificates_by_vid_and_skid.go} (56%) rename x/pki/keeper/{grpc_query_noc_root_certificates_by_vid_and_skid_test.go => grpc_query_noc_certificates_by_vid_and_skid_test.go} (63%) rename x/pki/keeper/{noc_root_certificates_by_vid_and_skid.go => noc_certificates_by_vid_and_skid.go} (57%) rename x/pki/keeper/{noc_root_certificates_by_vid_and_skid_test.go => noc_certificates_by_vid_and_skid_test.go} (55%) rename x/pki/types/{noc_root_certificates_by_vid_and_skid.pb.go => noc_certificates_by_vid_and_skid.pb.go} (51%) diff --git a/integration_tests/grpc_rest/pki/noc_cert_helpers.go b/integration_tests/grpc_rest/pki/noc_cert_helpers.go index 0545b4cb5..8423fcf90 100644 --- a/integration_tests/grpc_rest/pki/noc_cert_helpers.go +++ b/integration_tests/grpc_rest/pki/noc_cert_helpers.go @@ -106,29 +106,29 @@ func GetNocX509RootCerts(suite *utils.TestSuite, vendorID int32) (*pkitypes.NocR return &res, nil } -func GetNocX509RootCertsByVidAndSkid(suite *utils.TestSuite, vendorID int32, subjectKeyID string) (*pkitypes.NocRootCertificatesByVidAndSkid, error) { - var res pkitypes.NocRootCertificatesByVidAndSkid +func GetNocX509RootCertsByVidAndSkid(suite *utils.TestSuite, vendorID int32, subjectKeyID string) (*pkitypes.NocCertificatesByVidAndSkid, error) { + var res pkitypes.NocCertificatesByVidAndSkid if suite.Rest { - var resp pkitypes.QueryGetNocRootCertificatesByVidAndSkidResponse + var resp pkitypes.QueryGetNocCertificatesByVidAndSkidResponse err := suite.QueryREST(fmt.Sprintf("/dcl/pki/noc-root-certificates/%v/%s", vendorID, url.QueryEscape(subjectKeyID)), &resp) if err != nil { return nil, err } - res = resp.GetNocRootCertificatesByVidAndSkid() + res = resp.GetNocCertificatesByVidAndSkid() } else { grpcConn := suite.GetGRPCConn() defer grpcConn.Close() // This creates a gRPC client to query the x/pki service. pkiClient := pkitypes.NewQueryClient(grpcConn) - resp, err := pkiClient.NocRootCertificatesByVidAndSkid( + resp, err := pkiClient.NocCertificatesByVidAndSkid( context.Background(), - &pkitypes.QueryGetNocRootCertificatesByVidAndSkidRequest{Vid: vendorID, SubjectKeyId: subjectKeyID}, + &pkitypes.QueryGetNocCertificatesByVidAndSkidRequest{Vid: vendorID, SubjectKeyId: subjectKeyID}, ) if err != nil { return nil, err } - res = resp.GetNocRootCertificatesByVidAndSkid() + res = resp.GetNocCertificatesByVidAndSkid() } return &res, nil diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto index 7c9cc2f70..b85b89de9 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto @@ -17,7 +17,7 @@ import "zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_ import "zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates.proto"; import "zigbeealliance/distributedcomplianceledger/pki/noc_ica_certificates.proto"; import "zigbeealliance/distributedcomplianceledger/pki/revoked_noc_root_certificates.proto"; -import "zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto"; +import "zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto"; // this line is used by starport scaffolding # genesis/proto/import import "gogoproto/gogo.proto"; @@ -41,6 +41,6 @@ message GenesisState { repeated NocRootCertificates nocRootCertificatesList = 14 [(gogoproto.nullable) = false]; repeated NocIcaCertificates nocIcaCertificatesList = 15 [(gogoproto.nullable) = false]; repeated RevokedNocRootCertificates revokedNocRootCertificatesList = 16 [(gogoproto.nullable) = false]; - repeated NocRootCertificatesByVidAndSkid nocRootCertificatesByVidAndSkidList = 17 [(gogoproto.nullable) = false]; + repeated NocCertificatesByVidAndSkid nocCertificatesByVidAndSkidList = 17 [(gogoproto.nullable) = false]; // this line is used by starport scaffolding # genesis/proto/state } diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto similarity index 91% rename from proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto rename to proto/zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto index beaf36cab..d092fe453 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto @@ -6,7 +6,7 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/ import "gogoproto/gogo.proto"; import "zigbeealliance/distributedcomplianceledger/pki/certificate.proto"; -message NocRootCertificatesByVidAndSkid { +message NocCertificatesByVidAndSkid { int32 vid = 1 [(gogoproto.moretags) = "validate:\"gte=1,lte=65535\""]; string subjectKeyId = 2; repeated Certificate certs = 3; diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto index 638d20794..ae45f0405 100644 --- a/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto +++ b/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto @@ -17,7 +17,7 @@ import "zigbeealliance/distributedcomplianceledger/pki/pki_revocation_distributi import "zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates.proto"; import "zigbeealliance/distributedcomplianceledger/pki/noc_ica_certificates.proto"; import "zigbeealliance/distributedcomplianceledger/pki/revoked_noc_root_certificates.proto"; -import "zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto"; +import "zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto"; // this line is used by starport scaffolding # 1 import "gogoproto/gogo.proto"; @@ -118,9 +118,9 @@ service Query { option (google.api.http).get = "/dcl/pki/noc-root-certificates/{vid}"; } - // Queries a NocRootCertificatesByVidAndSkid by index. - rpc NocRootCertificatesByVidAndSkid(QueryGetNocRootCertificatesByVidAndSkidRequest) returns (QueryGetNocRootCertificatesByVidAndSkidResponse) { - option (google.api.http).get = "/dcl/pki/noc-root-certificates/{vid}/{subjectKeyId}"; + // Queries a NocCertificatesByVidAndSkid by index. + rpc NocCertificatesByVidAndSkid(QueryGetNocCertificatesByVidAndSkidRequest) returns (QueryGetNocCertificatesByVidAndSkidResponse) { + option (google.api.http).get = "/dcl/pki/noc-certificates/{vid}/{subjectKeyId}"; } // Queries a list of NocRootCertificates items. @@ -358,14 +358,14 @@ message QueryAllRevokedNocRootCertificatesResponse { cosmos.base.query.v1beta1.PageResponse pagination = 2; } -message QueryGetNocRootCertificatesByVidAndSkidRequest { +message QueryGetNocCertificatesByVidAndSkidRequest { int32 vid = 1; string subjectKeyId = 2; } -message QueryGetNocRootCertificatesByVidAndSkidResponse { - NocRootCertificatesByVidAndSkid nocRootCertificatesByVidAndSkid = 1 [(gogoproto.nullable) = false]; +message QueryGetNocCertificatesByVidAndSkidResponse { + NocCertificatesByVidAndSkid nocCertificatesByVidAndSkid = 1 [(gogoproto.nullable) = false]; } // this line is used by starport scaffolding # 3 diff --git a/x/pki/client/cli/query_noc_root_certificates.go b/x/pki/client/cli/query_noc_root_certificates.go index 60cb88b51..a3f859dc1 100644 --- a/x/pki/client/cli/query_noc_root_certificates.go +++ b/x/pki/client/cli/query_noc_root_certificates.go @@ -58,13 +58,13 @@ func CmdShowNocRootCertificates() *cobra.Command { clientCtx := client.GetClientContextFromCmd(cmd) if subjectKeyID != "" { - var res types.NocRootCertificatesByVidAndSkid + var res types.NocCertificatesByVidAndSkid return cli.QueryWithProof( clientCtx, pkitypes.StoreKey, - types.NocRootCertificatesByVidAndSkidKeyPrefix, - types.NocRootCertificatesByVidAndSkidKey(vid, subjectKeyID), + types.NocCertificatesByVidAndSkidKeyPrefix, + types.NocCertificatesByVidAndSkidKey(vid, subjectKeyID), &res, ) } diff --git a/x/pki/genesis.go b/x/pki/genesis.go index d38cc4370..1bb7a94d3 100644 --- a/x/pki/genesis.go +++ b/x/pki/genesis.go @@ -74,8 +74,8 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) k.SetRevokedNocRootCertificates(ctx, elem) } // Set all the nocRootCertificatesByVidAndSkid - for _, elem := range genState.NocRootCertificatesByVidAndSkidList { - k.SetNocRootCertificatesByVidAndSkid(ctx, elem) + for _, elem := range genState.NocCertificatesByVidAndSkidList { + k.SetNocCertificatesByVidAndSkid(ctx, elem) } // this line is used by starport scaffolding # genesis/module/init } @@ -108,7 +108,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis.NocRootCertificatesList = k.GetAllNocRootCertificates(ctx) genesis.NocIcaCertificatesList = k.GetAllNocIcaCertificates(ctx) genesis.RevokedNocRootCertificatesList = k.GetAllRevokedNocRootCertificates(ctx) - genesis.NocRootCertificatesByVidAndSkidList = k.GetAllNocRootCertificatesByVidAndSkid(ctx) + genesis.NocCertificatesByVidAndSkidList = k.GetAllNocCertificatesByVidAndSkid(ctx) // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/pki/genesis_test.go b/x/pki/genesis_test.go index bf93df5a2..b6d22554c 100644 --- a/x/pki/genesis_test.go +++ b/x/pki/genesis_test.go @@ -160,7 +160,7 @@ func TestGenesis(t *testing.T) { SubjectKeyId: "1", }, }, - NocRootCertificatesByVidAndSkidList: []types.NocRootCertificatesByVidAndSkid{ + NocCertificatesByVidAndSkidList: []types.NocCertificatesByVidAndSkid{ { Vid: 0, SubjectKeyId: "0", @@ -194,6 +194,6 @@ func TestGenesis(t *testing.T) { require.ElementsMatch(t, genesisState.NocRootCertificatesList, got.NocRootCertificatesList) require.ElementsMatch(t, genesisState.NocIcaCertificatesList, got.NocIcaCertificatesList) require.ElementsMatch(t, genesisState.RevokedNocRootCertificatesList, got.RevokedNocRootCertificatesList) - require.ElementsMatch(t, genesisState.NocRootCertificatesByVidAndSkidList, got.NocRootCertificatesByVidAndSkidList) + require.ElementsMatch(t, genesisState.NocCertificatesByVidAndSkidList, got.NocCertificatesByVidAndSkidList) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/pki/handler_add_noc_root_cert_test.go b/x/pki/handler_add_noc_root_cert_test.go index b9d2a2804..67f9d1bd3 100644 --- a/x/pki/handler_add_noc_root_cert_test.go +++ b/x/pki/handler_add_noc_root_cert_test.go @@ -198,7 +198,7 @@ func TestHandler_AddNocX509RootCert_AddNew(t *testing.T) { require.Equal(t, &newNocCertificate, nocRootCertificate) // query noc root certificate by VID and SKID - nocRootCertificate, tq, err := querySingleNocRootCertificateByVidAndSkid(setup, newNocCertificate.Vid, newNocCertificate.SubjectKeyId) + nocRootCertificate, tq, err := querySingleNocCertificateByVidAndSkid(setup, newNocCertificate.Vid, newNocCertificate.SubjectKeyId) require.NoError(t, err) require.Equal(t, &newNocCertificate, nocRootCertificate) require.Equal(t, float32(1), tq) @@ -267,7 +267,7 @@ func TestHandler_AddNocX509RootCert_Renew(t *testing.T) { require.Equal(t, &newNocCertificate, nocRootCertificates.Certs[1]) // query noc root certificate by VID and SKID - renewedNocRootCertificate, tq, err := querySingleNocRootCertificateByVidAndSkid(setup, testconstants.Vid, newNocCertificate.SubjectKeyId) + renewedNocRootCertificate, tq, err := querySingleNocCertificateByVidAndSkid(setup, testconstants.Vid, newNocCertificate.SubjectKeyId) require.NoError(t, err) require.Equal(t, &newNocCertificate, renewedNocRootCertificate) require.Equal(t, float32(1), tq) @@ -308,12 +308,12 @@ func queryNocRootCertificates( return &resp.NocRootCertificates, nil } -func querySingleNocRootCertificateByVidAndSkid( +func querySingleNocCertificateByVidAndSkid( setup *TestSetup, vid int32, subjectKeyID string, ) (*types.Certificate, float32, error) { - certificates, err := queryNocRootCertificatesByVidAndSkid(setup, vid, subjectKeyID) + certificates, err := queryNocCertificatesByVidAndSkid(setup, vid, subjectKeyID) if err != nil { return nil, 0, err } @@ -325,15 +325,15 @@ func querySingleNocRootCertificateByVidAndSkid( return certificates.Certs[0], certificates.Tq, nil } -func queryNocRootCertificatesByVidAndSkid( +func queryNocCertificatesByVidAndSkid( setup *TestSetup, vid int32, subjectKeyID string, -) (*types.NocRootCertificatesByVidAndSkid, error) { +) (*types.NocCertificatesByVidAndSkid, error) { // query certificate - req := &types.QueryGetNocRootCertificatesByVidAndSkidRequest{Vid: vid, SubjectKeyId: subjectKeyID} + req := &types.QueryGetNocCertificatesByVidAndSkidRequest{Vid: vid, SubjectKeyId: subjectKeyID} - resp, err := setup.Keeper.NocRootCertificatesByVidAndSkid(setup.Wctx, req) + resp, err := setup.Keeper.NocCertificatesByVidAndSkid(setup.Wctx, req) if err != nil { require.Nil(setup.T, resp) @@ -342,5 +342,5 @@ func queryNocRootCertificatesByVidAndSkid( require.NotNil(setup.T, resp) - return &resp.NocRootCertificatesByVidAndSkid, nil + return &resp.NocCertificatesByVidAndSkid, nil } diff --git a/x/pki/handler_remove_noc_root_cert_test.go b/x/pki/handler_remove_noc_root_cert_test.go index 89ac032c7..b12259341 100644 --- a/x/pki/handler_remove_noc_root_cert_test.go +++ b/x/pki/handler_remove_noc_root_cert_test.go @@ -66,7 +66,7 @@ func TestHandler_RemoveNocX509RootCert_BySubjectAndSKID(t *testing.T) { require.Empty(t, certsBySKID) _, err = queryNocRootCertificates(setup, vid) require.Equal(t, codes.NotFound, status.Code(err)) - _, err = queryNocRootCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) // check that unique certificates does not exists @@ -164,7 +164,7 @@ func TestHandler_RemoveNocX509RootCert_BySerialNumber(t *testing.T) { require.Empty(t, certsBySKID) _, err = queryNocRootCertificates(setup, vid) require.Equal(t, codes.NotFound, status.Code(err)) - _, err = queryNocRootCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) // check that unique certificates does not exists @@ -283,7 +283,7 @@ func TestHandler_RemoveNocX509RootCert_RevokedAndApprovedCertificate(t *testing. require.Empty(t, certsBySKID) _, err = queryNocRootCertificates(setup, vid) require.Equal(t, codes.NotFound, status.Code(err)) - _, err = queryNocRootCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) // check that unique certificates does not exists @@ -365,7 +365,7 @@ func TestHandler_RemoveNocX509RootCert_RevokedCertificate(t *testing.T) { require.Equal(t, codes.NotFound, status.Code(err)) _, err = queryNocRootCertificates(setup, vid) require.Equal(t, codes.NotFound, status.Code(err)) - _, err = queryNocRootCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) // check that unique certificate does not exists diff --git a/x/pki/handler_revoke_noc_root_cert_test.go b/x/pki/handler_revoke_noc_root_cert_test.go index 2315f0c2d..e8c099186 100644 --- a/x/pki/handler_revoke_noc_root_cert_test.go +++ b/x/pki/handler_revoke_noc_root_cert_test.go @@ -241,11 +241,11 @@ func TestHandler_RevokeNocX509RootCert_RevokeDefault(t *testing.T) { require.Equal(t, testconstants.NocRootCert2SubjectKeyID, nocRootCerts.Certs[0].SubjectKeyId) // query noc root certificate by VID and SKID - _, err = queryNocRootCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) + _, err = queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) - nocRootCertificatesByVidAndSkid, err := queryNocRootCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert2SubjectKeyID) + nocRootCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert2SubjectKeyID) require.NoError(t, err) require.Equal(t, testconstants.NocRootCert2SubjectKeyID, nocRootCertificatesByVidAndSkid.SubjectKeyId) require.Equal(t, 1, len(nocRootCerts.Certs)) @@ -343,7 +343,7 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithChild(t *testing.T) { require.Equal(t, codes.NotFound, status.Code(err)) // query noc root certificate by VID and SKID - _, err = queryNocRootCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) + _, err = queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) @@ -452,7 +452,7 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumber(t *testing.T) { require.Equal(t, testconstants.NocRootCert1CopySerialNumber, revNocRoot.Certs[0].SerialNumber) // query noc root certificate by VID and SKID - nocRootCertificatesByVidAndSkid, err := queryNocRootCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) + nocRootCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.NoError(t, err) require.Equal(t, testconstants.NocRootCert1SubjectKeyID, nocRootCertificatesByVidAndSkid.SubjectKeyId) require.Equal(t, 1, len(revNocRoot.Certs)) diff --git a/x/pki/keeper/grpc_query_noc_root_certificates_by_vid_and_skid.go b/x/pki/keeper/grpc_query_noc_certificates_by_vid_and_skid.go similarity index 56% rename from x/pki/keeper/grpc_query_noc_root_certificates_by_vid_and_skid.go rename to x/pki/keeper/grpc_query_noc_certificates_by_vid_and_skid.go index 3f936280d..804b0f51f 100644 --- a/x/pki/keeper/grpc_query_noc_root_certificates_by_vid_and_skid.go +++ b/x/pki/keeper/grpc_query_noc_certificates_by_vid_and_skid.go @@ -9,13 +9,13 @@ import ( "google.golang.org/grpc/status" ) -func (k Keeper) NocRootCertificatesByVidAndSkid(c context.Context, req *types.QueryGetNocRootCertificatesByVidAndSkidRequest) (*types.QueryGetNocRootCertificatesByVidAndSkidResponse, error) { +func (k Keeper) NocCertificatesByVidAndSkid(c context.Context, req *types.QueryGetNocCertificatesByVidAndSkidRequest) (*types.QueryGetNocCertificatesByVidAndSkidResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(c) - val, found := k.GetNocRootCertificatesByVidAndSkid( + val, found := k.GetNocCertificatesByVidAndSkid( ctx, req.Vid, req.SubjectKeyId, @@ -24,5 +24,5 @@ func (k Keeper) NocRootCertificatesByVidAndSkid(c context.Context, req *types.Qu return nil, status.Error(codes.NotFound, "not found") } - return &types.QueryGetNocRootCertificatesByVidAndSkidResponse{NocRootCertificatesByVidAndSkid: val}, nil + return &types.QueryGetNocCertificatesByVidAndSkidResponse{NocCertificatesByVidAndSkid: val}, nil } diff --git a/x/pki/keeper/grpc_query_noc_root_certificates_by_vid_and_skid_test.go b/x/pki/keeper/grpc_query_noc_certificates_by_vid_and_skid_test.go similarity index 63% rename from x/pki/keeper/grpc_query_noc_root_certificates_by_vid_and_skid_test.go rename to x/pki/keeper/grpc_query_noc_certificates_by_vid_and_skid_test.go index 1d0757d29..307c2ed87 100644 --- a/x/pki/keeper/grpc_query_noc_root_certificates_by_vid_and_skid_test.go +++ b/x/pki/keeper/grpc_query_noc_certificates_by_vid_and_skid_test.go @@ -17,35 +17,35 @@ import ( // Prevent strconv unused error. var _ = strconv.IntSize -func TestNocRootCertificatesByVidAndSkidQuerySingle(t *testing.T) { +func TestNocCertificatesByVidAndSkidQuerySingle(t *testing.T) { keeper, ctx := keepertest.PkiKeeper(t, nil) wctx := sdk.WrapSDKContext(ctx) - msgs := createNNocRootCertificatesByVidAndSkid(keeper, ctx, 2) + msgs := createNNocCertificatesByVidAndSkid(keeper, ctx, 2) for _, tc := range []struct { desc string - request *types.QueryGetNocRootCertificatesByVidAndSkidRequest - response *types.QueryGetNocRootCertificatesByVidAndSkidResponse + request *types.QueryGetNocCertificatesByVidAndSkidRequest + response *types.QueryGetNocCertificatesByVidAndSkidResponse err error }{ { desc: "First", - request: &types.QueryGetNocRootCertificatesByVidAndSkidRequest{ + request: &types.QueryGetNocCertificatesByVidAndSkidRequest{ Vid: msgs[0].Vid, SubjectKeyId: msgs[0].SubjectKeyId, }, - response: &types.QueryGetNocRootCertificatesByVidAndSkidResponse{NocRootCertificatesByVidAndSkid: msgs[0]}, + response: &types.QueryGetNocCertificatesByVidAndSkidResponse{NocCertificatesByVidAndSkid: msgs[0]}, }, { desc: "Second", - request: &types.QueryGetNocRootCertificatesByVidAndSkidRequest{ + request: &types.QueryGetNocCertificatesByVidAndSkidRequest{ Vid: msgs[1].Vid, SubjectKeyId: msgs[1].SubjectKeyId, }, - response: &types.QueryGetNocRootCertificatesByVidAndSkidResponse{NocRootCertificatesByVidAndSkid: msgs[1]}, + response: &types.QueryGetNocCertificatesByVidAndSkidResponse{NocCertificatesByVidAndSkid: msgs[1]}, }, { desc: "KeyNotFound", - request: &types.QueryGetNocRootCertificatesByVidAndSkidRequest{ + request: &types.QueryGetNocCertificatesByVidAndSkidRequest{ Vid: 100000, SubjectKeyId: strconv.Itoa(100000), }, @@ -57,7 +57,7 @@ func TestNocRootCertificatesByVidAndSkidQuerySingle(t *testing.T) { }, } { t.Run(tc.desc, func(t *testing.T) { - response, err := keeper.NocRootCertificatesByVidAndSkid(wctx, tc.request) + response, err := keeper.NocCertificatesByVidAndSkid(wctx, tc.request) if tc.err != nil { require.ErrorIs(t, err, tc.err) } else { diff --git a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go index b17f97235..0642b11d6 100644 --- a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go @@ -99,7 +99,7 @@ func (k msgServer) AddNocX509RootCert(goCtx context.Context, msg *types.MsgAddNo k.SetUniqueCertificate(ctx, uniqueCertificate) // add to vid, subject -> certificates map - k.AddNocRootCertificatesByVidAndSkid(ctx, certificate) + k.AddNocCertificatesByVidAndSkid(ctx, certificate) // add to subject -> subject key ID map k.AddApprovedCertificateBySubject(ctx, certificate.Subject, certificate.SubjectKeyId) diff --git a/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go index a2987306f..991db4762 100644 --- a/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go @@ -81,7 +81,7 @@ func (k msgServer) RemoveNocX509RootCert(goCtx context.Context, msg *types.MsgRe } else { k.RemoveNocRootCertificate(ctx, accountVid, certID.Subject, certID.SubjectKeyId) // remove from vid, subject key id map - k.RemoveNocRootCertificatesByVidAndSkid(ctx, accountVid, certID.SubjectKeyId) + k.RemoveNocCertificatesByVidAndSkid(ctx, accountVid, certID.SubjectKeyId) // remove from revoked noc root certs k.RemoveRevokedNocRootCertificates(ctx, certID.Subject, certID.SubjectKeyId) // remove from revoked list diff --git a/x/pki/keeper/noc_root_certificates_by_vid_and_skid.go b/x/pki/keeper/noc_certificates_by_vid_and_skid.go similarity index 57% rename from x/pki/keeper/noc_root_certificates_by_vid_and_skid.go rename to x/pki/keeper/noc_certificates_by_vid_and_skid.go index 84c715136..205fc4878 100644 --- a/x/pki/keeper/noc_root_certificates_by_vid_and_skid.go +++ b/x/pki/keeper/noc_certificates_by_vid_and_skid.go @@ -8,26 +8,26 @@ import ( "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) -// SetNocRootCertificatesByVidAndSkid set a specific nocRootCertificatesByVidAndSkid in the store from its index. -func (k Keeper) SetNocRootCertificatesByVidAndSkid(ctx sdk.Context, nocRootCertificatesByVidAndSkid types.NocRootCertificatesByVidAndSkid) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesByVidAndSkidKeyPrefix)) +// SetNocCertificatesByVidAndSkid set a specific nocRootCertificatesByVidAndSkid in the store from its index. +func (k Keeper) SetNocCertificatesByVidAndSkid(ctx sdk.Context, nocRootCertificatesByVidAndSkid types.NocCertificatesByVidAndSkid) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) b := k.cdc.MustMarshal(&nocRootCertificatesByVidAndSkid) - store.Set(types.NocRootCertificatesByVidAndSkidKey( + store.Set(types.NocCertificatesByVidAndSkidKey( nocRootCertificatesByVidAndSkid.Vid, nocRootCertificatesByVidAndSkid.SubjectKeyId, ), b) } -// GetNocRootCertificatesByVidAndSkid returns a nocRootCertificatesByVidAndSkid from its index. -func (k Keeper) GetNocRootCertificatesByVidAndSkid( +// GetNocCertificatesByVidAndSkid returns a nocRootCertificatesByVidAndSkid from its index. +func (k Keeper) GetNocCertificatesByVidAndSkid( ctx sdk.Context, vid int32, subjectKeyID string, -) (val types.NocRootCertificatesByVidAndSkid, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesByVidAndSkidKeyPrefix)) +) (val types.NocCertificatesByVidAndSkid, found bool) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) - b := store.Get(types.NocRootCertificatesByVidAndSkidKey( + b := store.Get(types.NocCertificatesByVidAndSkidKey( vid, subjectKeyID, )) @@ -41,14 +41,14 @@ func (k Keeper) GetNocRootCertificatesByVidAndSkid( } // Add a NOC root certificate to the list of NOC root certificates for the VID map. -func (k Keeper) AddNocRootCertificatesByVidAndSkid(ctx sdk.Context, nocCertificate types.Certificate) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesByVidAndSkidKeyPrefix)) +func (k Keeper) AddNocCertificatesByVidAndSkid(ctx sdk.Context, nocCertificate types.Certificate) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) - nocRootCertificatesByVidAndSkidKeyBytes := store.Get(types.NocRootCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId)) - var nocRootCertificatesByVidAndSkid types.NocRootCertificatesByVidAndSkid + nocRootCertificatesByVidAndSkidKeyBytes := store.Get(types.NocCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId)) + var nocRootCertificatesByVidAndSkid types.NocCertificatesByVidAndSkid if nocRootCertificatesByVidAndSkidKeyBytes == nil { - nocRootCertificatesByVidAndSkid = types.NocRootCertificatesByVidAndSkid{ + nocRootCertificatesByVidAndSkid = types.NocCertificatesByVidAndSkid{ Vid: nocCertificate.Vid, SubjectKeyId: nocCertificate.SubjectKeyId, Certs: []*types.Certificate{}, @@ -61,17 +61,17 @@ func (k Keeper) AddNocRootCertificatesByVidAndSkid(ctx sdk.Context, nocCertifica nocRootCertificatesByVidAndSkid.Certs = append(nocRootCertificatesByVidAndSkid.Certs, &nocCertificate) b := k.cdc.MustMarshal(&nocRootCertificatesByVidAndSkid) - store.Set(types.NocRootCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId), b) + store.Set(types.NocCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId), b) } -// RemoveNocRootCertificatesByVidAndSkid removes a nocRootCertificatesByVidAndSkid from the store. -func (k Keeper) RemoveNocRootCertificatesByVidAndSkid( +// RemoveNocCertificatesByVidAndSkid removes a nocRootCertificatesByVidAndSkid from the store. +func (k Keeper) RemoveNocCertificatesByVidAndSkid( ctx sdk.Context, vid int32, subjectKeyID string, ) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesByVidAndSkidKeyPrefix)) - store.Delete(types.NocRootCertificatesByVidAndSkidKey( + store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) + store.Delete(types.NocCertificatesByVidAndSkidKey( vid, subjectKeyID, )) @@ -84,7 +84,7 @@ func (k Keeper) RemoveNocRootCertificateByVidSubjectAndSkid( subject string, subjectKeyID string, ) { - k._filterAndSetNocRootCertificateByVidAndSkid( + k._filterAndSetNocCertificateByVidAndSkid( ctx, vid, subjectKeyID, @@ -102,7 +102,7 @@ func (k Keeper) RemoveNocRootCertificateByVidSubjectSkidAndSerialNumber( subjectKeyID string, serialNumber string, ) { - k._filterAndSetNocRootCertificateByVidAndSkid( + k._filterAndSetNocCertificateByVidAndSkid( ctx, vid, subjectKeyID, @@ -113,32 +113,32 @@ func (k Keeper) RemoveNocRootCertificateByVidSubjectSkidAndSerialNumber( } // RemoveNocRootCertificateByVidSkidSubjectAndSerialNumber removes root certificate with specified subject and serial number from the list. -func (k Keeper) _filterAndSetNocRootCertificateByVidAndSkid( +func (k Keeper) _filterAndSetNocCertificateByVidAndSkid( ctx sdk.Context, vid int32, subjectKeyID string, predicate CertificatePredicate, ) { - nocCertificates, _ := k.GetNocRootCertificatesByVidAndSkid(ctx, vid, subjectKeyID) + nocCertificates, _ := k.GetNocCertificatesByVidAndSkid(ctx, vid, subjectKeyID) filteredCertificates := filterCertificates(&nocCertificates.Certs, predicate) if len(filteredCertificates) > 0 { nocCertificates.Certs = filteredCertificates - k.SetNocRootCertificatesByVidAndSkid(ctx, nocCertificates) + k.SetNocCertificatesByVidAndSkid(ctx, nocCertificates) } else { - k.RemoveNocRootCertificatesByVidAndSkid(ctx, vid, subjectKeyID) + k.RemoveNocCertificatesByVidAndSkid(ctx, vid, subjectKeyID) } } -// GetAllNocRootCertificatesByVidAndSkid returns all nocRootCertificatesByVidAndSkid. -func (k Keeper) GetAllNocRootCertificatesByVidAndSkid(ctx sdk.Context) (list []types.NocRootCertificatesByVidAndSkid) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocRootCertificatesByVidAndSkidKeyPrefix)) +// GetAllNocCertificatesByVidAndSkid returns all nocRootCertificatesByVidAndSkid. +func (k Keeper) GetAllNocCertificatesByVidAndSkid(ctx sdk.Context) (list []types.NocCertificatesByVidAndSkid) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) iterator := sdk.KVStorePrefixIterator(store, []byte{}) defer iterator.Close() for ; iterator.Valid(); iterator.Next() { - var val types.NocRootCertificatesByVidAndSkid + var val types.NocCertificatesByVidAndSkid k.cdc.MustUnmarshal(iterator.Value(), &val) list = append(list, val) } diff --git a/x/pki/keeper/noc_root_certificates_by_vid_and_skid_test.go b/x/pki/keeper/noc_certificates_by_vid_and_skid_test.go similarity index 55% rename from x/pki/keeper/noc_root_certificates_by_vid_and_skid_test.go rename to x/pki/keeper/noc_certificates_by_vid_and_skid_test.go index 1d03a3426..eeba8011b 100644 --- a/x/pki/keeper/noc_root_certificates_by_vid_and_skid_test.go +++ b/x/pki/keeper/noc_certificates_by_vid_and_skid_test.go @@ -15,23 +15,23 @@ import ( // Prevent strconv unused error. var _ = strconv.IntSize -func createNNocRootCertificatesByVidAndSkid(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.NocRootCertificatesByVidAndSkid { - items := make([]types.NocRootCertificatesByVidAndSkid, n) +func createNNocCertificatesByVidAndSkid(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.NocCertificatesByVidAndSkid { + items := make([]types.NocCertificatesByVidAndSkid, n) for i := range items { items[i].Vid = int32(i) items[i].SubjectKeyId = strconv.Itoa(i) - keeper.SetNocRootCertificatesByVidAndSkid(ctx, items[i]) + keeper.SetNocCertificatesByVidAndSkid(ctx, items[i]) } return items } -func TestNocRootCertificatesByVidAndSkidGet(t *testing.T) { +func TestNocCertificatesByVidAndSkidGet(t *testing.T) { keeper, ctx := keepertest.PkiKeeper(t, nil) - items := createNNocRootCertificatesByVidAndSkid(keeper, ctx, 10) + items := createNNocCertificatesByVidAndSkid(keeper, ctx, 10) for _, item := range items { - rst, found := keeper.GetNocRootCertificatesByVidAndSkid(ctx, + rst, found := keeper.GetNocCertificatesByVidAndSkid(ctx, item.Vid, item.SubjectKeyId, ) @@ -42,15 +42,15 @@ func TestNocRootCertificatesByVidAndSkidGet(t *testing.T) { ) } } -func TestNocRootCertificatesByVidAndSkidRemove(t *testing.T) { +func TestNocCertificatesByVidAndSkidRemove(t *testing.T) { keeper, ctx := keepertest.PkiKeeper(t, nil) - items := createNNocRootCertificatesByVidAndSkid(keeper, ctx, 10) + items := createNNocCertificatesByVidAndSkid(keeper, ctx, 10) for _, item := range items { - keeper.RemoveNocRootCertificatesByVidAndSkid(ctx, + keeper.RemoveNocCertificatesByVidAndSkid(ctx, item.Vid, item.SubjectKeyId, ) - _, found := keeper.GetNocRootCertificatesByVidAndSkid(ctx, + _, found := keeper.GetNocCertificatesByVidAndSkid(ctx, item.Vid, item.SubjectKeyId, ) @@ -58,11 +58,11 @@ func TestNocRootCertificatesByVidAndSkidRemove(t *testing.T) { } } -func TestNocRootCertificatesByVidAndSkidGetAll(t *testing.T) { +func TestNocCertificatesByVidAndSkidGetAll(t *testing.T) { keeper, ctx := keepertest.PkiKeeper(t, nil) - items := createNNocRootCertificatesByVidAndSkid(keeper, ctx, 10) + items := createNNocCertificatesByVidAndSkid(keeper, ctx, 10) require.ElementsMatch(t, nullify.Fill(items), - nullify.Fill(keeper.GetAllNocRootCertificatesByVidAndSkid(ctx)), + nullify.Fill(keeper.GetAllNocCertificatesByVidAndSkid(ctx)), ) } diff --git a/x/pki/types/genesis.go b/x/pki/types/genesis.go index 506d2c436..0bf4c7c25 100644 --- a/x/pki/types/genesis.go +++ b/x/pki/types/genesis.go @@ -26,7 +26,7 @@ func DefaultGenesis() *GenesisState { NocRootCertificatesList: []NocRootCertificates{}, NocIcaCertificatesList: []NocIcaCertificates{}, RevokedNocRootCertificatesList: []RevokedNocRootCertificates{}, - NocRootCertificatesByVidAndSkidList: []NocRootCertificatesByVidAndSkid{}, + NocCertificatesByVidAndSkidList: []NocCertificatesByVidAndSkid{}, // this line is used by starport scaffolding # genesis/types/default } } @@ -179,8 +179,8 @@ func (gs GenesisState) Validate() error { //nolint:gocyclo,vet // Check for duplicated index in nocRootCertificatesByVidAndSkid nocRootCertificatesByVidAndSkidIndexMap := make(map[string]struct{}) - for _, elem := range gs.NocRootCertificatesByVidAndSkidList { - index := string(NocRootCertificatesByVidAndSkidKey(elem.Vid, elem.SubjectKeyId)) + for _, elem := range gs.NocCertificatesByVidAndSkidList { + index := string(NocCertificatesByVidAndSkidKey(elem.Vid, elem.SubjectKeyId)) if _, ok := nocRootCertificatesByVidAndSkidIndexMap[index]; ok { return fmt.Errorf("duplicated index for nocRootCertificatesByVidAndSkid") } diff --git a/x/pki/types/genesis.pb.go b/x/pki/types/genesis.pb.go index 1eec71bdc..7281e955f 100644 --- a/x/pki/types/genesis.pb.go +++ b/x/pki/types/genesis.pb.go @@ -41,7 +41,7 @@ type GenesisState struct { NocRootCertificatesList []NocRootCertificates `protobuf:"bytes,14,rep,name=nocRootCertificatesList,proto3" json:"nocRootCertificatesList"` NocIcaCertificatesList []NocIcaCertificates `protobuf:"bytes,15,rep,name=nocIcaCertificatesList,proto3" json:"nocIcaCertificatesList"` RevokedNocRootCertificatesList []RevokedNocRootCertificates `protobuf:"bytes,16,rep,name=revokedNocRootCertificatesList,proto3" json:"revokedNocRootCertificatesList"` - NocRootCertificatesByVidAndSkidList []NocRootCertificatesByVidAndSkid `protobuf:"bytes,17,rep,name=nocRootCertificatesByVidAndSkidList,proto3" json:"nocRootCertificatesByVidAndSkidList"` + NocCertificatesByVidAndSkidList []NocCertificatesByVidAndSkid `protobuf:"bytes,17,rep,name=nocCertificatesByVidAndSkidList,proto3" json:"nocCertificatesByVidAndSkidList"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -189,9 +189,9 @@ func (m *GenesisState) GetRevokedNocRootCertificatesList() []RevokedNocRootCerti return nil } -func (m *GenesisState) GetNocRootCertificatesByVidAndSkidList() []NocRootCertificatesByVidAndSkid { +func (m *GenesisState) GetNocCertificatesByVidAndSkidList() []NocCertificatesByVidAndSkid { if m != nil { - return m.NocRootCertificatesByVidAndSkidList + return m.NocCertificatesByVidAndSkidList } return nil } @@ -205,58 +205,58 @@ func init() { } var fileDescriptor_f53eb28747bee8a8 = []byte{ - // 810 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0xd4, 0x4e, - 0x18, 0xc6, 0x77, 0xbe, 0xf0, 0x45, 0x2d, 0xf8, 0xab, 0x41, 0x25, 0x1c, 0x56, 0xc4, 0xc4, 0x70, - 0x61, 0x37, 0xc1, 0x83, 0x17, 0x2f, 0xbb, 0x6c, 0x82, 0x8b, 0xba, 0x90, 0x45, 0x38, 0x10, 0x63, - 0xd3, 0x9d, 0x8e, 0xcb, 0xd8, 0xa5, 0x53, 0xdb, 0x59, 0xe2, 0x9a, 0x98, 0x68, 0x34, 0xc6, 0xa3, - 0x47, 0xaf, 0x26, 0x26, 0x5e, 0xfd, 0x33, 0x38, 0x72, 0xf4, 0x64, 0x0c, 0xfb, 0x8f, 0x98, 0xbe, - 0x9d, 0xb2, 0xa5, 0x9d, 0x2e, 0x74, 0xd2, 0xdb, 0x52, 0xda, 0xe7, 0xf9, 0xcc, 0xfb, 0x3e, 0xf3, - 0xce, 0x68, 0x0f, 0xdf, 0xd2, 0x6e, 0x87, 0x10, 0xb3, 0xd7, 0xa3, 0xa6, 0x83, 0x49, 0xd5, 0xa2, - 0x3e, 0xf7, 0x68, 0xa7, 0xcf, 0x89, 0x85, 0xd9, 0xbe, 0x1b, 0x3e, 0xed, 0x11, 0xab, 0x4b, 0xbc, - 0xaa, 0x6b, 0xd3, 0x6a, 0x97, 0x38, 0xc4, 0xa7, 0x7e, 0xc5, 0xf5, 0x18, 0x67, 0x7a, 0xe5, 0xf4, - 0xd7, 0x95, 0x31, 0x5f, 0x57, 0x5c, 0x9b, 0xce, 0xaf, 0xe7, 0x74, 0x33, 0x5d, 0xd7, 0x63, 0x07, - 0xc4, 0x32, 0x30, 0xf1,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x4a, 0x2a, 0x57, 0x1f, 0xec, 0x50, 0xab, 0xe6, - 0x58, 0x5b, 0x36, 0x0d, 0x33, 0x75, 0x1d, 0xf8, 0x36, 0x8a, 0xe8, 0x57, 0x4c, 0x5a, 0x40, 0x9e, - 0x87, 0xa0, 0xfe, 0xe2, 0xf0, 0xb8, 0x8c, 0x8e, 0x8e, 0xcb, 0xe8, 0xef, 0x71, 0x19, 0x7d, 0x1d, - 0x96, 0x4b, 0x47, 0xc3, 0x72, 0xe9, 0xf7, 0xb0, 0x5c, 0xda, 0x6d, 0x74, 0x29, 0xdf, 0xeb, 0x77, - 0x2a, 0x98, 0xed, 0x57, 0x43, 0xbe, 0x65, 0xd9, 0x15, 0x75, 0x79, 0x44, 0xb8, 0x2c, 0x2e, 0xa9, - 0x6f, 0xe0, 0x9a, 0xca, 0x07, 0x2e, 0xf1, 0x3b, 0x53, 0x70, 0xe3, 0xbc, 0xff, 0x2f, 0x00, 0x00, - 0xff, 0xff, 0x8f, 0x4b, 0xfe, 0xd1, 0x73, 0x10, 0x00, 0x00, + // 809 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x3f, 0x6f, 0xd3, 0x40, + 0x18, 0xc6, 0x73, 0xb4, 0x14, 0x70, 0xcb, 0x3f, 0xf3, 0xaf, 0xea, 0x90, 0x96, 0x0e, 0xa8, 0x4b, + 0x13, 0xa9, 0x0c, 0x2c, 0x2c, 0x49, 0x23, 0x95, 0xb4, 0x10, 0xaa, 0x94, 0x76, 0x40, 0x08, 0xcb, + 0x39, 0x1f, 0xe9, 0xe1, 0xd4, 0x67, 0xec, 0x4b, 0x45, 0x90, 0x90, 0x40, 0x20, 0x66, 0x46, 0x24, + 0x26, 0x24, 0x3e, 0x00, 0x1f, 0xa3, 0x63, 0x47, 0x26, 0x84, 0x9a, 0xaf, 0xc1, 0x80, 0xfc, 0xfa, + 0xdc, 0x24, 0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27, 0x78, 0xd5, 0x82, 0x45, 0x5d, 0x86, 0x45, 0x35, 0x73, 0xcd, + 0x2e, 0xa8, 0x8b, 0x35, 0x9c, 0x91, 0x03, 0x52, 0xec, 0x30, 0x1c, 0xdf, 0x81, 0xc0, 0x78, 0x45, + 0x2d, 0xc5, 0x8d, 0xa4, 0x5c, 0x94, 0xe2, 0x14, 0x27, 0xfd, 0x03, 0xd2, 0x6e, 0x3b, 0x0c, 0xd7, + 0xb1, 0x99, 0x80, 0xb8, 0x0a, 0x10, 0x55, 0x05, 0x88, 0x98, 0x9a, 0x60, 0x48, 0xf1, 0xd1, 0xbf, + 0x21, 0xad, 0x28, 0xc6, 0x51, 0x23, 0xa5, 0x1e, 0xd7, 0x00, 0x65, 0x53, 0x71, 0xfa, 0xa5, 0x97, + 0x65, 0x82, 0xaf, 0xfe, 0x1d, 0x69, 0x8b, 0x0e, 0xc3, 0xa3, 0x9d, 0xdc, 0xa3, 0x56, 0xc5, 0xb1, + 0x76, 0x6c, 0x1a, 0xe6, 0xe9, 0x3a, 0xb0, 0x6d, 0x29, 0x94, 0x29, 0x4d, 0x56, 0xc0, 0x4d, 0x72, + 0xae, 0xbe, 0x3c, 0x3a, 0x29, 0xa2, 0xe3, 0x93, 0x22, 0xfa, 0x7b, 0x52, 0x44, 0x5f, 0xfb, 0xc5, + 0xc2, 0x71, 0xbf, 0x58, 0xf8, 0xdd, 0x2f, 0x16, 0x9e, 0xd7, 0xda, 0x94, 0xef, 0x77, 0x5b, 0x25, + 0xcc, 0x0e, 0xca, 0x21, 0xd7, 0xaa, 0xec, 0x46, 0xba, 0x3a, 0x20, 0x5b, 0x15, 0x77, 0xd2, 0xb7, + 0x70, 0x2b, 0xe5, 0x3d, 0x97, 0xf8, 0xad, 0x19, 0xb8, 0x65, 0xde, 0xff, 0x1f, 0x00, 0x00, 0xff, + 0xff, 0x9a, 0x61, 0xbf, 0x46, 0x62, 0x10, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -279,10 +279,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.NocRootCertificatesByVidAndSkidList) > 0 { - for iNdEx := len(m.NocRootCertificatesByVidAndSkidList) - 1; iNdEx >= 0; iNdEx-- { + if len(m.NocCertificatesByVidAndSkidList) > 0 { + for iNdEx := len(m.NocCertificatesByVidAndSkidList) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.NocRootCertificatesByVidAndSkidList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.NocCertificatesByVidAndSkidList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -629,8 +629,8 @@ func (m *GenesisState) Size() (n int) { n += 2 + l + sovGenesis(uint64(l)) } } - if len(m.NocRootCertificatesByVidAndSkidList) > 0 { - for _, e := range m.NocRootCertificatesByVidAndSkidList { + if len(m.NocCertificatesByVidAndSkidList) > 0 { + for _, e := range m.NocCertificatesByVidAndSkidList { l = e.Size() n += 2 + l + sovGenesis(uint64(l)) } @@ -1223,7 +1223,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NocRootCertificatesByVidAndSkidList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NocCertificatesByVidAndSkidList", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1250,8 +1250,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NocRootCertificatesByVidAndSkidList = append(m.NocRootCertificatesByVidAndSkidList, NocRootCertificatesByVidAndSkid{}) - if err := m.NocRootCertificatesByVidAndSkidList[len(m.NocRootCertificatesByVidAndSkidList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.NocCertificatesByVidAndSkidList = append(m.NocCertificatesByVidAndSkidList, NocCertificatesByVidAndSkid{}) + if err := m.NocCertificatesByVidAndSkidList[len(m.NocCertificatesByVidAndSkidList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/pki/types/genesis_test.go b/x/pki/types/genesis_test.go index 4f8d37c5c..33c90a915 100644 --- a/x/pki/types/genesis_test.go +++ b/x/pki/types/genesis_test.go @@ -152,7 +152,7 @@ SubjectKeyId: "0", SubjectKeyId: "1", }, }, -NocRootCertificatesByVidAndSkidList: []types.NocRootCertificatesByVidAndSkid{ +NocCertificatesByVidAndSkidList: []types.NocCertificatesByVidAndSkid{ { Vid: 0, SubjectKeyId: "0", @@ -371,7 +371,7 @@ SubjectKeyId: "0", { desc: "duplicated nocRootCertificatesByVidAndSkid", genState: &types.GenesisState{ - NocRootCertificatesByVidAndSkidList: []types.NocRootCertificatesByVidAndSkid{ + NocCertificatesByVidAndSkidList: []types.NocCertificatesByVidAndSkid{ { Vid: 0, SubjectKeyId: "0", diff --git a/x/pki/types/key_noc_root_certificates_by_vid_and_skid.go b/x/pki/types/key_noc_root_certificates_by_vid_and_skid.go index 567eaf9c3..57e32a609 100644 --- a/x/pki/types/key_noc_root_certificates_by_vid_and_skid.go +++ b/x/pki/types/key_noc_root_certificates_by_vid_and_skid.go @@ -5,12 +5,12 @@ import "encoding/binary" var _ binary.ByteOrder const ( - // NocRootCertificatesByVidAndSkidKeyPrefix is the prefix to retrieve all NocRootCertificatesByVidAndSkid. - NocRootCertificatesByVidAndSkidKeyPrefix = "NocRootCertificatesByVidAndSkid/value/" + // NocCertificatesByVidAndSkidKeyPrefix is the prefix to retrieve all NocCertificatesByVidAndSkid. + NocCertificatesByVidAndSkidKeyPrefix = "NocCertificatesByVidAndSkid/value/" ) -// NocRootCertificatesByVidAndSkidKey returns the store key to retrieve a NocRootCertificatesByVidAndSkid from the index fields. -func NocRootCertificatesByVidAndSkidKey( +// NocCertificatesByVidAndSkidKey returns the store key to retrieve a NocCertificatesByVidAndSkid from the index fields. +func NocCertificatesByVidAndSkidKey( vid int32, subjectKeyID string, ) []byte { diff --git a/x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go b/x/pki/types/noc_certificates_by_vid_and_skid.pb.go similarity index 51% rename from x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go rename to x/pki/types/noc_certificates_by_vid_and_skid.pb.go index 0cf275b11..c1e16b3cd 100644 --- a/x/pki/types/noc_root_certificates_by_vid_and_skid.pb.go +++ b/x/pki/types/noc_certificates_by_vid_and_skid.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto +// source: zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto package types @@ -24,7 +24,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type NocRootCertificatesByVidAndSkid struct { +type NocCertificatesByVidAndSkid struct { Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty" validate:"gte=1,lte=65535"` SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` Certs []*Certificate `protobuf:"bytes,3,rep,name=certs,proto3" json:"certs,omitempty"` @@ -32,18 +32,18 @@ type NocRootCertificatesByVidAndSkid struct { SchemaVersion uint32 `protobuf:"varint,5,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"` } -func (m *NocRootCertificatesByVidAndSkid) Reset() { *m = NocRootCertificatesByVidAndSkid{} } -func (m *NocRootCertificatesByVidAndSkid) String() string { return proto.CompactTextString(m) } -func (*NocRootCertificatesByVidAndSkid) ProtoMessage() {} -func (*NocRootCertificatesByVidAndSkid) Descriptor() ([]byte, []int) { - return fileDescriptor_f3e80b73a145a96e, []int{0} +func (m *NocCertificatesByVidAndSkid) Reset() { *m = NocCertificatesByVidAndSkid{} } +func (m *NocCertificatesByVidAndSkid) String() string { return proto.CompactTextString(m) } +func (*NocCertificatesByVidAndSkid) ProtoMessage() {} +func (*NocCertificatesByVidAndSkid) Descriptor() ([]byte, []int) { + return fileDescriptor_464c9454e8b60e07, []int{0} } -func (m *NocRootCertificatesByVidAndSkid) XXX_Unmarshal(b []byte) error { +func (m *NocCertificatesByVidAndSkid) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NocRootCertificatesByVidAndSkid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *NocCertificatesByVidAndSkid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_NocRootCertificatesByVidAndSkid.Marshal(b, m, deterministic) + return xxx_messageInfo_NocCertificatesByVidAndSkid.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -53,47 +53,47 @@ func (m *NocRootCertificatesByVidAndSkid) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *NocRootCertificatesByVidAndSkid) XXX_Merge(src proto.Message) { - xxx_messageInfo_NocRootCertificatesByVidAndSkid.Merge(m, src) +func (m *NocCertificatesByVidAndSkid) XXX_Merge(src proto.Message) { + xxx_messageInfo_NocCertificatesByVidAndSkid.Merge(m, src) } -func (m *NocRootCertificatesByVidAndSkid) XXX_Size() int { +func (m *NocCertificatesByVidAndSkid) XXX_Size() int { return m.Size() } -func (m *NocRootCertificatesByVidAndSkid) XXX_DiscardUnknown() { - xxx_messageInfo_NocRootCertificatesByVidAndSkid.DiscardUnknown(m) +func (m *NocCertificatesByVidAndSkid) XXX_DiscardUnknown() { + xxx_messageInfo_NocCertificatesByVidAndSkid.DiscardUnknown(m) } -var xxx_messageInfo_NocRootCertificatesByVidAndSkid proto.InternalMessageInfo +var xxx_messageInfo_NocCertificatesByVidAndSkid proto.InternalMessageInfo -func (m *NocRootCertificatesByVidAndSkid) GetVid() int32 { +func (m *NocCertificatesByVidAndSkid) GetVid() int32 { if m != nil { return m.Vid } return 0 } -func (m *NocRootCertificatesByVidAndSkid) GetSubjectKeyId() string { +func (m *NocCertificatesByVidAndSkid) GetSubjectKeyId() string { if m != nil { return m.SubjectKeyId } return "" } -func (m *NocRootCertificatesByVidAndSkid) GetCerts() []*Certificate { +func (m *NocCertificatesByVidAndSkid) GetCerts() []*Certificate { if m != nil { return m.Certs } return nil } -func (m *NocRootCertificatesByVidAndSkid) GetTq() float32 { +func (m *NocCertificatesByVidAndSkid) GetTq() float32 { if m != nil { return m.Tq } return 0 } -func (m *NocRootCertificatesByVidAndSkid) GetSchemaVersion() uint32 { +func (m *NocCertificatesByVidAndSkid) GetSchemaVersion() uint32 { if m != nil { return m.SchemaVersion } @@ -101,42 +101,41 @@ func (m *NocRootCertificatesByVidAndSkid) GetSchemaVersion() uint32 { } func init() { - proto.RegisterType((*NocRootCertificatesByVidAndSkid)(nil), "zigbeealliance.distributedcomplianceledger.pki.NocRootCertificatesByVidAndSkid") + proto.RegisterType((*NocCertificatesByVidAndSkid)(nil), "zigbeealliance.distributedcomplianceledger.pki.NocCertificatesByVidAndSkid") } func init() { - proto.RegisterFile("zigbeealliance/distributedcomplianceledger/pki/noc_root_certificates_by_vid_and_skid.proto", fileDescriptor_f3e80b73a145a96e) + proto.RegisterFile("zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_and_skid.proto", fileDescriptor_464c9454e8b60e07) } -var fileDescriptor_f3e80b73a145a96e = []byte{ - // 371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xc1, 0x4a, 0xe3, 0x40, - 0x18, 0xc7, 0x3b, 0xe9, 0x76, 0x61, 0xb3, 0xdb, 0x3d, 0x84, 0x3d, 0x84, 0x1e, 0xd2, 0x10, 0xf6, - 0x90, 0xc3, 0x36, 0x59, 0x2d, 0xf5, 0xa0, 0x14, 0xb4, 0x7a, 0x11, 0x41, 0x30, 0x42, 0x0f, 0x3d, - 0x18, 0x92, 0x99, 0xcf,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x93, 0xf0, 0x06, 0xa8, 0x3c, - 0x83, 0xe2, 0x94, 0xe9, 0x8a, 0x49, 0xec, 0x1f, 0xde, 0xc6, 0xa6, 0x5d, 0xa8, 0xb5, 0xa5, 0x8e, - 0xd0, 0xab, 0x66, 0xd5, 0xfe, 0xb9, 0x7b, 0xb0, 0x65, 0x11, 0x67, 0x4d, 0xd7, 0x2b, 0x49, 0xda, - 0x6f, 0x55, 0x91, 0x63, 0xfd, 0x9b, 0x49, 0x6c, 0xc5, 0x53, 0xe4, 0x58, 0xfb, 0xab, 0xd6, 0x05, - 0x1d, 0xc2, 0x28, 0xe8, 0x43, 0x2e, 0x90, 0xa7, 0x7a, 0xcd, 0x24, 0x76, 0xdd, 0xdb, 0x1c, 0x7b, - 0x57, 0x8f, 0x73, 0x83, 0xcc, 0xe6, 0x06, 0x79, 0x99, 0x1b, 0xe4, 0x61, 0x61, 0x54, 0x66, 0x0b, - 0xa3, 0xf2, 0xb4, 0x30, 0x2a, 0x83, 0x93, 0x08, 0xe5, 0x70, 0x12, 0x3a, 0x94, 0x8f, 0xdc, 0xd2, - 0xae, 0xf5, 0x59, 0xea, 0xd6, 0x87, 0x5f, 0xeb, 0x3d, 0xf6, 0xed, 0x2a, 0xb7, 0x2c, 0x32, 0x10, - 0xe1, 0xf7, 0x55, 0xe9, 0xf6, 0x5b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0xd2, 0xcd, 0x04, 0x4f, - 0x02, 0x00, 0x00, +var fileDescriptor_464c9454e8b60e07 = []byte{ + // 364 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0x41, 0x4b, 0xe3, 0x40, + 0x18, 0x86, 0x3b, 0xe9, 0x76, 0x61, 0xb3, 0xdb, 0x3d, 0x84, 0x3d, 0x84, 0x2e, 0x64, 0x43, 0xd8, + 0x43, 0x0e, 0x36, 0x51, 0x4b, 0x3d, 0x28,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 0xe6, 0x5f, + 0x35, 0x4b, 0xfd, 0x25, 0x46, 0xe1, 0x0d, 0x50, 0x79, 0x02, 0xc5, 0x31, 0xd3, 0x15, 0x93, 0xd8, + 0x3f, 0xbc, 0x95, 0x4d, 0x3b, 0x53, 0x6b, 0x73, 0x15, 0xa1, 0x57, 0xcd, 0xaa, 0xfd, 0x73, 0x7b, + 0x6f, 0xcd, 0x1a, 0xce, 0x92, 0xae, 0x57, 0x92, 0xb4, 0xdf, 0xaa, 0x22, 0x87, 0xfa, 0x37, 0x93, + 0xd8, 0x8a, 0xa7, 0xc8, 0xa1, 0xf6, 0x5f, 0xad, 0x0b, 0xda, 0x87, 0x41, 0xd0, 0x83, 0x5c, 0x20, + 0x4f, 0xf5, 0x9a, 0x49, 0xec, 0xba, 0xb7, 0x3a, 0x76, 0xaf, 0x1e, 0xa6, 0x06, 0x99, 0x4c, 0x0d, + 0xf2, 0x3c, 0x35, 0xc8, 0xfd, 0xcc, 0xa8, 0x4c, 0x66, 0x46, 0xe5, 0x71, 0x66, 0x54, 0x2e, 0x8f, + 0x22, 0x94, 0xfd, 0x51, 0xe8, 0x50, 0x3e, 0x70, 0x4b, 0xbb, 0xe6, 0x67, 0x99, 0x9b, 0x1f, 0x7e, + 0xcd, 0xf7, 0xd0, 0xb7, 0x8b, 0xd4, 0xb2, 0xc8, 0x40, 0x84, 0xdf, 0x17, 0x95, 0x5b, 0x6f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xd8, 0xe2, 0x85, 0x0e, 0x46, 0x02, 0x00, 0x00, } -func (m *NocRootCertificatesByVidAndSkid) Marshal() (dAtA []byte, err error) { +func (m *NocCertificatesByVidAndSkid) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -146,18 +145,18 @@ func (m *NocRootCertificatesByVidAndSkid) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NocRootCertificatesByVidAndSkid) MarshalTo(dAtA []byte) (int, error) { +func (m *NocCertificatesByVidAndSkid) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NocRootCertificatesByVidAndSkid) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *NocCertificatesByVidAndSkid) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.SchemaVersion != 0 { - i = encodeVarintNocRootCertificatesByVidAndSkid(dAtA, i, uint64(m.SchemaVersion)) + i = encodeVarintNocCertificatesByVidAndSkid(dAtA, i, uint64(m.SchemaVersion)) i-- dAtA[i] = 0x28 } @@ -175,7 +174,7 @@ func (m *NocRootCertificatesByVidAndSkid) MarshalToSizedBuffer(dAtA []byte) (int return 0, err } i -= size - i = encodeVarintNocRootCertificatesByVidAndSkid(dAtA, i, uint64(size)) + i = encodeVarintNocCertificatesByVidAndSkid(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -184,20 +183,20 @@ func (m *NocRootCertificatesByVidAndSkid) MarshalToSizedBuffer(dAtA []byte) (int if len(m.SubjectKeyId) > 0 { i -= len(m.SubjectKeyId) copy(dAtA[i:], m.SubjectKeyId) - i = encodeVarintNocRootCertificatesByVidAndSkid(dAtA, i, uint64(len(m.SubjectKeyId))) + i = encodeVarintNocCertificatesByVidAndSkid(dAtA, i, uint64(len(m.SubjectKeyId))) i-- dAtA[i] = 0x12 } if m.Vid != 0 { - i = encodeVarintNocRootCertificatesByVidAndSkid(dAtA, i, uint64(m.Vid)) + i = encodeVarintNocCertificatesByVidAndSkid(dAtA, i, uint64(m.Vid)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintNocRootCertificatesByVidAndSkid(dAtA []byte, offset int, v uint64) int { - offset -= sovNocRootCertificatesByVidAndSkid(v) +func encodeVarintNocCertificatesByVidAndSkid(dAtA []byte, offset int, v uint64) int { + offset -= sovNocCertificatesByVidAndSkid(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -207,41 +206,41 @@ func encodeVarintNocRootCertificatesByVidAndSkid(dAtA []byte, offset int, v uint dAtA[offset] = uint8(v) return base } -func (m *NocRootCertificatesByVidAndSkid) Size() (n int) { +func (m *NocCertificatesByVidAndSkid) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Vid != 0 { - n += 1 + sovNocRootCertificatesByVidAndSkid(uint64(m.Vid)) + n += 1 + sovNocCertificatesByVidAndSkid(uint64(m.Vid)) } l = len(m.SubjectKeyId) if l > 0 { - n += 1 + l + sovNocRootCertificatesByVidAndSkid(uint64(l)) + n += 1 + l + sovNocCertificatesByVidAndSkid(uint64(l)) } if len(m.Certs) > 0 { for _, e := range m.Certs { l = e.Size() - n += 1 + l + sovNocRootCertificatesByVidAndSkid(uint64(l)) + n += 1 + l + sovNocCertificatesByVidAndSkid(uint64(l)) } } if m.Tq != 0 { n += 5 } if m.SchemaVersion != 0 { - n += 1 + sovNocRootCertificatesByVidAndSkid(uint64(m.SchemaVersion)) + n += 1 + sovNocCertificatesByVidAndSkid(uint64(m.SchemaVersion)) } return n } -func sovNocRootCertificatesByVidAndSkid(x uint64) (n int) { +func sovNocCertificatesByVidAndSkid(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozNocRootCertificatesByVidAndSkid(x uint64) (n int) { - return sovNocRootCertificatesByVidAndSkid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozNocCertificatesByVidAndSkid(x uint64) (n int) { + return sovNocCertificatesByVidAndSkid(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { +func (m *NocCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -249,7 +248,7 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowNocRootCertificatesByVidAndSkid + return ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -264,10 +263,10 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NocRootCertificatesByVidAndSkid: wiretype end group for non-group") + return fmt.Errorf("proto: NocCertificatesByVidAndSkid: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NocRootCertificatesByVidAndSkid: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NocCertificatesByVidAndSkid: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -277,7 +276,7 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { m.Vid = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowNocRootCertificatesByVidAndSkid + return ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -296,7 +295,7 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowNocRootCertificatesByVidAndSkid + return ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -310,11 +309,11 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthNocRootCertificatesByVidAndSkid + return ErrInvalidLengthNocCertificatesByVidAndSkid } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthNocRootCertificatesByVidAndSkid + return ErrInvalidLengthNocCertificatesByVidAndSkid } if postIndex > l { return io.ErrUnexpectedEOF @@ -328,7 +327,7 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowNocRootCertificatesByVidAndSkid + return ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -341,11 +340,11 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthNocRootCertificatesByVidAndSkid + return ErrInvalidLengthNocCertificatesByVidAndSkid } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthNocRootCertificatesByVidAndSkid + return ErrInvalidLengthNocCertificatesByVidAndSkid } if postIndex > l { return io.ErrUnexpectedEOF @@ -373,7 +372,7 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { m.SchemaVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowNocRootCertificatesByVidAndSkid + return ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -387,12 +386,12 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipNocRootCertificatesByVidAndSkid(dAtA[iNdEx:]) + skippy, err := skipNocCertificatesByVidAndSkid(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthNocRootCertificatesByVidAndSkid + return ErrInvalidLengthNocCertificatesByVidAndSkid } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -406,7 +405,7 @@ func (m *NocRootCertificatesByVidAndSkid) Unmarshal(dAtA []byte) error { } return nil } -func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { +func skipNocCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -414,7 +413,7 @@ func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowNocRootCertificatesByVidAndSkid + return 0, ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -431,7 +430,7 @@ func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowNocRootCertificatesByVidAndSkid + return 0, ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -447,7 +446,7 @@ func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowNocRootCertificatesByVidAndSkid + return 0, ErrIntOverflowNocCertificatesByVidAndSkid } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -460,14 +459,14 @@ func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthNocRootCertificatesByVidAndSkid + return 0, ErrInvalidLengthNocCertificatesByVidAndSkid } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupNocRootCertificatesByVidAndSkid + return 0, ErrUnexpectedEndOfGroupNocCertificatesByVidAndSkid } depth-- case 5: @@ -476,7 +475,7 @@ func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthNocRootCertificatesByVidAndSkid + return 0, ErrInvalidLengthNocCertificatesByVidAndSkid } if depth == 0 { return iNdEx, nil @@ -486,7 +485,7 @@ func skipNocRootCertificatesByVidAndSkid(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthNocRootCertificatesByVidAndSkid = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNocRootCertificatesByVidAndSkid = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupNocRootCertificatesByVidAndSkid = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthNocCertificatesByVidAndSkid = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNocCertificatesByVidAndSkid = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNocCertificatesByVidAndSkid = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/pki/types/query.pb.go b/x/pki/types/query.pb.go index eac07552f..5c39914aa 100644 --- a/x/pki/types/query.pb.go +++ b/x/pki/types/query.pb.go @@ -2271,27 +2271,27 @@ func (m *QueryAllRevokedNocRootCertificatesResponse) GetPagination() *query.Page return nil } -type QueryGetNocRootCertificatesByVidAndSkidRequest struct { +type QueryGetNocCertificatesByVidAndSkidRequest struct { Vid int32 `protobuf:"varint,1,opt,name=vid,proto3" json:"vid,omitempty"` SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"` } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Reset() { - *m = QueryGetNocRootCertificatesByVidAndSkidRequest{} +func (m *QueryGetNocCertificatesByVidAndSkidRequest) Reset() { + *m = QueryGetNocCertificatesByVidAndSkidRequest{} } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) String() string { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetNocRootCertificatesByVidAndSkidRequest) ProtoMessage() {} -func (*QueryGetNocRootCertificatesByVidAndSkidRequest) Descriptor() ([]byte, []int) { +func (*QueryGetNocCertificatesByVidAndSkidRequest) ProtoMessage() {} +func (*QueryGetNocCertificatesByVidAndSkidRequest) Descriptor() ([]byte, []int) { return fileDescriptor_db6ffa8ae459ba1c, []int{46} } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2301,52 +2301,52 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) XXX_Marshal(b []byte, d return b[:n], nil } } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidRequest.Merge(m, src) +func (m *QueryGetNocCertificatesByVidAndSkidRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidRequest.Merge(m, src) } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) XXX_Size() int { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) XXX_Size() int { return m.Size() } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidRequest.DiscardUnknown(m) +func (m *QueryGetNocCertificatesByVidAndSkidRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidRequest proto.InternalMessageInfo -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) GetVid() int32 { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) GetVid() int32 { if m != nil { return m.Vid } return 0 } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) GetSubjectKeyId() string { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) GetSubjectKeyId() string { if m != nil { return m.SubjectKeyId } return "" } -type QueryGetNocRootCertificatesByVidAndSkidResponse struct { - NocRootCertificatesByVidAndSkid NocRootCertificatesByVidAndSkid `protobuf:"bytes,1,opt,name=nocRootCertificatesByVidAndSkid,proto3" json:"nocRootCertificatesByVidAndSkid"` +type QueryGetNocCertificatesByVidAndSkidResponse struct { + NocCertificatesByVidAndSkid NocCertificatesByVidAndSkid `protobuf:"bytes,1,opt,name=nocCertificatesByVidAndSkid,proto3" json:"nocCertificatesByVidAndSkid"` } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Reset() { - *m = QueryGetNocRootCertificatesByVidAndSkidResponse{} +func (m *QueryGetNocCertificatesByVidAndSkidResponse) Reset() { + *m = QueryGetNocCertificatesByVidAndSkidResponse{} } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) String() string { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetNocRootCertificatesByVidAndSkidResponse) ProtoMessage() {} -func (*QueryGetNocRootCertificatesByVidAndSkidResponse) Descriptor() ([]byte, []int) { +func (*QueryGetNocCertificatesByVidAndSkidResponse) ProtoMessage() {} +func (*QueryGetNocCertificatesByVidAndSkidResponse) Descriptor() ([]byte, []int) { return fileDescriptor_db6ffa8ae459ba1c, []int{47} } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2356,23 +2356,23 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) XXX_Marshal(b []byte, return b[:n], nil } } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidResponse.Merge(m, src) +func (m *QueryGetNocCertificatesByVidAndSkidResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidResponse.Merge(m, src) } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) XXX_Size() int { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) XXX_Size() int { return m.Size() } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidResponse.DiscardUnknown(m) +func (m *QueryGetNocCertificatesByVidAndSkidResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryGetNocRootCertificatesByVidAndSkidResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGetNocCertificatesByVidAndSkidResponse proto.InternalMessageInfo -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) GetNocRootCertificatesByVidAndSkid() NocRootCertificatesByVidAndSkid { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) GetNocCertificatesByVidAndSkid() NocCertificatesByVidAndSkid { if m != nil { - return m.NocRootCertificatesByVidAndSkid + return m.NocCertificatesByVidAndSkid } - return NocRootCertificatesByVidAndSkid{} + return NocCertificatesByVidAndSkid{} } func init() { @@ -2422,8 +2422,8 @@ func init() { proto.RegisterType((*QueryGetRevokedNocRootCertificatesResponse)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryGetRevokedNocRootCertificatesResponse") proto.RegisterType((*QueryAllRevokedNocRootCertificatesRequest)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryAllRevokedNocRootCertificatesRequest") proto.RegisterType((*QueryAllRevokedNocRootCertificatesResponse)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryAllRevokedNocRootCertificatesResponse") - proto.RegisterType((*QueryGetNocRootCertificatesByVidAndSkidRequest)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryGetNocRootCertificatesByVidAndSkidRequest") - proto.RegisterType((*QueryGetNocRootCertificatesByVidAndSkidResponse)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryGetNocRootCertificatesByVidAndSkidResponse") + proto.RegisterType((*QueryGetNocCertificatesByVidAndSkidRequest)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryGetNocCertificatesByVidAndSkidRequest") + proto.RegisterType((*QueryGetNocCertificatesByVidAndSkidResponse)(nil), "zigbeealliance.distributedcomplianceledger.pki.QueryGetNocCertificatesByVidAndSkidResponse") } func init() { @@ -2431,141 +2431,141 @@ func init() { } var fileDescriptor_db6ffa8ae459ba1c = []byte{ - // 2131 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x4d, 0x8c, 0x23, 0x47, - 0x15, 0xde, 0x6a, 0xb3, 0x41, 0x14, 0x08, 0x91, 0xda, 0xcd, 0xee, 0x60, 0x65, 0x3c, 0xbb, 0x95, - 0xcd, 0xec, 0x4f, 0x32, 0xee, 0x4c, 0x46, 0xbb, 0xcb, 0x8f, 0xc2, 0x6a, 0x7e, 0x60, 0x32, 0x8b, - 0x98, 0xcc, 0x78, 0xc2, 0x86, 0xac, 0xc2, 0x5a, 0xed, 0x76, 0xc7, 0xdb, 0xb8, 0xc7, 0xdd, 0xe9, - 0x6e, 0x0f, 0x31, 0xa3, 0x41, 0x02, 0x89, 0x04, 0x71, 0x5a, 0x7e, 0x0e, 0x80, 0x22, 0x22, 0x11, - 0x29, 0xe2, 0xce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c, 0xdb, 0x6d, 0x54, 0x4d, 0x77, 0x57, 0x8f, 0xd7, 0xbb, 0xc0, 0xfb, 0x47, - 0xda, 0x42, 0xb2, 0xe2, 0x05, 0xf8, 0x4f, 0xda, 0xcb, 0x4c, 0x6f, 0xd8, 0xf3, 0xac, 0xa0, 0xf1, - 0x00, 0xfb, 0x17, 0xd9, 0xd2, 0x07, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x67, 0x34, 0x90, 0x03, - 0x3c, 0x00, 0x00, + // 2133 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x9b, 0x4d, 0x8c, 0x1c, 0x47, + 0x15, 0x80, 0x5d, 0x3d, 0x38, 0x88, 0x02, 0x21, 0x52, 0x76, 0xec, 0x65, 0x92, 0x5d, 0xdb, 0x15, + 0x67, 0xfd, 0x97, 0x9d, 0x8e, 0x63, 0xd9, 0xe6, 0x47, 0xc1, 0xda, 0xf5, 0xc2, 0x66, 0x1d, 0xb1, + 0xd8, 0xb3, 0x89, 0x43, 0x4c, 0xc8, 0xa8, 0xa7, 0xa7, 0x19, 0x37, 0xd3, 0x3b, 0xdd, 0xe9, 0xee, + 0x59, 0x32, 0xac, 0x16, 0x09, 0x24, 0x12, 0xc4, 0xc9, 0x60, 0x0e, 0x80, 0x22, 0x0e, 0x44, 0x8a, + 0xb8, 0x73, 0xe0, 0xc8, 0x81, 0x4b, 0x24, 0x0e, 0x44, 0xe2, 0x00, 0x12, 0x08, 0x21, 0x1b, 0x04, + 0x28, 0x91, 0x10, 0x17, 0x10, 0x17, 0x88, 0xba, 0xfa, 0xcd, 0x76, 0xcf, 0x74, 0x55, 0x4d, 0x4f, + 0x4d, 0xcd, 0xe6, 0x36, 0x33, 0x5d, 0xfd, 0x5e, 0xbd, 0xef, 0xbd, 0x7a, 0xf5, 0xaa, 0xde, 0x2e, + 0xfe, 0xd4, 0xd7, 0xdd, 0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ference imports to suppress errors if they are not otherwise used. @@ -2616,8 +2616,8 @@ type QueryClient interface { PkiRevocationDistributionPointsByIssuerSubjectKeyID(ctx context.Context, in *QueryGetPkiRevocationDistributionPointsByIssuerSubjectKeyIDRequest, opts ...grpc.CallOption) (*QueryGetPkiRevocationDistributionPointsByIssuerSubjectKeyIDResponse, error) // Queries a NocRootCertificates by index. NocRootCertificates(ctx context.Context, in *QueryGetNocRootCertificatesRequest, opts ...grpc.CallOption) (*QueryGetNocRootCertificatesResponse, error) - // Queries a NocRootCertificatesByVidAndSkid by index. - NocRootCertificatesByVidAndSkid(ctx context.Context, in *QueryGetNocRootCertificatesByVidAndSkidRequest, opts ...grpc.CallOption) (*QueryGetNocRootCertificatesByVidAndSkidResponse, error) + // Queries a NocCertificatesByVidAndSkid by index. + NocCertificatesByVidAndSkid(ctx context.Context, in *QueryGetNocCertificatesByVidAndSkidRequest, opts ...grpc.CallOption) (*QueryGetNocCertificatesByVidAndSkidResponse, error) // Queries a list of NocRootCertificates items. NocRootCertificatesAll(ctx context.Context, in *QueryAllNocRootCertificatesRequest, opts ...grpc.CallOption) (*QueryAllNocRootCertificatesResponse, error) // Queries a NocIcaCertificates by index. @@ -2800,9 +2800,9 @@ func (c *queryClient) NocRootCertificates(ctx context.Context, in *QueryGetNocRo return out, nil } -func (c *queryClient) NocRootCertificatesByVidAndSkid(ctx context.Context, in *QueryGetNocRootCertificatesByVidAndSkidRequest, opts ...grpc.CallOption) (*QueryGetNocRootCertificatesByVidAndSkidResponse, error) { - out := new(QueryGetNocRootCertificatesByVidAndSkidResponse) - err := c.cc.Invoke(ctx, "/zigbeealliance.distributedcomplianceledger.pki.Query/NocRootCertificatesByVidAndSkid", in, out, opts...) +func (c *queryClient) NocCertificatesByVidAndSkid(ctx context.Context, in *QueryGetNocCertificatesByVidAndSkidRequest, opts ...grpc.CallOption) (*QueryGetNocCertificatesByVidAndSkidResponse, error) { + out := new(QueryGetNocCertificatesByVidAndSkidResponse) + err := c.cc.Invoke(ctx, "/zigbeealliance.distributedcomplianceledger.pki.Query/NocCertificatesByVidAndSkid", in, out, opts...) if err != nil { return nil, err } @@ -2892,8 +2892,8 @@ type QueryServer interface { PkiRevocationDistributionPointsByIssuerSubjectKeyID(context.Context, *QueryGetPkiRevocationDistributionPointsByIssuerSubjectKeyIDRequest) (*QueryGetPkiRevocationDistributionPointsByIssuerSubjectKeyIDResponse, error) // Queries a NocRootCertificates by index. NocRootCertificates(context.Context, *QueryGetNocRootCertificatesRequest) (*QueryGetNocRootCertificatesResponse, error) - // Queries a NocRootCertificatesByVidAndSkid by index. - NocRootCertificatesByVidAndSkid(context.Context, *QueryGetNocRootCertificatesByVidAndSkidRequest) (*QueryGetNocRootCertificatesByVidAndSkidResponse, error) + // Queries a NocCertificatesByVidAndSkid by index. + NocCertificatesByVidAndSkid(context.Context, *QueryGetNocCertificatesByVidAndSkidRequest) (*QueryGetNocCertificatesByVidAndSkidResponse, error) // Queries a list of NocRootCertificates items. NocRootCertificatesAll(context.Context, *QueryAllNocRootCertificatesRequest) (*QueryAllNocRootCertificatesResponse, error) // Queries a NocIcaCertificates by index. @@ -2964,8 +2964,8 @@ func (*UnimplementedQueryServer) PkiRevocationDistributionPointsByIssuerSubjectK func (*UnimplementedQueryServer) NocRootCertificates(ctx context.Context, req *QueryGetNocRootCertificatesRequest) (*QueryGetNocRootCertificatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NocRootCertificates not implemented") } -func (*UnimplementedQueryServer) NocRootCertificatesByVidAndSkid(ctx context.Context, req *QueryGetNocRootCertificatesByVidAndSkidRequest) (*QueryGetNocRootCertificatesByVidAndSkidResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NocRootCertificatesByVidAndSkid not implemented") +func (*UnimplementedQueryServer) NocCertificatesByVidAndSkid(ctx context.Context, req *QueryGetNocCertificatesByVidAndSkidRequest) (*QueryGetNocCertificatesByVidAndSkidResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NocCertificatesByVidAndSkid not implemented") } func (*UnimplementedQueryServer) NocRootCertificatesAll(ctx context.Context, req *QueryAllNocRootCertificatesRequest) (*QueryAllNocRootCertificatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NocRootCertificatesAll not implemented") @@ -3311,20 +3311,20 @@ func _Query_NocRootCertificates_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } -func _Query_NocRootCertificatesByVidAndSkid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetNocRootCertificatesByVidAndSkidRequest) +func _Query_NocCertificatesByVidAndSkid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetNocCertificatesByVidAndSkidRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).NocRootCertificatesByVidAndSkid(ctx, in) + return srv.(QueryServer).NocCertificatesByVidAndSkid(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/zigbeealliance.distributedcomplianceledger.pki.Query/NocRootCertificatesByVidAndSkid", + FullMethod: "/zigbeealliance.distributedcomplianceledger.pki.Query/NocCertificatesByVidAndSkid", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NocRootCertificatesByVidAndSkid(ctx, req.(*QueryGetNocRootCertificatesByVidAndSkidRequest)) + return srv.(QueryServer).NocCertificatesByVidAndSkid(ctx, req.(*QueryGetNocCertificatesByVidAndSkidRequest)) } return interceptor(ctx, in, info, handler) } @@ -3496,8 +3496,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_NocRootCertificates_Handler, }, { - MethodName: "NocRootCertificatesByVidAndSkid", - Handler: _Query_NocRootCertificatesByVidAndSkid_Handler, + MethodName: "NocCertificatesByVidAndSkid", + Handler: _Query_NocCertificatesByVidAndSkid_Handler, }, { MethodName: "NocRootCertificatesAll", @@ -5219,7 +5219,7 @@ func (m *QueryAllRevokedNocRootCertificatesResponse) MarshalToSizedBuffer(dAtA [ return len(dAtA) - i, nil } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5229,12 +5229,12 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Marshal() (dAtA []byte, return dAtA[:n], nil } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -5254,7 +5254,7 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) MarshalToSizedBuffer(dA return len(dAtA) - i, nil } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5264,18 +5264,18 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Marshal() (dAtA []byte return dAtA[:n], nil } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.NocRootCertificatesByVidAndSkid.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.NocCertificatesByVidAndSkid.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -5955,7 +5955,7 @@ func (m *QueryAllRevokedNocRootCertificatesResponse) Size() (n int) { return n } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Size() (n int) { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) Size() (n int) { if m == nil { return 0 } @@ -5971,13 +5971,13 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Size() (n int) { return n } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Size() (n int) { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.NocRootCertificatesByVidAndSkid.Size() + l = m.NocCertificatesByVidAndSkid.Size() n += 1 + l + sovQuery(uint64(l)) return n } @@ -10401,7 +10401,7 @@ func (m *QueryAllRevokedNocRootCertificatesResponse) Unmarshal(dAtA []byte) erro } return nil } -func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetNocCertificatesByVidAndSkidRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10424,10 +10424,10 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Unmarshal(dAtA []byte) fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetNocRootCertificatesByVidAndSkidRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetNocCertificatesByVidAndSkidRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetNocRootCertificatesByVidAndSkidRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetNocCertificatesByVidAndSkidRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -10502,7 +10502,7 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidRequest) Unmarshal(dAtA []byte) } return nil } -func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetNocCertificatesByVidAndSkidResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10525,15 +10525,15 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Unmarshal(dAtA []byte) fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetNocRootCertificatesByVidAndSkidResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetNocCertificatesByVidAndSkidResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetNocRootCertificatesByVidAndSkidResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetNocCertificatesByVidAndSkidResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NocRootCertificatesByVidAndSkid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NocCertificatesByVidAndSkid", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10560,7 +10560,7 @@ func (m *QueryGetNocRootCertificatesByVidAndSkidResponse) Unmarshal(dAtA []byte) if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.NocRootCertificatesByVidAndSkid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NocCertificatesByVidAndSkid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/pki/types/query.pb.gw.go b/x/pki/types/query.pb.gw.go index 8f5f0df02..cb97296dd 100644 --- a/x/pki/types/query.pb.gw.go +++ b/x/pki/types/query.pb.gw.go @@ -1019,8 +1019,8 @@ func local_request_Query_NocRootCertificates_0(ctx context.Context, marshaler ru } -func request_Query_NocRootCertificatesByVidAndSkid_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetNocRootCertificatesByVidAndSkidRequest +func request_Query_NocCertificatesByVidAndSkid_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetNocCertificatesByVidAndSkidRequest var metadata runtime.ServerMetadata var ( @@ -1052,13 +1052,13 @@ func request_Query_NocRootCertificatesByVidAndSkid_0(ctx context.Context, marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subjectKeyId", err) } - msg, err := client.NocRootCertificatesByVidAndSkid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.NocCertificatesByVidAndSkid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_NocRootCertificatesByVidAndSkid_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetNocRootCertificatesByVidAndSkidRequest +func local_request_Query_NocCertificatesByVidAndSkid_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetNocCertificatesByVidAndSkidRequest var metadata runtime.ServerMetadata var ( @@ -1090,7 +1090,7 @@ func local_request_Query_NocRootCertificatesByVidAndSkid_0(ctx context.Context, return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subjectKeyId", err) } - msg, err := server.NocRootCertificatesByVidAndSkid(ctx, &protoReq) + msg, err := server.NocCertificatesByVidAndSkid(ctx, &protoReq) return msg, metadata, err } @@ -1753,7 +1753,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_NocRootCertificatesByVidAndSkid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_NocCertificatesByVidAndSkid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -1764,7 +1764,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_NocRootCertificatesByVidAndSkid_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_NocCertificatesByVidAndSkid_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -1772,7 +1772,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_NocRootCertificatesByVidAndSkid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_NocCertificatesByVidAndSkid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -2292,7 +2292,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_NocRootCertificatesByVidAndSkid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_NocCertificatesByVidAndSkid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -2301,14 +2301,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_NocRootCertificatesByVidAndSkid_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_NocCertificatesByVidAndSkid_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_NocRootCertificatesByVidAndSkid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_NocCertificatesByVidAndSkid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -2452,7 +2452,7 @@ var ( pattern_Query_NocRootCertificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"dcl", "pki", "noc-root-certificates", "vid"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_NocRootCertificatesByVidAndSkid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"dcl", "pki", "noc-root-certificates", "vid", "subjectKeyId"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_NocCertificatesByVidAndSkid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"dcl", "pki", "noc-root-certificates", "vid", "subjectKeyId"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_NocRootCertificatesAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dcl", "pki", "noc-root-certificates"}, "", runtime.AssumeColonVerbOpt(false))) @@ -2502,7 +2502,7 @@ var ( forward_Query_NocRootCertificates_0 = runtime.ForwardResponseMessage - forward_Query_NocRootCertificatesByVidAndSkid_0 = runtime.ForwardResponseMessage + forward_Query_NocCertificatesByVidAndSkid_0 = runtime.ForwardResponseMessage forward_Query_NocRootCertificatesAll_0 = runtime.ForwardResponseMessage From feb544383173b8359e00492a108513b293e11e59 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Wed, 24 Jul 2024 19:31:55 +0300 Subject: [PATCH 02/16] ignite rebuilt Signed-off-by: DenisRybas --- x/pki/types/query.pb.go | 270 ++++++++++++++++++------------------- x/pki/types/query.pb.gw.go | 2 +- 2 files changed, 136 insertions(+), 136 deletions(-) diff --git a/x/pki/types/query.pb.go b/x/pki/types/query.pb.go index 5c39914aa..8af0085bc 100644 --- a/x/pki/types/query.pb.go +++ b/x/pki/types/query.pb.go @@ -2431,141 +2431,141 @@ func init() { } var fileDescriptor_db6ffa8ae459ba1c = []byte{ - // 2133 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x9b, 0x4d, 0x8c, 0x1c, 0x47, - 0x15, 0x80, 0x5d, 0x3d, 0x38, 0x88, 0x02, 0x21, 0x52, 0x76, 0xec, 0x65, 0x92, 0x5d, 0xdb, 0x15, - 0x67, 0xfd, 0x97, 0x9d, 0x8e, 0x63, 0xd9, 0xe6, 0x47, 0xc1, 0xda, 0xf5, 0xc2, 0x66, 0x1d, 0xb1, - 0xd8, 0xb3, 0x89, 0x43, 0x4c, 0xc8, 0xa8, 0xa7, 0xa7, 0x19, 0x37, 0xd3, 0x3b, 0xdd, 0xe9, 0xee, - 0x59, 0x32, 0xac, 0x16, 0x09, 0x24, 0x12, 0xc4, 0xc9, 0x60, 0x0e, 0x80, 0x22, 0x0e, 0x44, 0x8a, - 0xb8, 0x73, 0xe0, 0xc8, 0x81, 0x4b, 0x24, 0x0e, 0x44, 0xe2, 0x00, 0x12, 0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ce, 0x77, 0x89, - 0xf7, 0xcf, 0x66, 0x4b, 0xd9, 0x8c, 0x97, 0xe0, 0xdf, 0xcd, 0x5e, 0x61, 0x7a, 0xe3, 0x7e, 0xe0, - 0x44, 0xcd, 0x07, 0xd8, 0x7f, 0x89, 0x5d, 0x78, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x30, 0xcd, 0xd6, - 0x17, 0xde, 0x3b, 0x00, 0x00, + // 2131 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x4d, 0x8c, 0x23, 0x47, + 0x15, 0xde, 0x6a, 0xb3, 0x41, 0x14, 0x08, 0x91, 0xda, 0xcd, 0xee, 0xe0, 0x64, 0xbc, 0xbb, 0x95, + 0xcd, 0xec, 0xec, 0x6c, 0xc6, 0x9d, 0xc9, 0x2a, 0xbb, 0x80, 0x14, 0x56, 0xf3, 0x03, 0x93, 0xd9, + 0x88, 0x61, 0xc6, 0x93, 0x6c, 0xc8, 0x12, 0x62, 0xb5, 0xdb, 0x8d, 0xb7, 0x71, 0x8f, 0xbb, 0xd3, + 0xdd, 0x1e, 0x62, 0x46, 0x83, 0x04, 0x12, 0x09, 0xe2, 0x80, 0x16, 0xc2, 0x01, 0x50, 0xc4, 0x81, + 0x48, 0x11, 0x77, 0x0e, 0x1c, 0x39, 0x70, 0x89, 0xc4, 0x81, 0x48, 0x1c, 0x82, 0x84, 0x84, 0xd0, + 0x0e, 0x08, 0x50, 0x22, 0x21, 0x2e, 0x20, 0x2e, 0x10, 0x75, 0xf7, 0xf3, 0x74, 0xdb, 0x5d, 0x55, + 0x6e, 0x97, 0xcb, 0x93, 0x9b, 0xdd, 0x55, 0xfd, 0x5e, 0xbd, 0xef, 0x7d, 0xf5, 0xde, 0xab, 0x7a, + 0x36, 0xfe, 0xcc, 0x37, 0xec, 0x56, 0xc3, 0xb2, 0x0c, 0xc7, 0xb1, 0x8d, 0x8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, 0x57, 0x11, 0x3e, 0xeb, 0xb3, 0xe7, 0x80, 0x85, 0xeb, 0x92, 0x2c, 0xe0, 0x18, + 0xc8, 0xd3, 0x46, 0x9f, 0x4a, 0x13, 0x23, 0xb3, 0x08, 0xee, 0xed, 0x24, 0x7b, 0x7e, 0x64, 0xcc, + 0x18, 0x48, 0x68, 0x23, 0x44, 0x65, 0x42, 0xb1, 0x21, 0x9a, 0x29, 0x9b, 0xd0, 0x84, 0xea, 0xfb, + 0xa1, 0x58, 0xa8, 0x39, 0x7b, 0x56, 0xac, 0xc1, 0x75, 0x84, 0xfa, 0x10, 0xfa, 0x46, 0xe6, 0xac, + 0xc8, 0xd6, 0x92, 0x0d, 0x18, 0xb9, 0x71, 0xf9, 0x18, 0x9a, 0x13, 0x95, 0x06, 0x8c, 0xdc, 0x10, + 0xdd, 0xcd, 0x06, 0x35, 0x3e, 0x14, 0xaa, 0x82, 0xe8, 0x7b, 0x99, 0x33, 0xa0, 0x1c, 0x28, 0xa5, + 0xe9, 0x83, 0xa2, 0x2e, 0x8a, 0xbe, 0x9a, 0xad, 0x03, 0xdb, 0x76, 0x5a, 0x0d, 0xac, 0x65, 0xee, + 0x94, 0xb6, 0x5c, 0xbb, 0x73, 0xb4, 0x05, 0x3f, 0x81, 0x4b, 0x7b, 0x76, 0x33, 0x46, 0xf8, 0x64, + 0x2d, 0xfa, 0x48, 0x4e, 0xe3, 0x93, 0x8e, 0xd1, 0xb0, 0x1c, 0x20, 0x59, 0xf2, 0x85, 0x54, 0x31, + 0x49, 0x6a, 0xf8, 0x9d, 0x94, 0x73, 0x6b, 0x50, 0x8b, 0x32, 0x46, 0xe8, 0xef, 0x10, 0xae, 0x16, + 0x5d, 0x09, 0xb8, 0xe0, 0x75, 0x84, 0x2b, 0xe2, 0xa9, 0x40, 0x84, 0xcd, 0xb1, 0xab, 0x29, 0xa1, + 0x54, 0xf0, 0xcc, 0x08, 0xdd, 0xf4, 0xeb, 0x99, 0xe2, 0xb0, 0x10,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a, 0x6c, 0xe5, 0x23, 0xe4, 0xe1, 0x01, 0x2b, 0x6d, + 0xd3, 0x60, 0xf1, 0xfc, 0xaf, 0x08, 0x3f, 0x90, 0x97, 0x15, 0x79, 0x75, 0x7b, 0x02, 0x0f, 0x28, + 0xb5, 0x56, 0xd8, 0xa4, 0x62, 0x9c, 0x98, 0x58, 0xd6, 0x92, 0xd7, 0x35, 0x5c, 0xe6, 0xdf, 0xf2, + 0x93, 0xe7, 0x27, 0x2c, 0xf4, 0x05, 0x4c, 0xbe, 0x3d, 0x0d, 0xd1, 0x60, 0xfc, 0x7a, 0x6c, 0xfc, + 0x32, 0xb9, 0x91, 0x3b, 0x46, 0x70, 0x62, 0x1b, 0xaf, 0xae, 0x7c, 0x45, 0xc3, 0xb3, 0x7c, 0x7d, + 0x11, 0x1d, 0x9e, 0x9f, 0xf0, 0xb8, 0xab, 0x1c, 0xa1, 0x42, 0xfd, 0x22, 0x5a, 0x8d, 0x11, 0x9a, + 0x27, 0x73, 0xc5, 0x10, 0x5a, 0x79, 0xf1, 0xad, 0x7b, 0x15, 0xf4, 0xf6, 0xbd, 0x0a, 0xfa, 0xf3, + 0xbd, 0x0a, 0xba, 0x7b, 0x58, 0x39, 0xf1, 0xf6, 0x61, 0xe5, 0xc4, 0x1f, 0x0e, 0x2b, 0x27, 0x6e, + 0xaf, 0xb5, 0xec, 0xf0, 0x4e, 0xb7, 0x51, 0x35, 0xdd, 0x5d, 0x3d, 0x59, 0xef, 0x22, 0xeb, 0x7f, + 0x66, 0x8b, 0xe9, 0x8a, 0x17, 0xe1, 0x9f, 0x66, 0x2f, 0xc7, 0x7a, 0xc3, 0x9e, 0x67, 0x05, 0x8d, + 0xfb, 0xe2, 0x3f, 0x88, 0x5d, 0x7d, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x89, 0x78, 0x22, 0xeb, 0xd9, + 0x3b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/pki/types/query.pb.gw.go b/x/pki/types/query.pb.gw.go index cb97296dd..154327dae 100644 --- a/x/pki/types/query.pb.gw.go +++ b/x/pki/types/query.pb.gw.go @@ -2452,7 +2452,7 @@ var ( pattern_Query_NocRootCertificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"dcl", "pki", "noc-root-certificates", "vid"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_NocCertificatesByVidAndSkid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"dcl", "pki", "noc-root-certificates", "vid", "subjectKeyId"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_NocCertificatesByVidAndSkid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"dcl", "pki", "noc-certificates", "vid", "subjectKeyId"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_NocRootCertificatesAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dcl", "pki", "noc-root-certificates"}, "", runtime.AssumeColonVerbOpt(false))) From 4cf0b448579ef16bd2522d5fa26b67491097dd05 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Thu, 25 Jul 2024 11:34:16 +0300 Subject: [PATCH 03/16] added addNocCertByVidAndSkid to AddNocX509IcaCert Signed-off-by: DenisRybas --- x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go | 3 +++ x/pki/keeper/msg_server_add_noc_x_509_root_cert.go | 2 +- x/pki/keeper/noc_certificates_by_vid_and_skid.go | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go index c110883ef..c7a5fc557 100644 --- a/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go +++ b/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go @@ -122,6 +122,9 @@ func (k msgServer) AddNocX509IcaCert(goCtx context.Context, msg *types.MsgAddNoc } k.SetUniqueCertificate(ctx, uniqueCertificate) + // add to vid, subject -> certificates map + k.AddNocCertificateByVidAndSkid(ctx, certificate) + // add to subject -> subject key ID map k.AddApprovedCertificateBySubject(ctx, certificate.Subject, certificate.SubjectKeyId) diff --git a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go index 0642b11d6..2984e163f 100644 --- a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go @@ -99,7 +99,7 @@ func (k msgServer) AddNocX509RootCert(goCtx context.Context, msg *types.MsgAddNo k.SetUniqueCertificate(ctx, uniqueCertificate) // add to vid, subject -> certificates map - k.AddNocCertificatesByVidAndSkid(ctx, certificate) + k.AddNocCertificateByVidAndSkid(ctx, certificate) // add to subject -> subject key ID map k.AddApprovedCertificateBySubject(ctx, certificate.Subject, certificate.SubjectKeyId) diff --git a/x/pki/keeper/noc_certificates_by_vid_and_skid.go b/x/pki/keeper/noc_certificates_by_vid_and_skid.go index 205fc4878..5e9507460 100644 --- a/x/pki/keeper/noc_certificates_by_vid_and_skid.go +++ b/x/pki/keeper/noc_certificates_by_vid_and_skid.go @@ -40,8 +40,8 @@ func (k Keeper) GetNocCertificatesByVidAndSkid( return val, true } -// Add a NOC root certificate to the list of NOC root certificates for the VID map. -func (k Keeper) AddNocCertificatesByVidAndSkid(ctx sdk.Context, nocCertificate types.Certificate) { +// Add a NOC certificate to the list of NOC certificates for the VID map. +func (k Keeper) AddNocCertificateByVidAndSkid(ctx sdk.Context, nocCertificate types.Certificate) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) nocRootCertificatesByVidAndSkidKeyBytes := store.Get(types.NocCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId)) From 6d11230f6513208e2ac51ca72492aef4cb3af021 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Fri, 26 Jul 2024 00:13:28 +0300 Subject: [PATCH 04/16] processed comments + renamed variables Signed-off-by: DenisRybas --- .../grpc_rest/pki/noc_cert_helpers.go | 22 +++++++------- x/pki/genesis.go | 2 +- x/pki/handler_revoke_noc_root_cert_test.go | 14 ++++----- .../noc_certificates_by_vid_and_skid.go | 30 +++++++++---------- x/pki/types/genesis.go | 10 +++---- x/pki/types/genesis_test.go | 2 +- ...> key_noc_certificates_by_vid_and_skid.go} | 0 7 files changed, 40 insertions(+), 40 deletions(-) rename x/pki/types/{key_noc_root_certificates_by_vid_and_skid.go => key_noc_certificates_by_vid_and_skid.go} (100%) diff --git a/integration_tests/grpc_rest/pki/noc_cert_helpers.go b/integration_tests/grpc_rest/pki/noc_cert_helpers.go index 8423fcf90..15ebe35c3 100644 --- a/integration_tests/grpc_rest/pki/noc_cert_helpers.go +++ b/integration_tests/grpc_rest/pki/noc_cert_helpers.go @@ -106,7 +106,7 @@ func GetNocX509RootCerts(suite *utils.TestSuite, vendorID int32) (*pkitypes.NocR return &res, nil } -func GetNocX509RootCertsByVidAndSkid(suite *utils.TestSuite, vendorID int32, subjectKeyID string) (*pkitypes.NocCertificatesByVidAndSkid, error) { +func GetNocX509CertsByVidAndSkid(suite *utils.TestSuite, vendorID int32, subjectKeyID string) (*pkitypes.NocCertificatesByVidAndSkid, error) { var res pkitypes.NocCertificatesByVidAndSkid if suite.Rest { var resp pkitypes.QueryGetNocCertificatesByVidAndSkidResponse @@ -189,11 +189,11 @@ func NocCertDemo(suite *utils.TestSuite) { _, err := GetNocX509RootCerts(suite, testconstants.Vid) suite.AssertNotFound(err) - _, err = GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) suite.AssertNotFound(err) - _, err = GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert2SubjectKeyID) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert2SubjectKeyID) suite.AssertNotFound(err) - _, err = GetNocX509RootCertsByVidAndSkid(suite, vid2, testconstants.NocRootCert3SubjectKeyID) + _, err = GetNocX509CertsByVidAndSkid(suite, vid2, testconstants.NocRootCert3SubjectKeyID) suite.AssertNotFound(err) // Alice and Jack are predefined Trustees @@ -288,21 +288,21 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, testconstants.SchemaVersion, nocCertificates.SchemaVersion) // Request NOC root certificate by VID1 and SKID1 - nocCertificatesByVidAndSkid, _ := GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + nocCertificatesByVidAndSkid, _ := GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) require.Equal(suite.T, 1, len(nocCertificatesByVidAndSkid.Certs)) require.Equal(suite.T, testconstants.NocRootCert1Subject, nocCertificatesByVidAndSkid.Certs[0].Subject) require.Equal(suite.T, testconstants.NocRootCert1SubjectKeyID, nocCertificatesByVidAndSkid.Certs[0].SubjectKeyId) require.Equal(suite.T, float32(1), nocCertificatesByVidAndSkid.Tq) // Request NOC root certificate by VID1 and SKID2 - nocCertificatesByVidAndSkid, _ = GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert2SubjectKeyID) + nocCertificatesByVidAndSkid, _ = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert2SubjectKeyID) require.Equal(suite.T, 1, len(nocCertificatesByVidAndSkid.Certs)) require.Equal(suite.T, testconstants.NocRootCert2Subject, nocCertificatesByVidAndSkid.Certs[0].Subject) require.Equal(suite.T, testconstants.NocRootCert2SubjectKeyID, nocCertificatesByVidAndSkid.Certs[0].SubjectKeyId) require.Equal(suite.T, float32(1), nocCertificatesByVidAndSkid.Tq) // Request NOC root certificate by VID2 and SKID3 - nocCertificatesByVidAndSkid, _ = GetNocX509RootCertsByVidAndSkid(suite, vid2, testconstants.NocRootCert3SubjectKeyID) + nocCertificatesByVidAndSkid, _ = GetNocX509CertsByVidAndSkid(suite, vid2, testconstants.NocRootCert3SubjectKeyID) require.Equal(suite.T, 1, len(nocCertificatesByVidAndSkid.Certs)) require.Equal(suite.T, testconstants.NocRootCert3Subject, nocCertificatesByVidAndSkid.Certs[0].Subject) require.Equal(suite.T, testconstants.NocRootCert3SubjectKeyID, nocCertificatesByVidAndSkid.Certs[0].SubjectKeyId) @@ -431,7 +431,7 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, 3, len(nocCertificates.Certs)) // Request NOC root certificate by VID1 and SKID1 - nocCertificatesByVidAndSkid, _ = GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + nocCertificatesByVidAndSkid, _ = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) require.Equal(suite.T, 2, len(nocCertificatesByVidAndSkid.Certs)) require.Equal(suite.T, testconstants.NocRootCert1Subject, nocCertificatesByVidAndSkid.Certs[0].Subject) require.Equal(suite.T, testconstants.NocRootCert1SubjectKeyID, nocCertificatesByVidAndSkid.Certs[0].SubjectKeyId) @@ -534,7 +534,7 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, 1, len(certs.Certs)) require.Equal(suite.T, testconstants.NocCert1CopySerialNumber, certs.Certs[0].SerialNumber) - nocRootCerts, _ := GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + nocRootCerts, _ := GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) require.Equal(suite.T, 1, len(nocRootCerts.Certs)) require.Equal(suite.T, testconstants.NocRootCert1CopySerialNumber, nocRootCerts.Certs[0].SerialNumber) @@ -663,7 +663,7 @@ func NocCertDemo(suite *utils.TestSuite) { _, err = GetX509Cert(suite, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) suite.AssertNotFound(err) - _, err = GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) suite.AssertNotFound(err) certificates = GetNocX509IcaCertsBySubjectAndSKID(suite, vid1, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) require.Empty(suite.T, certificates) @@ -741,7 +741,7 @@ func NocCertDemo(suite *utils.TestSuite) { suite.AssertNotFound(err) _, err = GetRevokedX509Cert(suite, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) suite.AssertNotFound(err) - _, err = GetNocX509RootCertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) suite.AssertNotFound(err) // Check that child is not removed diff --git a/x/pki/genesis.go b/x/pki/genesis.go index 1bb7a94d3..0258b6e68 100644 --- a/x/pki/genesis.go +++ b/x/pki/genesis.go @@ -73,7 +73,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) for _, elem := range genState.RevokedNocRootCertificatesList { k.SetRevokedNocRootCertificates(ctx, elem) } - // Set all the nocRootCertificatesByVidAndSkid + // Set all the nocCertificatesByVidAndSkid for _, elem := range genState.NocCertificatesByVidAndSkidList { k.SetNocCertificatesByVidAndSkid(ctx, elem) } diff --git a/x/pki/handler_revoke_noc_root_cert_test.go b/x/pki/handler_revoke_noc_root_cert_test.go index e8c099186..a6792570b 100644 --- a/x/pki/handler_revoke_noc_root_cert_test.go +++ b/x/pki/handler_revoke_noc_root_cert_test.go @@ -245,11 +245,11 @@ func TestHandler_RevokeNocX509RootCert_RevokeDefault(t *testing.T) { require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) - nocRootCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert2SubjectKeyID) + nocCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert2SubjectKeyID) require.NoError(t, err) - require.Equal(t, testconstants.NocRootCert2SubjectKeyID, nocRootCertificatesByVidAndSkid.SubjectKeyId) + require.Equal(t, testconstants.NocRootCert2SubjectKeyID, nocCertificatesByVidAndSkid.SubjectKeyId) require.Equal(t, 1, len(nocRootCerts.Certs)) - require.Equal(t, float32(1), nocRootCertificatesByVidAndSkid.Tq) + require.Equal(t, float32(1), nocCertificatesByVidAndSkid.Tq) // Child certificate should not be revoked _, err = queryRevokedCertificates(setup, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) @@ -452,12 +452,12 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumber(t *testing.T) { require.Equal(t, testconstants.NocRootCert1CopySerialNumber, revNocRoot.Certs[0].SerialNumber) // query noc root certificate by VID and SKID - nocRootCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) + nocCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.NoError(t, err) - require.Equal(t, testconstants.NocRootCert1SubjectKeyID, nocRootCertificatesByVidAndSkid.SubjectKeyId) + require.Equal(t, testconstants.NocRootCert1SubjectKeyID, nocCertificatesByVidAndSkid.SubjectKeyId) require.Equal(t, 1, len(revNocRoot.Certs)) - require.Equal(t, float32(1), nocRootCertificatesByVidAndSkid.Tq) - require.Equal(t, testconstants.NocRootCert1CopySerialNumber, nocRootCertificatesByVidAndSkid.Certs[0].SerialNumber) + require.Equal(t, float32(1), nocCertificatesByVidAndSkid.Tq) + require.Equal(t, testconstants.NocRootCert1CopySerialNumber, nocCertificatesByVidAndSkid.Certs[0].SerialNumber) // Child certificate should not be revoked _, err = queryRevokedCertificates(setup, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) diff --git a/x/pki/keeper/noc_certificates_by_vid_and_skid.go b/x/pki/keeper/noc_certificates_by_vid_and_skid.go index 5e9507460..a56f2b359 100644 --- a/x/pki/keeper/noc_certificates_by_vid_and_skid.go +++ b/x/pki/keeper/noc_certificates_by_vid_and_skid.go @@ -8,17 +8,17 @@ import ( "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" ) -// SetNocCertificatesByVidAndSkid set a specific nocRootCertificatesByVidAndSkid in the store from its index. -func (k Keeper) SetNocCertificatesByVidAndSkid(ctx sdk.Context, nocRootCertificatesByVidAndSkid types.NocCertificatesByVidAndSkid) { +// SetNocCertificatesByVidAndSkid set a specific nocCertificatesByVidAndSkid in the store from its index. +func (k Keeper) SetNocCertificatesByVidAndSkid(ctx sdk.Context, nocCertificatesByVidAndSkid types.NocCertificatesByVidAndSkid) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) - b := k.cdc.MustMarshal(&nocRootCertificatesByVidAndSkid) + b := k.cdc.MustMarshal(&nocCertificatesByVidAndSkid) store.Set(types.NocCertificatesByVidAndSkidKey( - nocRootCertificatesByVidAndSkid.Vid, - nocRootCertificatesByVidAndSkid.SubjectKeyId, + nocCertificatesByVidAndSkid.Vid, + nocCertificatesByVidAndSkid.SubjectKeyId, ), b) } -// GetNocCertificatesByVidAndSkid returns a nocRootCertificatesByVidAndSkid from its index. +// GetNocCertificatesByVidAndSkid returns a nocCertificatesByVidAndSkid from its index. func (k Keeper) GetNocCertificatesByVidAndSkid( ctx sdk.Context, vid int32, @@ -44,27 +44,27 @@ func (k Keeper) GetNocCertificatesByVidAndSkid( func (k Keeper) AddNocCertificateByVidAndSkid(ctx sdk.Context, nocCertificate types.Certificate) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) - nocRootCertificatesByVidAndSkidKeyBytes := store.Get(types.NocCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId)) - var nocRootCertificatesByVidAndSkid types.NocCertificatesByVidAndSkid + nocCertificatesByVidAndSkidKeyBytes := store.Get(types.NocCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId)) + var nocCertificatesByVidAndSkid types.NocCertificatesByVidAndSkid - if nocRootCertificatesByVidAndSkidKeyBytes == nil { - nocRootCertificatesByVidAndSkid = types.NocCertificatesByVidAndSkid{ + if nocCertificatesByVidAndSkidKeyBytes == nil { + nocCertificatesByVidAndSkid = types.NocCertificatesByVidAndSkid{ Vid: nocCertificate.Vid, SubjectKeyId: nocCertificate.SubjectKeyId, Certs: []*types.Certificate{}, Tq: 1, } } else { - k.cdc.MustUnmarshal(nocRootCertificatesByVidAndSkidKeyBytes, &nocRootCertificatesByVidAndSkid) + k.cdc.MustUnmarshal(nocCertificatesByVidAndSkidKeyBytes, &nocCertificatesByVidAndSkid) } - nocRootCertificatesByVidAndSkid.Certs = append(nocRootCertificatesByVidAndSkid.Certs, &nocCertificate) + nocCertificatesByVidAndSkid.Certs = append(nocCertificatesByVidAndSkid.Certs, &nocCertificate) - b := k.cdc.MustMarshal(&nocRootCertificatesByVidAndSkid) + b := k.cdc.MustMarshal(&nocCertificatesByVidAndSkid) store.Set(types.NocCertificatesByVidAndSkidKey(nocCertificate.Vid, nocCertificate.SubjectKeyId), b) } -// RemoveNocCertificatesByVidAndSkid removes a nocRootCertificatesByVidAndSkid from the store. +// RemoveNocCertificatesByVidAndSkid removes a nocCertificatesByVidAndSkid from the store. func (k Keeper) RemoveNocCertificatesByVidAndSkid( ctx sdk.Context, vid int32, @@ -130,7 +130,7 @@ func (k Keeper) _filterAndSetNocCertificateByVidAndSkid( } } -// GetAllNocCertificatesByVidAndSkid returns all nocRootCertificatesByVidAndSkid. +// GetAllNocCertificatesByVidAndSkid returns all nocCertificatesByVidAndSkid. func (k Keeper) GetAllNocCertificatesByVidAndSkid(ctx sdk.Context) (list []types.NocCertificatesByVidAndSkid) { store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.NocCertificatesByVidAndSkidKeyPrefix)) iterator := sdk.KVStorePrefixIterator(store, []byte{}) diff --git a/x/pki/types/genesis.go b/x/pki/types/genesis.go index 0bf4c7c25..4ffb857d5 100644 --- a/x/pki/types/genesis.go +++ b/x/pki/types/genesis.go @@ -176,15 +176,15 @@ func (gs GenesisState) Validate() error { //nolint:gocyclo,vet } revokedNocRootCertificatesIndexMap[index] = struct{}{} } - // Check for duplicated index in nocRootCertificatesByVidAndSkid - nocRootCertificatesByVidAndSkidIndexMap := make(map[string]struct{}) + // Check for duplicated index in nocCertificatesByVidAndSkid + nocCertificatesByVidAndSkidIndexMap := make(map[string]struct{}) for _, elem := range gs.NocCertificatesByVidAndSkidList { index := string(NocCertificatesByVidAndSkidKey(elem.Vid, elem.SubjectKeyId)) - if _, ok := nocRootCertificatesByVidAndSkidIndexMap[index]; ok { - return fmt.Errorf("duplicated index for nocRootCertificatesByVidAndSkid") + if _, ok := nocCertificatesByVidAndSkidIndexMap[index]; ok { + return fmt.Errorf("duplicated index for nocCertificatesByVidAndSkid") } - nocRootCertificatesByVidAndSkidIndexMap[index] = struct{}{} + nocCertificatesByVidAndSkidIndexMap[index] = struct{}{} } // this line is used by starport scaffolding # genesis/types/validate diff --git a/x/pki/types/genesis_test.go b/x/pki/types/genesis_test.go index 33c90a915..ac59a8e3b 100644 --- a/x/pki/types/genesis_test.go +++ b/x/pki/types/genesis_test.go @@ -369,7 +369,7 @@ SubjectKeyId: "0", valid: false, }, { - desc: "duplicated nocRootCertificatesByVidAndSkid", + desc: "duplicated nocCertificatesByVidAndSkid", genState: &types.GenesisState{ NocCertificatesByVidAndSkidList: []types.NocCertificatesByVidAndSkid{ { diff --git a/x/pki/types/key_noc_root_certificates_by_vid_and_skid.go b/x/pki/types/key_noc_certificates_by_vid_and_skid.go similarity index 100% rename from x/pki/types/key_noc_root_certificates_by_vid_and_skid.go rename to x/pki/types/key_noc_certificates_by_vid_and_skid.go From 03a50e3ba0a6e6ce49a77f756bec0eddb4d61c26 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Fri, 26 Jul 2024 11:21:50 +0300 Subject: [PATCH 05/16] processed commets, fixed some tests Signed-off-by: DenisRybas --- x/pki/handler_remove_noc_root_cert_test.go | 67 ++++++++++++------- x/pki/handler_revoke_noc_root_cert_test.go | 6 +- .../msg_server_remove_noc_x_509_root_cert.go | 2 +- .../msg_server_revoke_noc_x_509_root_cert.go | 4 +- .../noc_certificates_by_vid_and_skid.go | 10 +-- 5 files changed, 55 insertions(+), 34 deletions(-) diff --git a/x/pki/handler_remove_noc_root_cert_test.go b/x/pki/handler_remove_noc_root_cert_test.go index b12259341..62bf6a078 100644 --- a/x/pki/handler_remove_noc_root_cert_test.go +++ b/x/pki/handler_remove_noc_root_cert_test.go @@ -31,10 +31,10 @@ func TestHandler_RemoveNocX509RootCert_BySubjectAndSKID(t *testing.T) { require.NoError(t, err) // get certificates for further comparison - allCerts := setup.Keeper.GetAllApprovedCertificates(setup.Ctx) - require.NotNil(t, allCerts) - require.Equal(t, 2, len(allCerts)) - require.Equal(t, 3, len(allCerts[0].Certs)+len(allCerts[1].Certs)) + approvedCerts := setup.Keeper.GetAllApprovedCertificates(setup.Ctx) + require.NotNil(t, approvedCerts) + require.Equal(t, 2, len(approvedCerts)) + require.Equal(t, 3, len(approvedCerts[0].Certs)+len(approvedCerts[1].Certs)) // remove all root nOC certificates but IAC certificate removeIcaCert := types.NewMsgRemoveNocX509RootCert( @@ -47,16 +47,22 @@ func TestHandler_RemoveNocX509RootCert_BySubjectAndSKID(t *testing.T) { require.NoError(t, err) // check that only IAC certificate exists - allCerts, _ = queryAllApprovedCertificates(setup) - require.Equal(t, 1, len(allCerts)) - require.Equal(t, 1, len(allCerts[0].Certs)) - require.Equal(t, testconstants.NocCert1SerialNumber, allCerts[0].Certs[0].SerialNumber) + approvedCerts, _ = queryAllApprovedCertificates(setup) + require.Equal(t, 1, len(approvedCerts)) + require.Equal(t, 1, len(approvedCerts[0].Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, approvedCerts[0].Certs[0].SerialNumber) nocCertificates, err := queryNocCertificates(setup, vid) require.NoError(t, err) require.Equal(t, len(nocCertificates.Certs), 1) require.Equal(t, testconstants.NocCert1SerialNumber, nocCertificates.Certs[0].SerialNumber) + // check that IAC certificates can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.NoError(t, err) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that root certs removed _, err = queryApprovedCertificates(setup, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) @@ -108,8 +114,8 @@ func TestHandler_RemoveNocX509RootCert_BySerialNumber(t *testing.T) { _, err = setup.Handler(setup.Ctx, removeIcaCert) require.NoError(t, err) - allCerts, _ := queryAllApprovedCertificates(setup) - require.Equal(t, 2, len(allCerts)) + approvedCerts, _ := queryAllApprovedCertificates(setup) + require.Equal(t, 2, len(approvedCerts)) rootCerts, _ := queryApprovedCertificates(setup, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, 1, len(rootCerts.Certs)) @@ -145,16 +151,21 @@ func TestHandler_RemoveNocX509RootCert_BySerialNumber(t *testing.T) { _, err = setup.Handler(setup.Ctx, removeIcaCert) require.NoError(t, err) - allCerts, _ = queryAllApprovedCertificates(setup) - require.Equal(t, 1, len(allCerts)) - require.Equal(t, 1, len(allCerts[0].Certs)) - require.Equal(t, testconstants.NocCert1SerialNumber, allCerts[0].Certs[0].SerialNumber) + approvedCerts, _ = queryAllApprovedCertificates(setup) + require.Equal(t, 1, len(approvedCerts)) + require.Equal(t, 1, len(approvedCerts[0].Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, approvedCerts[0].Certs[0].SerialNumber) nocCertificates, err = queryNocCertificates(setup, vid) require.NoError(t, err) require.Equal(t, len(nocCertificates.Certs), 1) require.Equal(t, testconstants.NocCert1SerialNumber, nocCertificates.Certs[0].SerialNumber) + // check that IAC certificates can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that root certs removed _, err = queryApprovedCertificates(setup, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) @@ -191,9 +202,9 @@ func TestHandler_RemoveNocX509RootCert_RevokedAndApprovedCertificate(t *testing. require.NoError(t, err) // get certificates for further comparison - allCerts := setup.Keeper.GetAllApprovedCertificates(setup.Ctx) - require.NotNil(t, allCerts) - require.Equal(t, 2, len(allCerts)) + approvedCerts := setup.Keeper.GetAllApprovedCertificates(setup.Ctx) + require.NotNil(t, approvedCerts) + require.Equal(t, 2, len(approvedCerts)) // revoke an intermediate certificate revokeX509Cert := types.NewMsgRevokeNocX509RootCert( @@ -225,8 +236,8 @@ func TestHandler_RemoveNocX509RootCert_RevokedAndApprovedCertificate(t *testing. require.NoError(t, err) // check that only one root and IAC certificates exists - allCerts, _ = queryAllApprovedCertificates(setup) - require.Equal(t, 2, len(allCerts)) + approvedCerts, _ = queryAllApprovedCertificates(setup) + require.Equal(t, 2, len(approvedCerts)) certs, _ = queryApprovedCertificates(setup, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, testconstants.NocRootCert1CopySerialNumber, certs.Certs[0].SerialNumber) @@ -264,16 +275,21 @@ func TestHandler_RemoveNocX509RootCert_RevokedAndApprovedCertificate(t *testing. _, err = setup.Handler(setup.Ctx, removeIcaCert) require.NoError(t, err) - allCerts, _ = queryAllApprovedCertificates(setup) - require.Equal(t, 1, len(allCerts)) - require.Equal(t, 1, len(allCerts[0].Certs)) - require.Equal(t, testconstants.NocCert1SerialNumber, allCerts[0].Certs[0].SerialNumber) + approvedCerts, _ = queryAllApprovedCertificates(setup) + require.Equal(t, 1, len(approvedCerts)) + require.Equal(t, 1, len(approvedCerts[0].Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, approvedCerts[0].Certs[0].SerialNumber) nocCertificates, err = queryNocCertificates(setup, vid) require.NoError(t, err) require.Equal(t, len(nocCertificates.Certs), 1) require.Equal(t, testconstants.NocCert1SerialNumber, nocCertificates.Certs[0].SerialNumber) + // check that IAC certificates can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that root certs removed _, err = queryApprovedCertificates(setup, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) @@ -354,6 +370,11 @@ func TestHandler_RemoveNocX509RootCert_RevokedCertificate(t *testing.T) { require.Equal(t, len(nocCertificates.Certs), 1) require.Equal(t, testconstants.NocCert1SerialNumber, nocCertificates.Certs[0].SerialNumber) + // check that IAC certificates can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocCert1SerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that root certs are removed _, err = queryApprovedCertificates(setup, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(t, codes.NotFound, status.Code(err)) diff --git a/x/pki/handler_revoke_noc_root_cert_test.go b/x/pki/handler_revoke_noc_root_cert_test.go index a6792570b..a90a0fe16 100644 --- a/x/pki/handler_revoke_noc_root_cert_test.go +++ b/x/pki/handler_revoke_noc_root_cert_test.go @@ -240,7 +240,7 @@ func TestHandler_RevokeNocX509RootCert_RevokeDefault(t *testing.T) { require.Equal(t, 1, len(nocRootCerts.Certs)) require.Equal(t, testconstants.NocRootCert2SubjectKeyID, nocRootCerts.Certs[0].SubjectKeyId) - // query noc root certificate by VID and SKID + // query noc certificate by VID and SKID _, err = queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) @@ -342,7 +342,7 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithChild(t *testing.T) { require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) - // query noc root certificate by VID and SKID + // query noc certificate by VID and SKID _, err = queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) @@ -451,7 +451,7 @@ func TestHandler_RevokeNocX509RootCert_RevokeWithSerialNumber(t *testing.T) { require.Equal(t, 1, len(revNocRoot.Certs)) require.Equal(t, testconstants.NocRootCert1CopySerialNumber, revNocRoot.Certs[0].SerialNumber) - // query noc root certificate by VID and SKID + // query noc certificate by VID and SKID nocCertificatesByVidAndSkid, err := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocRootCert1SubjectKeyID) require.NoError(t, err) require.Equal(t, testconstants.NocRootCert1SubjectKeyID, nocCertificatesByVidAndSkid.SubjectKeyId) diff --git a/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go index 991db4762..f364eb31c 100644 --- a/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go @@ -71,7 +71,7 @@ func (k msgServer) RemoveNocX509RootCert(goCtx context.Context, msg *types.MsgRe // Remove from NOC lists k.RemoveNocRootCertificateBySerialNumber(ctx, accountVid, certID.Subject, certID.SubjectKeyId, msg.SerialNumber) - k.RemoveNocRootCertificateByVidSubjectSkidAndSerialNumber(ctx, accountVid, certID.Subject, certID.SubjectKeyId, msg.SerialNumber) + k.RemoveNocCertificateByVidSubjectSkidAndSerialNumber(ctx, accountVid, certID.Subject, certID.SubjectKeyId, msg.SerialNumber) } if foundRevoked { diff --git a/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go index 10606cf21..3d19ea6a4 100644 --- a/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go +++ b/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go @@ -82,7 +82,7 @@ func (k msgServer) _revokeNocRootCertificates(ctx sdk.Context, certificates type // remove from subject key ID -> certificates map k.RemoveApprovedCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId) // remove from vid, subject key ID -> certificates map - k.RemoveNocRootCertificateByVidSubjectAndSkid(ctx, vid, certificates.Subject, certificates.SubjectKeyId) + k.RemoveNocCertificateByVidSubjectAndSkid(ctx, vid, certificates.Subject, certificates.SubjectKeyId) } func (k msgServer) _revokeNocRootCertificate( @@ -125,7 +125,7 @@ func (k msgServer) _revokeNocRootCertificate( } // remove from vid, subject key ID -> certificates map - k.RemoveNocRootCertificateByVidSubjectSkidAndSerialNumber(ctx, vid, cert.Subject, cert.SubjectKeyId, serialNumber) + k.RemoveNocCertificateByVidSubjectSkidAndSerialNumber(ctx, vid, cert.Subject, cert.SubjectKeyId, serialNumber) return nil } diff --git a/x/pki/keeper/noc_certificates_by_vid_and_skid.go b/x/pki/keeper/noc_certificates_by_vid_and_skid.go index a56f2b359..5b32f58be 100644 --- a/x/pki/keeper/noc_certificates_by_vid_and_skid.go +++ b/x/pki/keeper/noc_certificates_by_vid_and_skid.go @@ -77,8 +77,8 @@ func (k Keeper) RemoveNocCertificatesByVidAndSkid( )) } -// RemoveNocRootCertificateByVidSkidSubjectAndSerialNumber removes root certificate with specified subject from the list. -func (k Keeper) RemoveNocRootCertificateByVidSubjectAndSkid( +// RemoveNocCertificateByVidSkidSubjectAndSerialNumber removes certificate with specified subject from the list. +func (k Keeper) RemoveNocCertificateByVidSubjectAndSkid( ctx sdk.Context, vid int32, subject string, @@ -94,8 +94,8 @@ func (k Keeper) RemoveNocRootCertificateByVidSubjectAndSkid( ) } -// RemoveNocRootCertificateByVidSkidSubjectAndSerialNumber removes root certificate with specified subject and serial number from the list. -func (k Keeper) RemoveNocRootCertificateByVidSubjectSkidAndSerialNumber( +// RemoveNocCertificateByVidSkidSubjectAndSerialNumber removes certificate with specified subject and serial number from the list. +func (k Keeper) RemoveNocCertificateByVidSubjectSkidAndSerialNumber( ctx sdk.Context, vid int32, subject string, @@ -112,7 +112,7 @@ func (k Keeper) RemoveNocRootCertificateByVidSubjectSkidAndSerialNumber( ) } -// RemoveNocRootCertificateByVidSkidSubjectAndSerialNumber removes root certificate with specified subject and serial number from the list. +// RemoveNocCertificateByVidSkidSubjectAndSerialNumber removes certificate with specified subject and serial number from the list. func (k Keeper) _filterAndSetNocCertificateByVidAndSkid( ctx sdk.Context, vid int32, From 9ea2b0aba26560153debf2cec8dc41a7e8b9ba20 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 01:05:19 +0300 Subject: [PATCH 06/16] added vid+skid logic to remove/revoke certs methods Signed-off-by: DenisRybas --- x/pki/keeper/child_certificates.go | 2 ++ x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go | 3 +++ x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/x/pki/keeper/child_certificates.go b/x/pki/keeper/child_certificates.go index 0e4338cc4..e726fcfdc 100644 --- a/x/pki/keeper/child_certificates.go +++ b/x/pki/keeper/child_certificates.go @@ -115,6 +115,8 @@ func (k msgServer) RevokeChildCertificates(ctx sdk.Context, issuer string, autho if len(certificates.Certs) > 0 { // If cert is NOC then remove it from NOC ICA certificates list k.RemoveNocIcaCertificate(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId, certificates.Certs[0].Vid) + // remove from vid, subject key ID -> certificates map + k.RemoveNocCertificateByVidSubjectAndSkid(ctx, certificates.Certs[0].Vid, certIdentifier.Subject, certificates.SubjectKeyId) } k.RemoveApprovedCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId) diff --git a/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go index 4d37c25fe..dc637156f 100644 --- a/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go +++ b/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go @@ -75,6 +75,7 @@ func (k msgServer) RemoveNocX509IcaCert(goCtx context.Context, msg *types.MsgRem // Remove from ICA lists k.RemoveNocIcaCertificateBySerialNumber(ctx, accountVid, certID.Subject, certID.SubjectKeyId, msg.SerialNumber) + k.RemoveNocCertificateByVidSubjectSkidAndSerialNumber(ctx, accountVid, certID.Subject, certID.SubjectKeyId, msg.SerialNumber) } if foundRevoked { removeCertFromList(certBySerialNumber.Issuer, certBySerialNumber.SerialNumber, &revCerts.Certs) @@ -82,6 +83,8 @@ func (k msgServer) RemoveNocX509IcaCert(goCtx context.Context, msg *types.MsgRem } } else { k.RemoveNocIcaCertificate(ctx, certID.Subject, certID.SubjectKeyId, accountVid) + // remove from vid, subject key id map + k.RemoveNocCertificatesByVidAndSkid(ctx, accountVid, certID.SubjectKeyId) // remove from approved list k.RemoveApprovedCertificates(ctx, certID.Subject, certID.SubjectKeyId) // remove from subject -> subject key ID map diff --git a/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go index 1e0bdac44..03b2b5ff0 100644 --- a/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go +++ b/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go @@ -92,6 +92,9 @@ func (k msgServer) _revokeNocCertificate( k.SetApprovedCertificates(ctx, certificates) } + // remove from vid, subject key ID -> certificates map + k.RemoveNocCertificateByVidSubjectSkidAndSerialNumber(ctx, vid, cert.Subject, cert.SubjectKeyId, serialNumber) + return nil } @@ -106,4 +109,6 @@ func (k msgServer) _revokeNocCertificates(ctx sdk.Context, certificates types.Ap k.RemoveApprovedCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId) // remove from subject key ID -> certificates map k.RemoveApprovedCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId) + // remove from vid, subject key ID -> certificates map + k.RemoveNocCertificateByVidSubjectAndSkid(ctx, vid, certificates.Subject, certificates.SubjectKeyId) } From 1bfd4287ea444aded897466085ee8b9686d9d833 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 01:06:39 +0300 Subject: [PATCH 07/16] updated tests Signed-off-by: DenisRybas --- x/pki/handler_remove_noc_ica_cert_test.go | 25 +++++++++++++++++++++++ x/pki/handler_revoke_noc_cert_test.go | 20 ++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/x/pki/handler_remove_noc_ica_cert_test.go b/x/pki/handler_remove_noc_ica_cert_test.go index bfda016c9..24ad4f0ff 100644 --- a/x/pki/handler_remove_noc_ica_cert_test.go +++ b/x/pki/handler_remove_noc_ica_cert_test.go @@ -65,6 +65,11 @@ func TestHandler_RemoveNocX509IcaCert_BySubjectAndSKID(t *testing.T) { found = setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1Issuer, testconstants.NocCert1CopySerialNumber) require.Equal(t, false, found) + // check that intermediate certificate can not be queried by vid+skid + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) + leafCerts, _ := queryApprovedCertificates(setup, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) require.Equal(t, 1, len(leafCerts.Certs)) require.Equal(t, testconstants.NocLeafCert1SerialNumber, leafCerts.Certs[0].SerialNumber) @@ -152,6 +157,11 @@ func TestHandler_RemoveNocX509IcaCert_BySerialNumber(t *testing.T) { found = setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1Issuer, testconstants.NocCert1CopySerialNumber) require.Equal(t, false, found) + // check that intermediate certificate can not be queried by vid+skid + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) + leafCerts, _ = queryApprovedCertificates(setup, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) require.Equal(t, 1, len(leafCerts.Certs)) @@ -233,6 +243,11 @@ func TestHandler_RemoveNocX509IcaCert_RevokedAndApprovedCertificate(t *testing.T found = setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1Issuer, testconstants.NocCert1CopySerialNumber) require.Equal(t, false, found) + // check that intermediate certificate can not be queried by vid+skid + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) + // query noc certificate by VID _, err = queryNocCertificates(setup, vid) require.Equal(t, codes.NotFound, status.Code(err)) @@ -302,6 +317,11 @@ func TestHandler_RemoveNocX509IcaCert_RevokedCertificate(t *testing.T) { found := setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1Issuer, testconstants.NocCert1SerialNumber) require.Equal(t, false, found) + // check that intermediate certificate can not be queried by vid+skid + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) + // query noc certificate by VID _, err = queryNocCertificates(setup, vid) require.Equal(t, codes.NotFound, status.Code(err)) @@ -363,6 +383,11 @@ func TestHandler_RemoveNocX509IcaCert_ByNotOwnerButSameVendor(t *testing.T) { // check that unique certificate key is not registered require.False(t, setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1Issuer, testconstants.NocCert1SerialNumber)) + + // check that intermediate certificate can not be queried by vid+skid + _, err = queryNocCertificatesByVidAndSkid(setup, vid, testconstants.NocCert1SubjectKeyID) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) } func TestHandler_RemoveNocX509IcaCert_CertificateDoesNotExist(t *testing.T) { diff --git a/x/pki/handler_revoke_noc_cert_test.go b/x/pki/handler_revoke_noc_cert_test.go index 2345380b8..444c33f46 100644 --- a/x/pki/handler_revoke_noc_cert_test.go +++ b/x/pki/handler_revoke_noc_cert_test.go @@ -239,6 +239,11 @@ func TestHandler_RevokeNocX509Cert_RevokeDefault(t *testing.T) { require.Equal(t, 1, len(nocCerts.Certs)) require.Equal(t, testconstants.NocLeafCert1SubjectKeyID, nocCerts.Certs[0].SubjectKeyId) + // check that leaf certificate can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocLeafCert1SubjectKeyID) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocLeafCert1SerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that unique certificate key is removed require.False(t, setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1, testconstants.NocCert1SerialNumber)) @@ -327,6 +332,11 @@ func TestHandler_RevokeNocX509Cert_RevokeWithChild(t *testing.T) { require.Error(t, err) require.Equal(t, codes.NotFound, status.Code(err)) + // check that leaf certificate can not be queried by vid+skid + _, err = queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocLeafCert1SubjectKeyID) + require.Error(t, err) + require.Equal(t, codes.NotFound, status.Code(err)) + // Child certificate should be revoked as well revokedLeafCerts, err := queryRevokedCertificates(setup, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) require.NoError(t, err) @@ -430,6 +440,11 @@ func TestHandler_RevokeNocX509Cert_RevokeBySerialNumber(t *testing.T) { require.Equal(t, 1, len(childCerts.Certs)) require.Equal(t, testconstants.NocLeafCert1SubjectKeyID, childCerts.SubjectKeyId) + // check that leaf certificate can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocLeafCert1SubjectKeyID) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocLeafCert1SerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that unique certificate key is removed require.False(t, setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1, testconstants.NocCert1SerialNumber)) @@ -530,6 +545,11 @@ func TestHandler_RevokeNocX509Cert_RevokeBySerialNumberAndWithChild(t *testing.T require.Equal(t, 1, len(nocCerts.Certs)) require.Equal(t, testconstants.NocCert1CopySerialNumber, nocCerts.Certs[0].SerialNumber) + // check that leaf certificate can be queried by vid+skid + certsByVidSkid, _ := queryNocCertificatesByVidAndSkid(setup, testconstants.Vid, testconstants.NocCert1SubjectKeyID) + require.Equal(t, 1, len(certsByVidSkid.Certs)) + require.Equal(t, testconstants.NocCert1CopySerialNumber, certsByVidSkid.Certs[0].SerialNumber) + // check that unique certificate key is removed require.False(t, setup.Keeper.IsUniqueCertificatePresent(setup.Ctx, testconstants.NocCert1, testconstants.NocCert1SerialNumber)) From b7141f90f4d2319bf7bfff8b06950fdadaa23372 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 02:30:15 +0300 Subject: [PATCH 08/16] added CLI command for get noc certs by vid+skid Signed-off-by: DenisRybas --- docs/transactions.md | 10 ++--- x/pki/client/cli/query.go | 1 + .../cli/query_noc_certificates_by_vid_skid.go | 45 +++++++++++++++++++ .../client/cli/query_noc_root_certificates.go | 16 +------ 4 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 x/pki/client/cli/query_noc_certificates_by_vid_skid.go diff --git a/docs/transactions.md b/docs/transactions.md index 10467cb30..159090789 100644 --- a/docs/transactions.md +++ b/docs/transactions.md @@ -1525,14 +1525,14 @@ Use [GET_ALL_REVOKED_NOC_ROOT](#get_revoked_noc_root) to get a list of all revok - REST API: - GET `/dcl/pki/noc-root-certificates/{vid}` -#### GET_NOC_ROOT_BY_VID_AND_SKID +#### GET_NOC_BY_VID_AND_SKID **Status: Implemented** -Retrieve NOC root certificates associated with a specific VID and subject key ID. +Retrieve NOC certificates associated with a specific VID and subject key ID. This request also returns the Trust Quotient (TQ) value of the certificate -Revoked NOC root certificates are not returned. +Revoked NOC certificates are not returned. Use [GET_ALL_REVOKED_NOC_ROOT](#get_revoked_noc_root) to get a list of all revoked NOC root certificates. - Who can send: Any account @@ -1540,9 +1540,9 @@ Use [GET_ALL_REVOKED_NOC_ROOT](#get_revoked_noc_root) to get a list of all revok - vid: `uint16` - Vendor ID (positive non-zero) - subject_key_id: `string` - Certificate's `Subject Key Id` in hex string format, e.g., `5A:88:0E:6C:36:53:D0:7F:B0:89:71:A3:F4:73:79:09:30:E6:2B:DB` - CLI Command: - - `dcld query pki noc-x509-root-certs --vid= --subject-key-id=` + - `dcld query pki noc-x509-certs --vid= --subject-key-id=` - REST API: - - GET `/dcl/pki/noc-root-certificates/{vid}/{subject_key_id}` + - GET `/dcl/pki/noc-certificates/{vid}/{subject_key_id}` #### GET_NOC_ICA_BY_VID diff --git a/x/pki/client/cli/query.go b/x/pki/client/cli/query.go index ace82b288..5af2eced2 100644 --- a/x/pki/client/cli/query.go +++ b/x/pki/client/cli/query.go @@ -41,6 +41,7 @@ func GetQueryCmd(_ string) *cobra.Command { cmd.AddCommand(CmdShowPkiRevocationDistributionPointsByIssuerSubjectKeyID()) cmd.AddCommand(CmdListNocRootCertificates()) cmd.AddCommand(CmdShowNocRootCertificates()) + cmd.AddCommand(CmdShowNocCertificatesByVidAndSkid()) cmd.AddCommand(CmdListNocIcaCertificates()) cmd.AddCommand(CmdShowNocIcaCertificates()) cmd.AddCommand(CmdListRevokedNocRootCertificates()) diff --git a/x/pki/client/cli/query_noc_certificates_by_vid_skid.go b/x/pki/client/cli/query_noc_certificates_by_vid_skid.go new file mode 100644 index 000000000..a34b0e691 --- /dev/null +++ b/x/pki/client/cli/query_noc_certificates_by_vid_skid.go @@ -0,0 +1,45 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" + pkitypes "github.com/zigbee-alliance/distributed-compliance-ledger/types/pki" + "github.com/zigbee-alliance/distributed-compliance-ledger/utils/cli" + "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types" +) + +func CmdShowNocCertificatesByVidAndSkid() *cobra.Command { + var ( + vid int32 + subjectKeyID string + ) + + cmd := &cobra.Command{ + Use: "noc-x509-certs", + Short: "Gets NOC certificates by VID and Skid", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx := client.GetClientContextFromCmd(cmd) + + var res types.NocCertificatesByVidAndSkid + + return cli.QueryWithProof( + clientCtx, + pkitypes.StoreKey, + types.NocCertificatesByVidAndSkidKeyPrefix, + types.NocCertificatesByVidAndSkidKey(vid, subjectKeyID), + &res, + ) + }, + } + + cmd.Flags().Int32Var(&vid, FlagVid, 0, "Vendor ID (positive non-zero)") + cmd.Flags().StringVarP(&subjectKeyID, FlagSubjectKeyID, FlagSubjectKeyIDShortcut, "", "Certificate's subject key id (hex)") + flags.AddQueryFlagsToCmd(cmd) + + _ = cmd.MarkFlagRequired(FlagVid) + _ = cmd.MarkFlagRequired(FlagSubjectKeyID) + + return cmd +} diff --git a/x/pki/client/cli/query_noc_root_certificates.go b/x/pki/client/cli/query_noc_root_certificates.go index a3f859dc1..5301bafd7 100644 --- a/x/pki/client/cli/query_noc_root_certificates.go +++ b/x/pki/client/cli/query_noc_root_certificates.go @@ -46,8 +46,7 @@ func CmdListNocRootCertificates() *cobra.Command { func CmdShowNocRootCertificates() *cobra.Command { var ( - vid int32 - subjectKeyID string + vid int32 ) cmd := &cobra.Command{ @@ -57,18 +56,6 @@ func CmdShowNocRootCertificates() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) (err error) { clientCtx := client.GetClientContextFromCmd(cmd) - if subjectKeyID != "" { - var res types.NocCertificatesByVidAndSkid - - return cli.QueryWithProof( - clientCtx, - pkitypes.StoreKey, - types.NocCertificatesByVidAndSkidKeyPrefix, - types.NocCertificatesByVidAndSkidKey(vid, subjectKeyID), - &res, - ) - } - var res types.NocRootCertificates return cli.QueryWithProof( @@ -82,7 +69,6 @@ func CmdShowNocRootCertificates() *cobra.Command { } cmd.Flags().Int32Var(&vid, FlagVid, 0, "Vendor ID (positive non-zero)") - cmd.Flags().StringVarP(&subjectKeyID, FlagSubjectKeyID, FlagSubjectKeyIDShortcut, "", "Certificate's subject key id (hex)") flags.AddQueryFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(FlagVid) From 7c4ede2da35890c098528f5df2c53ce02afb4f89 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 03:02:01 +0300 Subject: [PATCH 09/16] added NOC ICA queries to CLI integration tests Signed-off-by: DenisRybas --- integration_tests/cli/pki-noc-certs.sh | 25 ++++++++++++----- .../pki-noc-revocation-with-revoking-child.sh | 28 ++++++++++++++++++- .../pki-noc-revocation-with-serial-number.sh | 4 +-- .../cli/pki-remove-noc-certificates.sh | 10 +++++++ 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/integration_tests/cli/pki-noc-certs.sh b/integration_tests/cli/pki-noc-certs.sh index 988ad442a..eba81fe81 100755 --- a/integration_tests/cli/pki-noc-certs.sh +++ b/integration_tests/cli/pki-noc-certs.sh @@ -72,7 +72,7 @@ echo $result | jq test_divider echo "Request NOC root certificate by VID = $vid and SKID = $noc_root_cert_1_subject_key_id must be empty" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") check_response "$result" "Not Found" response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\"" @@ -83,7 +83,7 @@ echo $result | jq test_divider echo "Request NOC root certificate by VID = $vid and SKID = $noc_root_cert_2_subject_key_id must be empty" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") check_response "$result" "Not Found" response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_2_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\"" @@ -94,7 +94,7 @@ echo $result | jq test_divider echo "Request NOC root certificate by VID = $vid and SKID = $noc_root_cert_3_subject_key_id must be empty" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_3_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_3_subject_key_id") check_response "$result" "Not Found" response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_3_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_3_subject_key_id\"" @@ -191,7 +191,7 @@ check_response "$result" "\"vid\": $vid" test_divider echo "Request NOC root certificate by VID = "$vid" and SKID = $noc_root_cert_1_subject_key_id" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") echo $result | jq check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\"" @@ -204,7 +204,7 @@ check_response "$result" "\"tq\": 1" test_divider echo "Request NOC root certificate by VID = "$vid" and SKID = $noc_root_cert_2_subject_key_id" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") echo $result | jq check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\"" @@ -420,7 +420,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_s echo $result | jq echo "Request NOC root certificate by VID = $vid and SKID = $noc_root_cert_1_subject must be empty" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") check_response "$result" "Not Found" response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\"" @@ -429,7 +429,7 @@ response_does_not_contain "$result" "\"subjectAsText\": \"$noc_root_cert_1_subje echo $result | jq echo "Request NOC root certificate by VID = "$vid" and SKID = $noc_root_cert_2_subject_key_id" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\"" check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\"" @@ -538,6 +538,17 @@ check_response "$result" "\"subjectKeyId\": \"$noc_leaf_cert_1_subject_key_id\"" response_does_not_contain "$result" "\"subject\": \"$noc_cert_1_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\"" +echo "Request NOC certificate by VID = $vid and SKID = $noc_cert_1_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_cert_1_subject_key_id") +echo $result | jq +check_response "$result" "Not Found" + +echo "Request NOC certificate by VID = $vid and SKID = $noc_leaf_cert_1_subject_key_id should contain one leaf certificate" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_leaf_cert_1_subject_key_id") +echo $result | jq +check_response "$result" "\"subject\": \"$noc_leaf_cert_1_subject\"" +check_response "$result" "\"subjectKeyId\": \"$noc_leaf_cert_1_subject_key_id\"" + echo "Request all approved certificates should not contain revoked NOC certificates" result=$(dcld query pki all-x509-certs) check_response "$result" "\"subject\": \"$noc_leaf_cert_1_subject\"" diff --git a/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh b/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh index 5b2344b6b..addffc445 100755 --- a/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh +++ b/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh @@ -155,7 +155,6 @@ result=$(dcld query pki noc-x509-ica-certs --vid="$vid") echo $result | jq check_response "$result" "Not Found" response_does_not_contain "$result" "\"subject\": \"$noc_cert_1_subject\"" -response_does_not_contain "$result" "\"subject\": \"$noc_cert_1_subject\"" response_does_not_contain "$result" "\"subject\": \"$noc_leaf_cert_1_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_leaf_cert_1_subject_key_id\"" @@ -177,6 +176,16 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_cert_1_serial_numb response_does_not_contain "$result" "\"serialNumber\": \"$noc_leaf_cert_1_serial_number\"" echo $result | jq +echo "Request NOC certificate by VID = $vid and SKID = $noc_cert_1_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_cert_1_subject_key_id") +echo $result | jq +check_response "$result" "Not Found" + +echo "Request NOC certificate by VID = $vid and SKID = $noc_leaf_cert_1_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_leaf_cert_1_subject_key_id") +echo $result | jq +check_response "$result" "Not Found" + test_divider echo "REVOCATION OF NOC NON-ROOT CERTIFICATES" @@ -270,4 +279,21 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_cert_2_copy_serial response_does_not_contain "$result" "\"serialNumber\": \"$noc_leaf_cert_2_serial_number\"" echo $result | jq +echo "Request NOC certificate by VID = $vid and SKID = $noc_cnoc_root_cert_2_subject_key_idert_2_subject_key_id should not be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_root_cert_2_subject_key_id") +echo $result | jq +check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\"" +check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\"" +check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\"" + +echo "Request NOC certificate by VID = $vid and SKID = $noc_cert_2_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_cert_2_subject_key_id") +echo $result | jq +check_response "$result" "Not Found" + +echo "Request NOC certificate by VID = $vid and SKID = $noc_leaf_cert_2_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_leaf_cert_2_subject_key_id") +echo $result | jq +check_response "$result" "Not Found" + test_divider \ No newline at end of file diff --git a/integration_tests/cli/pki-noc-revocation-with-serial-number.sh b/integration_tests/cli/pki-noc-revocation-with-serial-number.sh index 94c3c800b..ae4c43f8b 100755 --- a/integration_tests/cli/pki-noc-revocation-with-serial-number.sh +++ b/integration_tests/cli/pki-noc-revocation-with-serial-number.sh @@ -71,7 +71,7 @@ check_response "$result" "\"code\": 0" test_divider echo "Request NOC root certificate by VID = $vid and SKID=$noc_root_cert_1_subject_key_id" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\"" check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\"" @@ -144,7 +144,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_serial echo $result | jq echo "Request NOC root certificate by VID = $vid and SKID=$noc_root_cert_1_subject_key_id should contain only one root certificate with serialNumber=$noc_root_cert_1_copy_serial_number" -result=$(dcld query pki noc-x509-root-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_1_subject_key_id") check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\"" check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_serial_number\"" diff --git a/integration_tests/cli/pki-remove-noc-certificates.sh b/integration_tests/cli/pki-remove-noc-certificates.sh index ddc1230fe..af54a168c 100755 --- a/integration_tests/cli/pki-remove-noc-certificates.sh +++ b/integration_tests/cli/pki-remove-noc-certificates.sh @@ -313,4 +313,14 @@ check_response "$result" "\"serialNumber\": \"$intermediate_cert_1_serial_number response_does_not_contain "$result" "\"serialNumber\": \"$root_cert_1_serial_number" response_does_not_contain "$result" "\"serialNumber\": \"$root_cert_1_copy_serial_number" +echo "Request NOC certificate by VID = $vid and SKID = $intermediate_cert_subject_key_id should not be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$intermediate_cert_subject_key_id") +echo $result | jq +check_response "$result" "\"serialNumber\": \"$intermediate_cert_1_serial_number\"" + +echo "Request NOC certificate by VID = $vid and SKID = $root_cert_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$root_cert_subject_key_id") +echo $result | jq +check_response "$result" "Not Found" + test_divider From 0812bd15ff2ad48703148aba8c93c724f9f2a68a Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 03:12:22 +0300 Subject: [PATCH 10/16] added GET ICA by vid+skid to GRPC_REST tests Signed-off-by: DenisRybas --- .../grpc_rest/pki/noc_cert_helpers.go | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/integration_tests/grpc_rest/pki/noc_cert_helpers.go b/integration_tests/grpc_rest/pki/noc_cert_helpers.go index 15ebe35c3..3085d05f3 100644 --- a/integration_tests/grpc_rest/pki/noc_cert_helpers.go +++ b/integration_tests/grpc_rest/pki/noc_cert_helpers.go @@ -110,7 +110,7 @@ func GetNocX509CertsByVidAndSkid(suite *utils.TestSuite, vendorID int32, subject var res pkitypes.NocCertificatesByVidAndSkid if suite.Rest { var resp pkitypes.QueryGetNocCertificatesByVidAndSkidResponse - err := suite.QueryREST(fmt.Sprintf("/dcl/pki/noc-root-certificates/%v/%s", vendorID, url.QueryEscape(subjectKeyID)), &resp) + err := suite.QueryREST(fmt.Sprintf("/dcl/pki/noc-certificates/%v/%s", vendorID, url.QueryEscape(subjectKeyID)), &resp) if err != nil { return nil, err } @@ -372,6 +372,12 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, testconstants.NocCert1Subject, nocCert.Certs[0].Subject) require.Equal(suite.T, testconstants.NocCert1SubjectKeyID, nocCert.Certs[0].SubjectKeyId) + // Request NOC ICA certificate by VID1 + nocCertificatesByVidAndSkid, _ = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1SubjectKeyID) + require.Equal(suite.T, 1, len(nocCertificatesByVidAndSkid.Certs)) + require.Equal(suite.T, testconstants.NocCert1Subject, nocCertificatesByVidAndSkid.Certs[0].Subject) + require.Equal(suite.T, testconstants.NocCert1SubjectKeyID, nocCertificatesByVidAndSkid.Certs[0].SubjectKeyId) + // Request Child certificates list childCertificates, _ := GetAllChildX509Certs(suite, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(suite.T, testconstants.NocRootCert1Subject, childCertificates.Issuer) @@ -498,6 +504,10 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, testconstants.NocCert1SubjectKeyID, revokedCerts.SubjectKeyId) require.Equal(suite.T, testconstants.NocCert1SerialNumber, revokedCerts.Certs[0].SerialNumber) + // Request NOC ICA certificate by VID1 + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1SubjectKeyID) + suite.AssertNotFound(err) + // Check approved certificates certs, _ = GetX509Cert(suite, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) require.Equal(suite.T, 1, len(certs.Certs)) @@ -526,6 +536,10 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, testconstants.NocRootCert1SubjectKeyID, revokedCerts.SubjectKeyId) require.Equal(suite.T, testconstants.NocRootCert1SerialNumber, revokedCerts.Certs[0].SerialNumber) + // Request NOC ICA certificate by VID1 + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1Subject) + suite.AssertNotFound(err) + // Check approved certificate certs, _ = GetX509Cert(suite, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(suite.T, 1, len(certs.Certs)) @@ -567,6 +581,10 @@ func NocCertDemo(suite *utils.TestSuite) { _, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveCert}, vendor1Name, vendor1Account) require.NoError(suite.T, err) + // Request NOC ICA certificate by VID1 + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1Subject) + suite.AssertNotFound(err) + // Check that two intermediate ICA certificates are removed _, err = GetRevokedX509Cert(suite, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) suite.AssertNotFound(err) @@ -589,6 +607,10 @@ func NocCertDemo(suite *utils.TestSuite) { _, err = GetX509Cert(suite, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) suite.AssertNotFound(err) + // Request NOC ICA certificate by VID1 + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocLeafCert1SubjectKeyID) + suite.AssertNotFound(err) + certificates = GetNocX509IcaCertsBySubjectAndSKID(suite, vid1, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) require.Empty(suite.T, certificates) @@ -625,6 +647,10 @@ func NocCertDemo(suite *utils.TestSuite) { _, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveCert}, vendor1Name, vendor1Account) require.NoError(suite.T, err) + // Request NOC ICA certificate by VID1 + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1SubjectKeyID) + suite.AssertNotFound(err) + // Check that leaf and ICA with different serial number is not removed certs, _ = GetX509Cert(suite, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) require.Equal(suite.T, 1, len(certs.Certs)) @@ -663,6 +689,13 @@ func NocCertDemo(suite *utils.TestSuite) { _, err = GetX509Cert(suite, testconstants.NocLeafCert1Subject, testconstants.NocLeafCert1SubjectKeyID) suite.AssertNotFound(err) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) + suite.AssertNotFound(err) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1SubjectKeyID) + suite.AssertNotFound(err) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocLeafCert1SubjectKeyID) + suite.AssertNotFound(err) + _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1SubjectKeyID) suite.AssertNotFound(err) certificates = GetNocX509IcaCertsBySubjectAndSKID(suite, vid1, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) From d59c43a6f4bafcb23017b1b77d60d5a0c41bc230 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 03:38:33 +0300 Subject: [PATCH 11/16] fixed tests Signed-off-by: DenisRybas --- integration_tests/cli/pki-noc-certs.sh | 4 ++-- .../cli/pki-noc-revocation-with-revoking-child.sh | 10 +++++----- integration_tests/cli/pki-remove-noc-certificates.sh | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/integration_tests/cli/pki-noc-certs.sh b/integration_tests/cli/pki-noc-certs.sh index eba81fe81..c2f3e20be 100755 --- a/integration_tests/cli/pki-noc-certs.sh +++ b/integration_tests/cli/pki-noc-certs.sh @@ -539,12 +539,12 @@ response_does_not_contain "$result" "\"subject\": \"$noc_cert_1_subject\"" response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\"" echo "Request NOC certificate by VID = $vid and SKID = $noc_cert_1_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_cert_1_subject_key_id") echo $result | jq check_response "$result" "Not Found" echo "Request NOC certificate by VID = $vid and SKID = $noc_leaf_cert_1_subject_key_id should contain one leaf certificate" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_leaf_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_leaf_cert_1_subject_key_id") echo $result | jq check_response "$result" "\"subject\": \"$noc_leaf_cert_1_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_leaf_cert_1_subject_key_id\"" diff --git a/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh b/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh index addffc445..7a1661677 100755 --- a/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh +++ b/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh @@ -177,12 +177,12 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_leaf_cert_1_serial echo $result | jq echo "Request NOC certificate by VID = $vid and SKID = $noc_cert_1_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_cert_1_subject_key_id") echo $result | jq check_response "$result" "Not Found" echo "Request NOC certificate by VID = $vid and SKID = $noc_leaf_cert_1_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_leaf_cert_1_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_leaf_cert_1_subject_key_id") echo $result | jq check_response "$result" "Not Found" @@ -280,19 +280,19 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_leaf_cert_2_serial echo $result | jq echo "Request NOC certificate by VID = $vid and SKID = $noc_cnoc_root_cert_2_subject_key_idert_2_subject_key_id should not be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_root_cert_2_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") echo $result | jq check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\"" check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\"" check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\"" echo "Request NOC certificate by VID = $vid and SKID = $noc_cert_2_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_cert_2_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_cert_2_subject_key_id") echo $result | jq check_response "$result" "Not Found" echo "Request NOC certificate by VID = $vid and SKID = $noc_leaf_cert_2_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$noc_leaf_cert_2_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_leaf_cert_2_subject_key_id") echo $result | jq check_response "$result" "Not Found" diff --git a/integration_tests/cli/pki-remove-noc-certificates.sh b/integration_tests/cli/pki-remove-noc-certificates.sh index af54a168c..a6f153270 100755 --- a/integration_tests/cli/pki-remove-noc-certificates.sh +++ b/integration_tests/cli/pki-remove-noc-certificates.sh @@ -314,12 +314,12 @@ response_does_not_contain "$result" "\"serialNumber\": \"$root_cert_1_serial_num response_does_not_contain "$result" "\"serialNumber\": \"$root_cert_1_copy_serial_number" echo "Request NOC certificate by VID = $vid and SKID = $intermediate_cert_subject_key_id should not be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$intermediate_cert_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$intermediate_cert_subject_key_id") echo $result | jq check_response "$result" "\"serialNumber\": \"$intermediate_cert_1_serial_number\"" echo "Request NOC certificate by VID = $vid and SKID = $root_cert_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --skid="$root_cert_subject_key_id") +result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$root_cert_subject_key_id") echo $result | jq check_response "$result" "Not Found" From 836ab2395b31898bd0a38442b745fc31aefa46be Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 13:29:14 +0300 Subject: [PATCH 12/16] fixed cli tests Signed-off-by: DenisRybas --- integration_tests/cli/pki-noc-revocation-with-revoking-child.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh b/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh index 7a1661677..0dee1607e 100755 --- a/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh +++ b/integration_tests/cli/pki-noc-revocation-with-revoking-child.sh @@ -279,7 +279,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_cert_2_copy_serial response_does_not_contain "$result" "\"serialNumber\": \"$noc_leaf_cert_2_serial_number\"" echo $result | jq -echo "Request NOC certificate by VID = $vid and SKID = $noc_cnoc_root_cert_2_subject_key_idert_2_subject_key_id should not be empty" +echo "Request NOC certificate by VID = $vid and SKID = $noc_root_cert_2_subject_key_id should not be empty" result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$noc_root_cert_2_subject_key_id") echo $result | jq check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\"" From 69895309a1a95bfa162e582d697108a06cbc27c4 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 15:04:19 +0300 Subject: [PATCH 13/16] added script for NocCertificatesByVidAndSkid mapping Signed-off-by: DenisRybas --- scripts/ignite/07.pki_types.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/ignite/07.pki_types.sh b/scripts/ignite/07.pki_types.sh index 00f304ddf..d25776d1e 100755 --- a/scripts/ignite/07.pki_types.sh +++ b/scripts/ignite/07.pki_types.sh @@ -3,3 +3,6 @@ # messages ignite scaffold --module pki message RemoveNocX509IcaCert subject subjectKeyId serialNumber --signer signer ignite scaffold --module pki message RemoveNocX509RootCert subject subjectKeyId serialNumber --signer signer + +# CRUD data types +ignite scaffold --module pki map NocCertificatesByVidAndSkid certs:strings tq:uint schemaVersion:uint --index vid:uint,subjectKeyId --no-message From b5eff9f2b5676488262752a0b9700c338e826f24 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 15:09:16 +0300 Subject: [PATCH 14/16] fixed tests Signed-off-by: DenisRybas --- integration_tests/cli/pki-remove-noc-certificates.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration_tests/cli/pki-remove-noc-certificates.sh b/integration_tests/cli/pki-remove-noc-certificates.sh index a6f153270..48693971f 100755 --- a/integration_tests/cli/pki-remove-noc-certificates.sh +++ b/integration_tests/cli/pki-remove-noc-certificates.sh @@ -313,13 +313,13 @@ check_response "$result" "\"serialNumber\": \"$intermediate_cert_1_serial_number response_does_not_contain "$result" "\"serialNumber\": \"$root_cert_1_serial_number" response_does_not_contain "$result" "\"serialNumber\": \"$root_cert_1_copy_serial_number" -echo "Request NOC certificate by VID = $vid and SKID = $intermediate_cert_subject_key_id should not be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$intermediate_cert_subject_key_id") +echo "Request NOC certificate by VID = $root_cert_vid and SKID = $intermediate_cert_subject_key_id should not be empty" +result=$(dcld query pki noc-x509-certs --vid="$root_cert_vid" --subject-key-id="$intermediate_cert_subject_key_id") echo $result | jq check_response "$result" "\"serialNumber\": \"$intermediate_cert_1_serial_number\"" -echo "Request NOC certificate by VID = $vid and SKID = $root_cert_subject_key_id should be empty" -result=$(dcld query pki noc-x509-certs --vid="$vid" --subject-key-id="$root_cert_subject_key_id") +echo "Request NOC certificate by VID = $root_cert_vid and SKID = $root_cert_subject_key_id should be empty" +result=$(dcld query pki noc-x509-certs --vid="$root_cert_vid" --subject-key-id="$root_cert_subject_key_id") echo $result | jq check_response "$result" "Not Found" From e59c9b13170f888090bf75008166f6ed4b28bd70 Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Mon, 29 Jul 2024 18:49:49 +0300 Subject: [PATCH 15/16] fixed integration tests Signed-off-by: DenisRybas --- integration_tests/grpc_rest/pki/noc_cert_helpers.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/integration_tests/grpc_rest/pki/noc_cert_helpers.go b/integration_tests/grpc_rest/pki/noc_cert_helpers.go index 3085d05f3..40a3dab05 100644 --- a/integration_tests/grpc_rest/pki/noc_cert_helpers.go +++ b/integration_tests/grpc_rest/pki/noc_cert_helpers.go @@ -504,10 +504,6 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, testconstants.NocCert1SubjectKeyID, revokedCerts.SubjectKeyId) require.Equal(suite.T, testconstants.NocCert1SerialNumber, revokedCerts.Certs[0].SerialNumber) - // Request NOC ICA certificate by VID1 - _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1SubjectKeyID) - suite.AssertNotFound(err) - // Check approved certificates certs, _ = GetX509Cert(suite, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) require.Equal(suite.T, 1, len(certs.Certs)) @@ -536,10 +532,6 @@ func NocCertDemo(suite *utils.TestSuite) { require.Equal(suite.T, testconstants.NocRootCert1SubjectKeyID, revokedCerts.SubjectKeyId) require.Equal(suite.T, testconstants.NocRootCert1SerialNumber, revokedCerts.Certs[0].SerialNumber) - // Request NOC ICA certificate by VID1 - _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocRootCert1Subject) - suite.AssertNotFound(err) - // Check approved certificate certs, _ = GetX509Cert(suite, testconstants.NocRootCert1Subject, testconstants.NocRootCert1SubjectKeyID) require.Equal(suite.T, 1, len(certs.Certs)) @@ -647,10 +639,6 @@ func NocCertDemo(suite *utils.TestSuite) { _, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveCert}, vendor1Name, vendor1Account) require.NoError(suite.T, err) - // Request NOC ICA certificate by VID1 - _, err = GetNocX509CertsByVidAndSkid(suite, vid1, testconstants.NocCert1SubjectKeyID) - suite.AssertNotFound(err) - // Check that leaf and ICA with different serial number is not removed certs, _ = GetX509Cert(suite, testconstants.NocCert1Subject, testconstants.NocCert1SubjectKeyID) require.Equal(suite.T, 1, len(certs.Certs)) From 2466d23435c0e21d290bbd4a06cba6caca73db3c Mon Sep 17 00:00:00 2001 From: DenisRybas Date: Tue, 30 Jul 2024 10:29:35 +0300 Subject: [PATCH 16/16] Clarified the docs Signed-off-by: DenisRybas --- docs/transactions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/transactions.md b/docs/transactions.md index 159090789..7cc4b6402 100644 --- a/docs/transactions.md +++ b/docs/transactions.md @@ -1529,7 +1529,7 @@ Use [GET_ALL_REVOKED_NOC_ROOT](#get_revoked_noc_root) to get a list of all revok **Status: Implemented** -Retrieve NOC certificates associated with a specific VID and subject key ID. +Retrieve NOC (Root/ICA) certificates associated with a specific VID and subject key ID. This request also returns the Trust Quotient (TQ) value of the certificate Revoked NOC certificates are not returned.