-
Notifications
You must be signed in to change notification settings - Fork 32
corim/signedcorim: check for mandatory alg and kid #157
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
base: main
Are you sure you want to change the base?
Conversation
6c337fd to
95eb749
Compare
setrofim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to change corim/testcases/signed-good-corim.cbor to include the kid parameter.
The test cases should be amended as part of the same commit commit that changes the code to make it necessary. (Doing this requires first updaing https://github.com/veraison/gen-testcases to include the key ID on signing).
1e94de3 to
b16dda1
Compare
* Added the kid parameter to the failing tests * Added getKidFromJWK in corim/signer.go * Regenerated all testcases * Made regen-from-src.sh executable Signed-off-by: Pranjal Kole <[email protected]>
|
|
||
| o.message.Headers.Protected.SetAlgorithm(alg) | ||
| o.message.Headers.Protected[cose.HeaderLabelContentType] = ContentType | ||
| o.message.Headers.Protected[cose.HeaderLabelKeyID] = kid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should we ensure that kid != nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kid is supposed to never be nil. I was thinking we should store kid as part of the cose.Signer while creating it from the JWK (like we do for alg). getKidFromJWK can get a kid from every JWK.
I'll wait for the meeting on kid being mandatory before making any more changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomas-fossati Please ping me after the final decision on whether kid should be mandatory.
Before merging, we need to change
corim/testcases/signed-good-corim.cborto include thekidparameter.