Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change “Senders SHOULD encode” to “Senders MUST encode” #26

Closed
selfissued opened this issue Nov 1, 2015 · 1 comment
Closed

Comments

@selfissued
Copy link

The description of the “protected” field in Section 3 says “Senders SHOULD encode an empty protected map as a zero length binary object (it is shorter).” Such uses of “SHOULD” will result in interoperability problems. Therefore, please change the “SHOULD” to a “MUST”.

@jimsch
Copy link

jimsch commented Nov 1, 2015

There are two options that can be used here for encoding a protected header with no entries. It can be either a zero length binary string that is encoded, or it can be a zero length map that is encoded. There is no interopability issue as both of these are valid. The first is dealt with as a special case while the second just falls out from the normal case of there being any items in the map (i.e. the code to parse a map with 1 item or with 0 items is identical). This is a recommendation that one method ought to be used. This is the correct usage of a SHOULD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants