Skip to content

Commit

Permalink
Switch to v2 development
Browse files Browse the repository at this point in the history
There is already a v1 release published to pkg.dev. This was premature
as a number of breaking changes to the API are still planned. The
underlying spec is still in development with regular drafts being
released. This code is going to change tracking the changes in the spec,
as well as likely making non-spec changes to the API as they slowly
mature.

In order to stay compliant with golang [versioning
workflow](https://go.dev/doc/modules/release-workflow), development is
witching over to v2, so that v1 can remain stable.

(note: the first full v2 release is expected to align with the
final publication of the CoRIM spec, and so will not happen for some
time. In the mean time, "release candidates" will be published to
provided milestone references for dependents)

Signed-off-by: Sergei Trofimov <[email protected]>
  • Loading branch information
setrofim committed Sep 11, 2023
1 parent b77baee commit 894214b
Show file tree
Hide file tree
Showing 30 changed files with 44 additions and 39 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/corim
GOPKG += github.com/veraison/corim/comid
GOPKG += github.com/veraison/corim/cots
GOPKG += github.com/veraison/corim/cocli/cmd
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

MOCKGEN := $(shell go env GOPATH)/bin/mockgen
INTERFACES := cocli/cmd/isubmitter.go
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

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** going forward, and should not be considered
> stable at this time.
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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/cots"
"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/corim"
"github.com/veraison/corim/cots"
"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/v2/corim"
"github.com/veraison/corim/v2/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/corim"
"github.com/veraison/corim/cots"
"github.com/veraison/corim/v2/corim"
"github.com/veraison/corim/v2/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/corim"
"github.com/veraison/corim/cots"
"github.com/veraison/corim/v2/corim"
"github.com/veraison/corim/v2/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/corim"
"github.com/veraison/corim/v2/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/cocli/cmd/mocks"
mock_deps "github.com/veraison/corim/v2/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/corim"
"github.com/veraison/corim/v2/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/cots"
"github.com/veraison/corim/v2/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/comid"
import "github.com/veraison/corim/v2/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/cocli/cmd"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/issues/14
// See https://github.com/veraison/corim/v2/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/cots"
"github.com/veraison/corim/v2/cots"

"github.com/veraison/corim/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/cots"
"github.com/veraison/corim/v2/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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/comid"
"github.com/veraison/corim/v2/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
module github.com/veraison/corim/v2

go 1.18

Expand Down

0 comments on commit 894214b

Please sign in to comment.