Skip to content

Commit 989a069

Browse files
committed
Clarify PAYLOAD and PAYLOAD_TYPE.
1 parent 7d54f6a commit 989a069

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

protocol.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SERIALIZED_BODY | bytes | Yes | Yes
2424
PAYLOAD_TYPE | string | Yes | Yes
2525
KEYID | string | No | No
2626

27-
* SERIALIZED_BODY: Byte sequence to be signed.
27+
* SERIALIZED_BODY: Arbitrary byte sequence to be signed.
2828

2929
* PAYLOAD_TYPE: Opaque, case-sensitive string that uniquely and unambiguously
3030
identifies how to interpret `payload`. This includes both the encoding
@@ -34,10 +34,11 @@ KEYID | string | No | No
3434
* [Media Type](https://www.iana.org/assignments/media-types/), a.k.a. MIME
3535
type or Content Type
3636
* Example: `application/vnd.in-toto+json`.
37-
* IMPORTANT: SHOULD NOT be a generic type that only represents
38-
encoding but not schema. For example, `application/json` is almost
39-
always WRONG. Instead, invent a media type specific for your
40-
application in the `application/vnd` namespace.
37+
* IMPORTANT: This SHOULD be an application-specific type describing
38+
both encoding and schema, NOT a generic type like
39+
`application/json`. The problem with generic types is that two
40+
different applications could use the same encoding (e.g. JSON) but
41+
interpret the payload differently.
4142
* SHOULD be lowercase.
4243
* [URI](https://tools.ietf.org/html/rfc3986)
4344
* Example: `https://example.com/MyMessage/v1-json`.

0 commit comments

Comments
 (0)