diff --git a/Makefile b/Makefile index 1511e322..de492694 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ SHELL := /bin/bash GO111MODULE := on -GOPKG := github.com/veraison/corim/v2/corim -GOPKG += github.com/veraison/corim/v2/comid -GOPKG += github.com/veraison/corim/v2/cots -GOPKG += github.com/veraison/corim/v2/cocli/cmd +GOPKG := github.com/veraison/corim/corim +GOPKG += github.com/veraison/corim/comid +GOPKG += github.com/veraison/corim/cots +GOPKG += github.com/veraison/corim/cocli/cmd MOCKGEN := $(shell go env GOPATH)/bin/mockgen INTERFACES := cocli/cmd/isubmitter.go diff --git a/README.md b/README.md index 6f9f5685..7dc87de8 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ [![linters](https://github.com/veraison/corim/actions/workflows/linters.yml/badge.svg)](https://github.com/veraison/corim/actions/workflows/linters.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/veraison/corim.svg)](https://pkg.go.dev/github.com/veraison/corim) -The [`corim/v2/corim`](corim) and [`corim/v2/comid`](comid) packages provide a golang API for low-level manipulation of [Concise Reference Integrity Manifest (CoRIM)](https://datatracker.ietf.org/doc/draft-ietf-rats-corim/) and Concise Module Identifier (CoMID) tags respectively. +The [`corim/corim`](corim) and [`corim/comid`](comid) packages provide a golang API for low-level manipulation of [Concise Reference Integrity Manifest (CoRIM)](https://datatracker.ietf.org/doc/draft-birkholz-rats-corim/) and Concise Module Identifier (CoMID) tags respectively. > [!NOTE] > These API are still in active development (as is the underlying CoRIM spec). > They are **subject to change** in the future. -The [`corim/v2/cocli`](cocli) package uses the API above (as well as the API from [`veraison/swid`](https://github.com/veraison/swid) package) to provide a user friendly command line interface for working with CoRIM, CoMID, CoSWID and CoTS. Specifically it allows creating, signing, verifying, displaying, uploading, and more. See [`cocli/README.md`](cocli/README.md) for further details. +The [`corim/cocli`](cocli) package uses the API above (as well as the API from [`veraison/swid`](https://github.com/veraison/swid) package) to provide a user friendly command line interface for working with CoRIM, CoMID, CoSWID and CoTS. Specifically it allows creating, signing, verifying, displaying, uploading, and more. See [`cocli/README.md`](cocli/README.md) for further details. ## Developer tips diff --git a/cocli/cmd/comidCreate.go b/cocli/cmd/comidCreate.go index b28a4847..bc70c0cc 100644 --- a/cocli/cmd/comidCreate.go +++ b/cocli/cmd/comidCreate.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) var ( diff --git a/cocli/cmd/comidCreate_test.go b/cocli/cmd/comidCreate_test.go index 63ee4ce3..b651ebd6 100644 --- a/cocli/cmd/comidCreate_test.go +++ b/cocli/cmd/comidCreate_test.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) func Test_ComidCreateCmd_unknown_argument(t *testing.T) { diff --git a/cocli/cmd/comidValidate.go b/cocli/cmd/comidValidate.go index f799796c..5fe7ff1f 100644 --- a/cocli/cmd/comidValidate.go +++ b/cocli/cmd/comidValidate.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) var ( diff --git a/cocli/cmd/common.go b/cocli/cmd/common.go index be8493f0..8ba508b0 100644 --- a/cocli/cmd/common.go +++ b/cocli/cmd/common.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/spf13/afero" - "github.com/veraison/corim/v2/comid" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/comid" + "github.com/veraison/corim/cots" "github.com/veraison/swid" ) diff --git a/cocli/cmd/corimCreate.go b/cocli/cmd/corimCreate.go index 34dbb92b..d4206464 100644 --- a/cocli/cmd/corimCreate.go +++ b/cocli/cmd/corimCreate.go @@ -9,9 +9,9 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/comid" - "github.com/veraison/corim/v2/corim" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/comid" + "github.com/veraison/corim/corim" + "github.com/veraison/corim/cots" "github.com/veraison/swid" ) diff --git a/cocli/cmd/corimDisplay.go b/cocli/cmd/corimDisplay.go index 6650feb4..dfc9dcf2 100644 --- a/cocli/cmd/corimDisplay.go +++ b/cocli/cmd/corimDisplay.go @@ -11,8 +11,8 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/corim" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/corim" + "github.com/veraison/corim/cots" ) var ( diff --git a/cocli/cmd/corimExtract.go b/cocli/cmd/corimExtract.go index f88dbd8b..80d39fd5 100644 --- a/cocli/cmd/corimExtract.go +++ b/cocli/cmd/corimExtract.go @@ -11,8 +11,8 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/corim" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/corim" + "github.com/veraison/corim/cots" ) var ( diff --git a/cocli/cmd/corimSign.go b/cocli/cmd/corimSign.go index 67e52ae1..bf9bb8b2 100644 --- a/cocli/cmd/corimSign.go +++ b/cocli/cmd/corimSign.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/corim" + "github.com/veraison/corim/corim" cose "github.com/veraison/go-cose" ) diff --git a/cocli/cmd/corimSubmit_test.go b/cocli/cmd/corimSubmit_test.go index 3d9ed4cd..5fa29d20 100644 --- a/cocli/cmd/corimSubmit_test.go +++ b/cocli/cmd/corimSubmit_test.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - mock_deps "github.com/veraison/corim/v2/cocli/cmd/mocks" + mock_deps "github.com/veraison/corim/cocli/cmd/mocks" ) func Test_CorimSubmitCmd_bad_server_url(t *testing.T) { diff --git a/cocli/cmd/corimVerify.go b/cocli/cmd/corimVerify.go index 24988890..6c5043d3 100644 --- a/cocli/cmd/corimVerify.go +++ b/cocli/cmd/corimVerify.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/corim" + "github.com/veraison/corim/corim" ) var ( diff --git a/cocli/cmd/cotsCreate.go b/cocli/cmd/cotsCreate.go index 22686045..eb3c52dd 100644 --- a/cocli/cmd/cotsCreate.go +++ b/cocli/cmd/cotsCreate.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/cots" ) var ( diff --git a/cocli/cmd/test_vars.go b/cocli/cmd/test_vars.go index 7a452ba7..e4f05190 100644 --- a/cocli/cmd/test_vars.go +++ b/cocli/cmd/test_vars.go @@ -3,7 +3,7 @@ package cmd -import "github.com/veraison/corim/v2/comid" +import "github.com/veraison/corim/comid" var ( minimalCorimTemplate = []byte(`{ diff --git a/cocli/main.go b/cocli/main.go index 7af5ab14..c3fc2a3f 100644 --- a/cocli/main.go +++ b/cocli/main.go @@ -4,7 +4,7 @@ package main import ( - "github.com/veraison/corim/v2/cocli/cmd" + "github.com/veraison/corim/cocli/cmd" ) func main() { diff --git a/corim/cbor.go b/corim/cbor.go index 3b59c6bc..ec15e95f 100644 --- a/corim/cbor.go +++ b/corim/cbor.go @@ -7,7 +7,7 @@ import ( "reflect" cbor "github.com/fxamacker/cbor/v2" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) var ( diff --git a/corim/entity.go b/corim/entity.go index da8d56fa..49aa1468 100644 --- a/corim/entity.go +++ b/corim/entity.go @@ -6,7 +6,7 @@ package corim import ( "fmt" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) // Entity stores an entity-map capable of CBOR and JSON serializations. diff --git a/corim/entity_test.go b/corim/entity_test.go index 46c95bda..457b3770 100644 --- a/corim/entity_test.go +++ b/corim/entity_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) func TestEntity_Valid_uninitialized(t *testing.T) { diff --git a/corim/meta.go b/corim/meta.go index 25cc9d6f..45f1ea49 100644 --- a/corim/meta.go +++ b/corim/meta.go @@ -9,7 +9,7 @@ import ( "fmt" "time" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) type Signer struct { diff --git a/corim/meta_test.go b/corim/meta_test.go index ae37c16f..a4dd34cd 100644 --- a/corim/meta_test.go +++ b/corim/meta_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) var ( diff --git a/corim/signedcorim.go b/corim/signedcorim.go index 7b5f27d8..755462e1 100644 --- a/corim/signedcorim.go +++ b/corim/signedcorim.go @@ -45,7 +45,7 @@ func (o *SignedCorim) processHdrs() error { // TODO(tho) key id is apparently mandatory, which doesn't look right. // TODO(tho) Check with the CoRIM design team. - // See https://github.com/veraison/corim/v2/issues/14 + // See https://github.com/veraison/corim/issues/14 v, ok = hdr.Protected[HeaderLabelCorimMeta] if !ok { diff --git a/corim/unsignedcorim.go b/corim/unsignedcorim.go index 3aeb0856..68ca6786 100644 --- a/corim/unsignedcorim.go +++ b/corim/unsignedcorim.go @@ -9,9 +9,9 @@ import ( "fmt" "time" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/cots" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" "github.com/veraison/eat" "github.com/veraison/swid" ) diff --git a/corim/unsignedcorim_test.go b/corim/unsignedcorim_test.go index 147e89a7..d9b4d105 100644 --- a/corim/unsignedcorim_test.go +++ b/corim/unsignedcorim_test.go @@ -11,8 +11,8 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/veraison/corim/v2/comid" - "github.com/veraison/corim/v2/cots" + "github.com/veraison/corim/comid" + "github.com/veraison/corim/cots" "github.com/veraison/swid" ) diff --git a/cots/cbor.go b/cots/cbor.go index 1c4580a1..6d69ecd1 100644 --- a/cots/cbor.go +++ b/cots/cbor.go @@ -7,7 +7,7 @@ import ( "reflect" cbor "github.com/fxamacker/cbor/v2" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) var ( diff --git a/cots/cots.go b/cots/cots.go index 623557ba..477ac88a 100644 --- a/cots/cots.go +++ b/cots/cots.go @@ -8,7 +8,7 @@ import ( "errors" "fmt" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" "github.com/veraison/swid" ) diff --git a/cots/cots_test.go b/cots/cots_test.go index cb0f2330..134f1d7d 100644 --- a/cots/cots_test.go +++ b/cots/cots_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) func TestConciseTaStore_Valid_no_environment_groups(t *testing.T) { diff --git a/cots/env_group.go b/cots/env_group.go index 7dc07433..01d98efb 100644 --- a/cots/env_group.go +++ b/cots/env_group.go @@ -7,7 +7,7 @@ import ( "encoding/json" "fmt" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" ) // EnvironmentGroup is the top-level representation of the unsigned-corim-map with diff --git a/cots/env_group_test.go b/cots/env_group_test.go index 3a6a1495..5cd41090 100644 --- a/cots/env_group_test.go +++ b/cots/env_group_test.go @@ -6,7 +6,7 @@ package cots import ( "testing" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" "github.com/veraison/swid" "github.com/stretchr/testify/assert" diff --git a/cots/example_test.go b/cots/example_test.go index 168c8962..f94ecbd7 100644 --- a/cots/example_test.go +++ b/cots/example_test.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/veraison/corim/v2/comid" + "github.com/veraison/corim/comid" "github.com/veraison/swid" ) diff --git a/go.mod b/go.mod index 5560565b..9d95f047 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/veraison/corim/v2 +module github.com/veraison/corim go 1.18