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

Improve error messages for evcli psa check command #20

Open
SabreenKaur opened this issue Jan 27, 2023 · 0 comments
Open

Improve error messages for evcli psa check command #20

SabreenKaur opened this issue Jan 27, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@SabreenKaur
Copy link
Collaborator

SabreenKaur commented Jan 27, 2023

Some error messages yielded from running evcli psa check are misleading. For example we run evcli psa check --token=./psa-token-invalid-multi-nonce.cbor --key=./ec256.json with psa-token-invalid-multi-nonce.cbor being the signed evidence with multiple nonces present in its claims. Running this gives the following error message:

Error: failed CBOR decoding of PSA claims: decode failed for all CcaPlatform(validation of CCA platform claims failed: wrong profile: expecting "http://arm.com/CCA-SSD/1.0.0", got "http://arm.com/psa/2.0.0"), p1 (validation of PSA claims failed: validating psa-security-lifecycle: missing mandatory claim) and p2 (validation of PSA claims failed: validating psa-nonce: wrong syntax for claim: got 2 nonces, want 1)

The error message is misleading because it mentions failed validation for CCA platform when we are not checking for the CCA platform. It also mentions failed validation for other claims like psa-security-lifecycle which are not incorrect but are simply an artefact of the fallback when the check of the multiple nonce fails. We expect that error messages should indicate 1 reason for failure which in this case would something like:

Error: failed CBOR decoding of PSA claims: validation of PSA claims failed: validating psa-nonce: wrong syntax for claim: got 2 nonces, want 1
@SabreenKaur SabreenKaur added the enhancement New feature or request label Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant