Skip to content

Commit

Permalink
Document unsupported concurrency scenario in psa_exercise_key
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
  • Loading branch information
Ryan-Everett-arm committed Mar 14, 2024
1 parent 6de38ac commit e1b50f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/include/test/psa_exercise_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ int mbedtls_test_psa_exported_key_sanity_check(
* to 1, while another thread calls psa_destroy_key on the same key;
* this will test whether destroying the key in use leads to any corruption.
*
* There cannot be a set of concurrent calls:
* `mbedtls_test_psa_exercise_key(ki,...)` such that each ki is a unique
* persistent key not loaded into any key slot, and i is greater than the
* number of free key slots.
* This is because such scenarios can lead to unsupported
* `PSA_ERROR_INSUFFICIENT_MEMORY` return codes.
*
*
* \param key The key to exercise. It should be capable of performing
* \p alg.
* \param usage The usage flags to assume.
Expand Down

0 comments on commit e1b50f3

Please sign in to comment.