-
Notifications
You must be signed in to change notification settings - Fork 19
Description
See #326 (comment), there is currently no checking of COSE crit
when the issuer is a did:x509
.
According to RFC9052:
The array MUST have at least one value in it.
Not all header-parameter labels need to be included in the "crit" header parameter. The rules for deciding which header parameters are placed in the array are:
Integer labels in the range of 0 to 7 SHOULD be omitted.
Integer labels in the range -1 to -128 can be omitted. Algorithms can assign labels in this range where the ability to process the content of the label is considered to be core to implementing the algorithm. Algorithms can assign labels outside of this range and include them in the "crit" header parameter when the ability to process the content of the label is not considered to be core functionality of the algorithm but does need to be understood to correctly process this instance. Integer labels in the range -129 to -65536 SHOULD be included, as these would be less common header parameters that might not be generally supported.
Labels for header parameters required for an application MAY be omitted. Applications should have a statement declaring whether or not the label can be omitted.
It's arguable that CWT Claims(15) and x5chain(33) could be included in crit
but that's also not obviously mandated.
The only example that sets crit
is in Appendix C.1.3, for a tstr label, similar to "attestedsvc" (where we do it #326).