feat(platform): Add 4 new platform claims for draft-ffm-rats-cca-token-03#47
feat(platform): Add 4 new platform claims for draft-ffm-rats-cca-token-03#47hqrui wants to merge 51 commits into
Conversation
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
b687776 to
19d5ead
Compare
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
| // TBBRoTPKey represents a single item in the CCA platform TBB ROTPK claim. | ||
| type TBBRoTPKey struct { | ||
| Name *string `cbor:"1,keyasint" json:"description"` // e.g. "CM" or "DM" | ||
| ActiveArray *int32 `cbor:"2,keyasint" json:"active-array"` // active ROTPK array |
There was a problem hiding this comment.
ActiveArrayIndex and active-array-index for JSON
| import "github.com/veraison/psatoken" | ||
|
|
||
| // TBBRoTPKey represents a single item in the CCA platform TBB ROTPK claim. | ||
| type TBBRoTPKey struct { |
There was a problem hiding this comment.
| type TBBRoTPKey struct { | |
| type TBBRoTPKItem struct { |
|
|
||
| // TBBRoTPKey represents a single item in the CCA platform TBB ROTPK claim. | ||
| type TBBRoTPKey struct { | ||
| Name *string `cbor:"1,keyasint" json:"description"` // e.g. "CM" or "DM" |
There was a problem hiding this comment.
Must be CM or DM case insensitive
There was a problem hiding this comment.
Error message: expected CM or DM but received ...
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
…ken/(i)swcomponents.go Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
…ners. Fix tests. Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
…ed' errors to claims v1. Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
| return newClaimsV2() | ||
| } | ||
|
|
||
| type addedClaimsV2 struct { |
| addedClaimsV2 | ||
| } | ||
|
|
||
| func toPlainClaimsV2(c ClaimsV2) plainClaimsV2 { |
There was a problem hiding this comment.
to double check cbor (edit: checked 2 encoded cbors on cbor.me)
There was a problem hiding this comment.
to change to pass as pointer (linter below), change types used in invocation
| } | ||
|
|
||
| // MarshalJSON encodes the claims into JSON | ||
| func (c ClaimsV2) MarshalJSON() ([]byte, error) { |
There was a problem hiding this comment.
check if can pass by pointer
There was a problem hiding this comment.
the existing claims V1 in main also passes by value, not pointer
Since ClaimsV2.MarshalJSON is intended to override Claims.MarshalJSON, let's keep the parameter type the same (value not pointer)
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
…tr instead of reusing v1 test variables Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Signed-off-by: Qirui Huang <qirui.huang@arm.com>
Description
Issue: #46
This PR adds 4 new platform claims for draft-ffm-rats-cca-token-03 support:
Due to the large scope, the final new platform claim (extension devices) as well as the new realm claim (MEC policy) for draft-ffm-rats-cca-token-03 will be added in separate PRs.
New structs and interfaces are defined for TBBRoTPKItem and TBBRoTPKItems, which are based off SwComponent and SwComponents in veraison/psatoken.
Notes:
For discussion:
Checklist
Note: No updates to README here, I think we should update in 1 shot when all the platform and realm claims are updated to this new profile.