Skip to content

Commit 27ce241

Browse files
committed
Explain parsing rules; ignore unrecognized fields.
1 parent 989a069 commit 27ce241

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

envelope.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@ the following form, called the "JSON envelope":
2929

3030
See [Protocol](protocol.md) for a definition of parameters and functions.
3131

32-
Empty fields may be omitted. [Multiple signatures](#multiple-signatures) are
33-
allowed.
34-
3532
Base64() is [Base64 encoding](https://tools.ietf.org/html/rfc4648), transforming
3633
a byte sequence to a unicode string. Either standard or URL-safe encoding is
3734
allowed.
3835

3936
### Multiple signatures
4037

41-
An envelope may have more than one signature, which is equivalent to separate
38+
An envelope MAY have more than one signature, which is equivalent to separate
4239
envelopes with individual signatures.
4340

4441
```json
@@ -55,6 +52,15 @@ envelopes with individual signatures.
5552
}
5653
```
5754

55+
### Parsing rules
56+
57+
* The following fields are REQUIRED and MUST be set, even if empty: `payload`,
58+
`payloadType`, `signature`, `signature.sig`.
59+
* The following fields are OPTIONAL and MAY be unset: `signature.keyid`.
60+
An unset field MUST be treated the same as set-but-empty.
61+
* Producers, or future versions of the spec, MAY add additional fields.
62+
Consumers MUST ignore unrecognized fields.
63+
5864
## Other data structures
5965

6066
The standard envelope is JSON message with an explicit `payloadType`.

0 commit comments

Comments
 (0)