Skip to content

Improve error messages for evcli psa check command #20

@SabreenKaur

Description

@SabreenKaur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions