From 642e1629700c30882ea45e95b9780f823c2b6467 Mon Sep 17 00:00:00 2001 From: Yogesh Deshpande Date: Wed, 1 May 2024 12:10:39 -0400 Subject: [PATCH] CoRIM Provisioning Plugin Signed-off-by: Yogesh Deshpande --- scheme/Makefile | 2 +- scheme/{cca-realm => cca-realm-provisioning}/Makefile | 2 +- scheme/{cca-realm => cca-realm-provisioning}/README.md | 0 scheme/{cca-realm => cca-realm-provisioning}/classattributes.go | 2 +- scheme/{cca-realm => cca-realm-provisioning}/corim_extractor.go | 2 +- .../{cca-realm => cca-realm-provisioning}/corim_test_vectors.go | 2 +- .../endorsement_handler.go | 2 +- .../endorsement_handler_test.go | 2 +- .../{cca-realm => cca-realm-provisioning}/instanceattributes.go | 2 +- scheme/{cca-realm => cca-realm-provisioning}/plugin/Makefile | 0 .../plugin/combined/Makefile | 2 +- .../plugin/combined/main.go | 2 +- .../plugin/endorsement-handler/Makefile | 2 +- .../plugin/endorsement-handler/main.go | 2 +- .../plugin/store-handler/Makefile | 2 +- .../plugin/store-handler/main.go | 2 +- scheme/{cca-realm => cca-realm-provisioning}/realmattributes.go | 2 +- scheme/{cca-realm => cca-realm-provisioning}/scheme.go | 2 +- scheme/{cca-realm => cca-realm-provisioning}/store_handler.go | 2 +- .../{cca-realm => cca-realm-provisioning}/store_handler_test.go | 2 +- .../{cca-realm => cca-realm-provisioning}/test/corim/Makefile | 0 .../test/corim/build-test-vectors.sh | 0 .../test/corim/comidCcaRealm.json | 0 .../test/corim/comidCcaRealmInvalidClass.json | 0 .../test/corim/comidCcaRealmInvalidInstance.json | 0 .../test/corim/comidCcaRealmNoClass.json | 0 .../test/corim/comidCcaRealmNoInstance.json | 0 .../test/corim/corimCcaRealm.json | 0 .../test/store/refvalEndorsements.json | 0 scheme/cca-realm/test/corim/test | 2 -- 30 files changed, 18 insertions(+), 20 deletions(-) rename scheme/{cca-realm => cca-realm-provisioning}/Makefile (80%) rename scheme/{cca-realm => cca-realm-provisioning}/README.md (100%) rename scheme/{cca-realm => cca-realm-provisioning}/classattributes.go (96%) rename scheme/{cca-realm => cca-realm-provisioning}/corim_extractor.go (98%) rename scheme/{cca-realm => cca-realm-provisioning}/corim_test_vectors.go (99%) rename scheme/{cca-realm => cca-realm-provisioning}/endorsement_handler.go (96%) rename scheme/{cca-realm => cca-realm-provisioning}/endorsement_handler_test.go (98%) rename scheme/{cca-realm => cca-realm-provisioning}/instanceattributes.go (94%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/Makefile (100%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/combined/Makefile (80%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/combined/main.go (81%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/endorsement-handler/Makefile (81%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/endorsement-handler/main.go (81%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/store-handler/Makefile (81%) rename scheme/{cca-realm => cca-realm-provisioning}/plugin/store-handler/main.go (80%) rename scheme/{cca-realm => cca-realm-provisioning}/realmattributes.go (98%) rename scheme/{cca-realm => cca-realm-provisioning}/scheme.go (88%) rename scheme/{cca-realm => cca-realm-provisioning}/store_handler.go (98%) rename scheme/{cca-realm => cca-realm-provisioning}/store_handler_test.go (98%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/Makefile (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/build-test-vectors.sh (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/comidCcaRealm.json (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/comidCcaRealmInvalidClass.json (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/comidCcaRealmInvalidInstance.json (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/comidCcaRealmNoClass.json (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/comidCcaRealmNoInstance.json (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/corim/corimCcaRealm.json (100%) rename scheme/{cca-realm => cca-realm-provisioning}/test/store/refvalEndorsements.json (100%) delete mode 100644 scheme/cca-realm/test/corim/test diff --git a/scheme/Makefile b/scheme/Makefile index 0e807e75..0683e01f 100644 --- a/scheme/Makefile +++ b/scheme/Makefile @@ -8,7 +8,7 @@ SUBDIR += psa-iot SUBDIR += tpm-enacttrust SUBDIR += parsec-tpm SUBDIR += parsec-cca -SUBDIR += cca-realm +SUBDIR += cca-realm-provisioning clean: ; $(RM) -rf ./bin diff --git a/scheme/cca-realm/Makefile b/scheme/cca-realm-provisioning/Makefile similarity index 80% rename from scheme/cca-realm/Makefile rename to scheme/cca-realm-provisioning/Makefile index 580e4a96..3b26e359 100644 --- a/scheme/cca-realm/Makefile +++ b/scheme/cca-realm-provisioning/Makefile @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 .DEFAULT_GOAL := test -GOPKG := github.com/veraison/services/scheme/cca-realm +GOPKG := github.com/veraison/services/scheme/cca-realm-provisioning SRCS := $(wildcard *.go) SUBDIR += plugin diff --git a/scheme/cca-realm/README.md b/scheme/cca-realm-provisioning/README.md similarity index 100% rename from scheme/cca-realm/README.md rename to scheme/cca-realm-provisioning/README.md diff --git a/scheme/cca-realm/classattributes.go b/scheme/cca-realm-provisioning/classattributes.go similarity index 96% rename from scheme/cca-realm/classattributes.go rename to scheme/cca-realm-provisioning/classattributes.go index 752f25f2..b19d7822 100644 --- a/scheme/cca-realm/classattributes.go +++ b/scheme/cca-realm-provisioning/classattributes.go @@ -1,6 +1,6 @@ // Copyright 2022-2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "errors" diff --git a/scheme/cca-realm/corim_extractor.go b/scheme/cca-realm-provisioning/corim_extractor.go similarity index 98% rename from scheme/cca-realm/corim_extractor.go rename to scheme/cca-realm-provisioning/corim_extractor.go index 0cdeef78..c484523b 100644 --- a/scheme/cca-realm/corim_extractor.go +++ b/scheme/cca-realm-provisioning/corim_extractor.go @@ -1,6 +1,6 @@ // Copyright 2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "encoding/json" diff --git a/scheme/cca-realm/corim_test_vectors.go b/scheme/cca-realm-provisioning/corim_test_vectors.go similarity index 99% rename from scheme/cca-realm/corim_test_vectors.go rename to scheme/cca-realm-provisioning/corim_test_vectors.go index 28aed65f..ca8bb5eb 100644 --- a/scheme/cca-realm/corim_test_vectors.go +++ b/scheme/cca-realm-provisioning/corim_test_vectors.go @@ -1,7 +1,7 @@ // Copyright 2022-2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning // automatically generated from: // comidCcaRealm.json and corimCcaRealm.json diff --git a/scheme/cca-realm/endorsement_handler.go b/scheme/cca-realm-provisioning/endorsement_handler.go similarity index 96% rename from scheme/cca-realm/endorsement_handler.go rename to scheme/cca-realm-provisioning/endorsement_handler.go index 7035bd6a..d68f09d6 100644 --- a/scheme/cca-realm/endorsement_handler.go +++ b/scheme/cca-realm-provisioning/endorsement_handler.go @@ -1,6 +1,6 @@ // Copyright 2022-2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "github.com/veraison/services/handler" diff --git a/scheme/cca-realm/endorsement_handler_test.go b/scheme/cca-realm-provisioning/endorsement_handler_test.go similarity index 98% rename from scheme/cca-realm/endorsement_handler_test.go rename to scheme/cca-realm-provisioning/endorsement_handler_test.go index 88cf3b07..9a5ceaf7 100644 --- a/scheme/cca-realm/endorsement_handler_test.go +++ b/scheme/cca-realm-provisioning/endorsement_handler_test.go @@ -1,6 +1,6 @@ // Copyright 2022-2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "testing" diff --git a/scheme/cca-realm/instanceattributes.go b/scheme/cca-realm-provisioning/instanceattributes.go similarity index 94% rename from scheme/cca-realm/instanceattributes.go rename to scheme/cca-realm-provisioning/instanceattributes.go index 4bc0cb0b..dc154135 100644 --- a/scheme/cca-realm/instanceattributes.go +++ b/scheme/cca-realm-provisioning/instanceattributes.go @@ -1,6 +1,6 @@ // Copyright 2022-2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "errors" diff --git a/scheme/cca-realm/plugin/Makefile b/scheme/cca-realm-provisioning/plugin/Makefile similarity index 100% rename from scheme/cca-realm/plugin/Makefile rename to scheme/cca-realm-provisioning/plugin/Makefile diff --git a/scheme/cca-realm/plugin/combined/Makefile b/scheme/cca-realm-provisioning/plugin/combined/Makefile similarity index 80% rename from scheme/cca-realm/plugin/combined/Makefile rename to scheme/cca-realm-provisioning/plugin/combined/Makefile index 909809c2..38179414 100644 --- a/scheme/cca-realm/plugin/combined/Makefile +++ b/scheme/cca-realm-provisioning/plugin/combined/Makefile @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 PLUGIN := ../../../bin/cca-realm.plugin -GOPKG := github.com/veraison/services/scheme/cca-realm +GOPKG := github.com/veraison/services/scheme/cca-realm-provisioning SRCS := main.go include ../../../../mk/common.mk diff --git a/scheme/cca-realm/plugin/combined/main.go b/scheme/cca-realm-provisioning/plugin/combined/main.go similarity index 81% rename from scheme/cca-realm/plugin/combined/main.go rename to scheme/cca-realm-provisioning/plugin/combined/main.go index 27762b53..95dadb9d 100644 --- a/scheme/cca-realm/plugin/combined/main.go +++ b/scheme/cca-realm-provisioning/plugin/combined/main.go @@ -5,7 +5,7 @@ package main import ( "github.com/veraison/services/handler" "github.com/veraison/services/plugin" - scheme "github.com/veraison/services/scheme/cca-realm" + scheme "github.com/veraison/services/scheme/cca-realm-provisioning" ) func main() { diff --git a/scheme/cca-realm/plugin/endorsement-handler/Makefile b/scheme/cca-realm-provisioning/plugin/endorsement-handler/Makefile similarity index 81% rename from scheme/cca-realm/plugin/endorsement-handler/Makefile rename to scheme/cca-realm-provisioning/plugin/endorsement-handler/Makefile index ed5b533b..f6f2f6da 100644 --- a/scheme/cca-realm/plugin/endorsement-handler/Makefile +++ b/scheme/cca-realm-provisioning/plugin/endorsement-handler/Makefile @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 PLUGIN := ../../../bin/cca-realm-endorsement-handler.plugin -GOPKG := github.com/veraison/services/scheme/cca-realm +GOPKG := github.com/veraison/services/scheme/cca-realm-provisioning SRCS := main.go include ../../../../mk/common.mk diff --git a/scheme/cca-realm/plugin/endorsement-handler/main.go b/scheme/cca-realm-provisioning/plugin/endorsement-handler/main.go similarity index 81% rename from scheme/cca-realm/plugin/endorsement-handler/main.go rename to scheme/cca-realm-provisioning/plugin/endorsement-handler/main.go index 8860ec25..552fc7e4 100644 --- a/scheme/cca-realm/plugin/endorsement-handler/main.go +++ b/scheme/cca-realm-provisioning/plugin/endorsement-handler/main.go @@ -5,7 +5,7 @@ package main import ( "github.com/veraison/services/handler" "github.com/veraison/services/plugin" - scheme "github.com/veraison/services/scheme/cca-realm" + scheme "github.com/veraison/services/scheme/cca-realm-provisioning" ) func main() { diff --git a/scheme/cca-realm/plugin/store-handler/Makefile b/scheme/cca-realm-provisioning/plugin/store-handler/Makefile similarity index 81% rename from scheme/cca-realm/plugin/store-handler/Makefile rename to scheme/cca-realm-provisioning/plugin/store-handler/Makefile index f9cb88c2..28d5d4a2 100644 --- a/scheme/cca-realm/plugin/store-handler/Makefile +++ b/scheme/cca-realm-provisioning/plugin/store-handler/Makefile @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 PLUGIN := ../../../bin/cca-realm-store-handler.plugin -GOPKG := github.com/veraison/services/scheme/cca-realm +GOPKG := github.com/veraison/services/scheme/cca-realm-provisioning SRCS := main.go include ../../../../mk/common.mk diff --git a/scheme/cca-realm/plugin/store-handler/main.go b/scheme/cca-realm-provisioning/plugin/store-handler/main.go similarity index 80% rename from scheme/cca-realm/plugin/store-handler/main.go rename to scheme/cca-realm-provisioning/plugin/store-handler/main.go index 86d4cd8a..56bde9c0 100644 --- a/scheme/cca-realm/plugin/store-handler/main.go +++ b/scheme/cca-realm-provisioning/plugin/store-handler/main.go @@ -5,7 +5,7 @@ package main import ( "github.com/veraison/services/handler" "github.com/veraison/services/plugin" - scheme "github.com/veraison/services/scheme/cca-realm" + scheme "github.com/veraison/services/scheme/cca-realm-provisioning" ) func main() { diff --git a/scheme/cca-realm/realmattributes.go b/scheme/cca-realm-provisioning/realmattributes.go similarity index 98% rename from scheme/cca-realm/realmattributes.go rename to scheme/cca-realm-provisioning/realmattributes.go index 2f5b40ad..9a6eb64a 100644 --- a/scheme/cca-realm/realmattributes.go +++ b/scheme/cca-realm-provisioning/realmattributes.go @@ -1,6 +1,6 @@ // Copyright 2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "errors" diff --git a/scheme/cca-realm/scheme.go b/scheme/cca-realm-provisioning/scheme.go similarity index 88% rename from scheme/cca-realm/scheme.go rename to scheme/cca-realm-provisioning/scheme.go index dca6fd7b..67a33a65 100644 --- a/scheme/cca-realm/scheme.go +++ b/scheme/cca-realm-provisioning/scheme.go @@ -1,6 +1,6 @@ // Copyright 2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning const SchemeName = "CCA_REALM" diff --git a/scheme/cca-realm/store_handler.go b/scheme/cca-realm-provisioning/store_handler.go similarity index 98% rename from scheme/cca-realm/store_handler.go rename to scheme/cca-realm-provisioning/store_handler.go index 5552d6d6..88385a45 100644 --- a/scheme/cca-realm/store_handler.go +++ b/scheme/cca-realm-provisioning/store_handler.go @@ -1,7 +1,7 @@ // Copyright 2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "fmt" diff --git a/scheme/cca-realm/store_handler_test.go b/scheme/cca-realm-provisioning/store_handler_test.go similarity index 98% rename from scheme/cca-realm/store_handler_test.go rename to scheme/cca-realm-provisioning/store_handler_test.go index 18782bf4..5d90df75 100644 --- a/scheme/cca-realm/store_handler_test.go +++ b/scheme/cca-realm-provisioning/store_handler_test.go @@ -1,7 +1,7 @@ // Copyright 2021-2024 Contributors to the Veraison project. // SPDX-License-Identifier: Apache-2.0 -package cca_realm +package cca_realm_provisioning import ( "encoding/json" diff --git a/scheme/cca-realm/test/corim/Makefile b/scheme/cca-realm-provisioning/test/corim/Makefile similarity index 100% rename from scheme/cca-realm/test/corim/Makefile rename to scheme/cca-realm-provisioning/test/corim/Makefile diff --git a/scheme/cca-realm/test/corim/build-test-vectors.sh b/scheme/cca-realm-provisioning/test/corim/build-test-vectors.sh similarity index 100% rename from scheme/cca-realm/test/corim/build-test-vectors.sh rename to scheme/cca-realm-provisioning/test/corim/build-test-vectors.sh diff --git a/scheme/cca-realm/test/corim/comidCcaRealm.json b/scheme/cca-realm-provisioning/test/corim/comidCcaRealm.json similarity index 100% rename from scheme/cca-realm/test/corim/comidCcaRealm.json rename to scheme/cca-realm-provisioning/test/corim/comidCcaRealm.json diff --git a/scheme/cca-realm/test/corim/comidCcaRealmInvalidClass.json b/scheme/cca-realm-provisioning/test/corim/comidCcaRealmInvalidClass.json similarity index 100% rename from scheme/cca-realm/test/corim/comidCcaRealmInvalidClass.json rename to scheme/cca-realm-provisioning/test/corim/comidCcaRealmInvalidClass.json diff --git a/scheme/cca-realm/test/corim/comidCcaRealmInvalidInstance.json b/scheme/cca-realm-provisioning/test/corim/comidCcaRealmInvalidInstance.json similarity index 100% rename from scheme/cca-realm/test/corim/comidCcaRealmInvalidInstance.json rename to scheme/cca-realm-provisioning/test/corim/comidCcaRealmInvalidInstance.json diff --git a/scheme/cca-realm/test/corim/comidCcaRealmNoClass.json b/scheme/cca-realm-provisioning/test/corim/comidCcaRealmNoClass.json similarity index 100% rename from scheme/cca-realm/test/corim/comidCcaRealmNoClass.json rename to scheme/cca-realm-provisioning/test/corim/comidCcaRealmNoClass.json diff --git a/scheme/cca-realm/test/corim/comidCcaRealmNoInstance.json b/scheme/cca-realm-provisioning/test/corim/comidCcaRealmNoInstance.json similarity index 100% rename from scheme/cca-realm/test/corim/comidCcaRealmNoInstance.json rename to scheme/cca-realm-provisioning/test/corim/comidCcaRealmNoInstance.json diff --git a/scheme/cca-realm/test/corim/corimCcaRealm.json b/scheme/cca-realm-provisioning/test/corim/corimCcaRealm.json similarity index 100% rename from scheme/cca-realm/test/corim/corimCcaRealm.json rename to scheme/cca-realm-provisioning/test/corim/corimCcaRealm.json diff --git a/scheme/cca-realm/test/store/refvalEndorsements.json b/scheme/cca-realm-provisioning/test/store/refvalEndorsements.json similarity index 100% rename from scheme/cca-realm/test/store/refvalEndorsements.json rename to scheme/cca-realm-provisioning/test/store/refvalEndorsements.json diff --git a/scheme/cca-realm/test/corim/test b/scheme/cca-realm/test/corim/test deleted file mode 100644 index c656863e..00000000 --- a/scheme/cca-realm/test/corim/test +++ /dev/null @@ -1,2 +0,0 @@ -package cca_realm -