diff --git a/corim/signedcorim.go b/corim/signedcorim.go index c1b5e91..abe1236 100644 --- a/corim/signedcorim.go +++ b/corim/signedcorim.go @@ -16,8 +16,7 @@ import ( ) var ( - ContentType = "application/corim-unsigned+cbor" - oldContentType = "application/rim+cbor" + ContentType = "application/rim+cbor" NoExternalData = []byte("") HeaderLabelCorimMeta = int64(8) ) @@ -65,11 +64,6 @@ func (o *SignedCorim) processHdrs() error { return errors.New("missing mandatory content type") } - // Compatibility step from older spec draft - if v == oldContentType { - v = ContentType - } - if v != ContentType { return fmt.Errorf("expecting content type %q, got %q instead", ContentType, v) } diff --git a/corim/signedcorim_test.go b/corim/signedcorim_test.go index 34a0336..2e28648 100644 --- a/corim/signedcorim_test.go +++ b/corim/signedcorim_test.go @@ -285,7 +285,7 @@ func TestSignedCorim_FromCOSE_fail_corim_bad_cbor(t *testing.T) { [ / protected / << { / alg / 1: -7, / ECDSA 256 / - / content-type / 3: "application/corim-unsigned+cbor", + / content-type / 3: "application/rim+cbor", / corim-meta / 8: h'a200a1006941434d45204c74642e01a101c11a5fad2056' } >>, / unprotected / {}, @@ -315,7 +315,7 @@ func TestSignedCorim_FromCOSE_fail_invalid_corim(t *testing.T) { [ / protected / << { / alg / 1: -7, / ECDSA 256 / - / content-type / 3: "application/corim-unsigned+cbor", + / content-type / 3: "application/rim+cbor", / corim-meta / 8: h'a200a1006941434d45204c74642e01a101c11a5fad2056' } >>, / unprotected / {}, @@ -396,7 +396,7 @@ func TestSignedCorim_FromCOSE_fail_unexpected_content_type(t *testing.T) { var actual SignedCorim err := actual.FromCOSE(tv) - assert.EqualError(t, err, `processing COSE headers: expecting content type "application/corim-unsigned+cbor", got "application/cbor" instead`) + assert.EqualError(t, err, `processing COSE headers: expecting content type "application/rim+cbor", got "application/cbor" instead`) } func unsignedCorimFromCBOR(t *testing.T, cbor []byte) *UnsignedCorim {