Make multi-part AEAD operations thread-safe
The setup calls are the only calls to use a key ID. The key is then copied into the operation object, all future API calls use the copy instead of the key in the slot. Simultaneous API calls on the same operation object are not thread-safe. Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
parent
bbedfcec2e
commit
9af70e51c1
1 changed files with 1 additions and 1 deletions
|
@ -4687,7 +4687,7 @@ static psa_status_t psa_aead_setup(psa_aead_operation_t *operation,
|
|||
operation->key_type = psa_get_key_type(&attributes);
|
||||
|
||||
exit:
|
||||
unlock_status = psa_unregister_read(slot);
|
||||
unlock_status = psa_unregister_read_under_mutex(slot);
|
||||
|
||||
if (status == PSA_SUCCESS) {
|
||||
status = unlock_status;
|
||||
|
|
Loading…
Reference in a new issue