Skip to content

Commit

Permalink
Partial v2 revert
Browse files Browse the repository at this point in the history
Reverting module /v2 module name change. The reason is that go build
system does not allow specifying a post-v1 module name unless there is a
corresponding published release. Since we're not planning on publishing
v2.0.0 until CoRIM spec is out of draft, we cannot rename the module
until then. So for now, v2 development needs to happen on top of a v1
module name.

Signed-off-by: Sergei Trofimov <[email protected]>
  • Loading branch information
setrofim committed Sep 12, 2023
1 parent 58a92b0 commit eeb7bd4
Show file tree
Hide file tree
Showing 30 changed files with 41 additions and 41 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/comidCreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/comidCreate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/comidValidate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions cocli/cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
6 changes: 3 additions & 3 deletions cocli/cmd/corimCreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions cocli/cmd/corimDisplay.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions cocli/cmd/corimExtract.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/corimSign.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/corimSubmit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/corimVerify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/cotsCreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion cocli/cmd/test_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package cmd

import "github.com/veraison/corim/v2/comid"
import "github.com/veraison/corim/comid"

var (
minimalCorimTemplate = []byte(`{
Expand Down
2 changes: 1 addition & 1 deletion cocli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package main

import (
"github.com/veraison/corim/v2/cocli/cmd"
"github.com/veraison/corim/cocli/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion corim/cbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"

cbor "github.com/fxamacker/cbor/v2"
"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/comid"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion corim/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion corim/entity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion corim/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"time"

"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/comid"
)

type Signer struct {
Expand Down
2 changes: 1 addition & 1 deletion corim/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion corim/signedcorim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions corim/unsignedcorim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions corim/unsignedcorim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion cots/cbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"reflect"

cbor "github.com/fxamacker/cbor/v2"
"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/comid"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cots/cots.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"errors"
"fmt"

"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/comid"
"github.com/veraison/swid"
)

Expand Down
2 changes: 1 addition & 1 deletion cots/cots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cots/env_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cots/env_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion cots/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/comid"
"github.com/veraison/swid"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/veraison/corim/v2
module github.com/veraison/corim

go 1.18

Expand Down

0 comments on commit eeb7bd4

Please sign in to comment.