Skip to content

Commit 93ffa3b

Browse files
committed
fxamacker/cbor 2.9.0 changed some of its error messages
Signed-off-by: Mathias Gibbens <gibmat@debian.org>
1 parent 58542e2 commit 93ffa3b

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

conformance_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ var testCases = []struct {
8484
{name: "sign1-verify-0007"}, // EdDSA Ed25519
8585
{name: "sign1-verify-negative-0000", err: "cbor: invalid protected header: cbor: require bstr type"},
8686
{name: "sign1-verify-negative-0001", err: "cbor: invalid protected header: cbor: protected header: require map type"},
87-
{name: "sign1-verify-negative-0002", err: "cbor: invalid protected header: cbor: found duplicate map key \"1\" at map element index 1"},
88-
{name: "sign1-verify-negative-0003", err: "cbor: invalid unprotected header: cbor: found duplicate map key \"4\" at map element index 1"},
87+
{name: "sign1-verify-negative-0002", err: "cbor: invalid protected header: cbor: found duplicate map key cose.headerLabelValidator{value:1} at map element index 1"},
88+
{name: "sign1-verify-negative-0003", err: "cbor: invalid unprotected header: cbor: found duplicate map key cose.headerLabelValidator{value:4} at map element index 1"},
8989
{name: "sign1-verify-negative-0004"}, // EdDSA Ed25519 invalid signature
9090
}
9191

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/veraison/go-cose
22

33
go 1.21
44

5-
require github.com/fxamacker/cbor/v2 v2.5.0
5+
require github.com/fxamacker/cbor/v2 v2.9.0
66

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

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE=
2-
github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
1+
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
2+
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
33
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
44
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=

headers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ func TestProtectedHeader_UnmarshalCBOR(t *testing.T) {
372372
data: []byte{
373373
0x45, 0xa2, 0x01, 0x00, 0x01, 0x00,
374374
},
375-
wantErr: "cbor: found duplicate map key \"1\" at map element index 1",
375+
wantErr: "cbor: found duplicate map key cose.headerLabelValidator{value:1} at map element index 1",
376376
},
377377
{
378378
name: "incomplete CBOR data",
@@ -1078,7 +1078,7 @@ func TestUnprotectedHeader_UnmarshalCBOR(t *testing.T) {
10781078
data: []byte{
10791079
0xa2, 0x01, 0x00, 0x01, 0x00,
10801080
},
1081-
wantErr: "cbor: found duplicate map key \"1\" at map element index 1",
1081+
wantErr: "cbor: found duplicate map key cose.headerLabelValidator{value:1} at map element index 1",
10821082
},
10831083
{
10841084
name: "incomplete CBOR data",

key_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func TestKey_UnmarshalCBOR(t *testing.T) {
340340
0x18, 0x66, 0x18, 0x47, // 66: 47
341341
},
342342
want: nil,
343-
wantErr: `cbor: found duplicate map key "102" at map element index 2`,
343+
wantErr: `cbor: found duplicate map key 102 at map element index 2`,
344344
}, {
345345
name: "duplicated kty",
346346
data: []byte{
@@ -350,7 +350,7 @@ func TestKey_UnmarshalCBOR(t *testing.T) {
350350
0x01, 0x01, // kty: OKP (duplicated)
351351
},
352352
want: nil,
353-
wantErr: `cbor: found duplicate map key "1" at map element index 2`,
353+
wantErr: `cbor: found duplicate map key 1 at map element index 2`,
354354
}, {
355355
name: "OKP missing curve",
356356
data: []byte{

0 commit comments

Comments
 (0)