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

Update return code for various key operations #4189

Closed

Conversation

daverodgman
Copy link
Contributor

Update psa_destroy_key and other key operations to return
PSA_ERROR_INVALID_HANDLE where appropriate, rather than
PSA_ERROR_DOES_NOT_EXIST.

Fixes #4162

Signed-off-by: Dave Rodgman dave.rodgman@arm.com

Update psa_destroy_key and other key operations to return
PSA_ERROR_INVALID_HANDLE where appropriate, rather than
PSA_ERROR_DOES_NOT_EXIST.

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
@daverodgman daverodgman added bug component-psa PSA keystore/dispatch layer (storage, drivers, …) needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review size-s Estimated task size: small (~2d) labels Mar 2, 2021
@ronald-cron-arm ronald-cron-arm added needs-ci Needs to pass CI tests needs-work labels Mar 3, 2021
*
* \retval #PSA_SUCCESS
* \retval #PSA_ERROR_INVALID_HANDLE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, do I miss something? didn't see this return value in the function implementation.

@@ -3364,6 +3369,11 @@ psa_status_t psa_sign_hash( mbedtls_svc_key_id_t key,
status = psa_get_and_lock_key_slot_with_policy( key, &slot,
PSA_KEY_USAGE_SIGN_HASH,
alg );
/* Return invalid handle as per PSA API 1.0.0 if trying to copy persistent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not trying to copy a key here...

@bensze01
Copy link
Contributor

bensze01 commented Mar 5, 2021

This PR is superseded by #4198.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-psa PSA keystore/dispatch layer (storage, drivers, …) needs-ci Needs to pass CI tests needs-review Every commit must be reviewed by at least two team members, needs-reviewer This PR needs someone to pick it up for review needs-work size-s Estimated task size: small (~2d)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not return PSA_ERROR_DOES_NOT_EXIST for a non-existing key
6 participants