Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ var testCases = []struct {
{name: "sign1-verify-0007"}, // EdDSA Ed25519
{name: "sign1-verify-negative-0000", err: "cbor: invalid protected header: cbor: require bstr type"},
{name: "sign1-verify-negative-0001", err: "cbor: invalid protected header: cbor: protected header: require map type"},
{name: "sign1-verify-negative-0002", err: "cbor: invalid protected header: cbor: found duplicate map key \"1\" at map element index 1"},
{name: "sign1-verify-negative-0003", err: "cbor: invalid unprotected header: cbor: found duplicate map key \"4\" at map element index 1"},
{name: "sign1-verify-negative-0002", err: "cbor: invalid protected header: cbor: found duplicate map key cose.headerLabelValidator{value:1} at map element index 1"},
{name: "sign1-verify-negative-0003", err: "cbor: invalid unprotected header: cbor: found duplicate map key cose.headerLabelValidator{value:4} at map element index 1"},
{name: "sign1-verify-negative-0004"}, // EdDSA Ed25519 invalid signature
}

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

go 1.21

require github.com/fxamacker/cbor/v2 v2.5.0
require github.com/fxamacker/cbor/v2 v2.9.0

require github.com/x448/float16 v0.8.4 // indirect

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE=
github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
4 changes: 2 additions & 2 deletions headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func TestProtectedHeader_UnmarshalCBOR(t *testing.T) {
data: []byte{
0x45, 0xa2, 0x01, 0x00, 0x01, 0x00,
},
wantErr: "cbor: found duplicate map key \"1\" at map element index 1",
wantErr: "cbor: found duplicate map key cose.headerLabelValidator{value:1} at map element index 1",
},
{
name: "incomplete CBOR data",
Expand Down Expand Up @@ -1078,7 +1078,7 @@ func TestUnprotectedHeader_UnmarshalCBOR(t *testing.T) {
data: []byte{
0xa2, 0x01, 0x00, 0x01, 0x00,
},
wantErr: "cbor: found duplicate map key \"1\" at map element index 1",
wantErr: "cbor: found duplicate map key cose.headerLabelValidator{value:1} at map element index 1",
},
{
name: "incomplete CBOR data",
Expand Down
4 changes: 2 additions & 2 deletions key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func TestKey_UnmarshalCBOR(t *testing.T) {
0x18, 0x66, 0x18, 0x47, // 66: 47
},
want: nil,
wantErr: `cbor: found duplicate map key "102" at map element index 2`,
wantErr: `cbor: found duplicate map key 102 at map element index 2`,
}, {
name: "duplicated kty",
data: []byte{
Expand All @@ -350,7 +350,7 @@ func TestKey_UnmarshalCBOR(t *testing.T) {
0x01, 0x01, // kty: OKP (duplicated)
},
want: nil,
wantErr: `cbor: found duplicate map key "1" at map element index 2`,
wantErr: `cbor: found duplicate map key 1 at map element index 2`,
}, {
name: "OKP missing curve",
data: []byte{
Expand Down