mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 21:33:02 +00:00
Make multi-part key derivation operations thread-safe
One can input a key using a key identifier through the two changed functions. Inputted keys are copied into the operation object. Any material inputted in byte form is separate to the key slot system. Outputting a key is threadsafe as per the key loading work. The verification API is yet to be implemented. 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
c0053cc499
commit
5ac6fa7aae
@ -7061,7 +7061,7 @@ psa_status_t psa_key_derivation_input_key(
|
||||
slot->key.data,
|
||||
slot->key.bytes);
|
||||
|
||||
unlock_status = psa_unregister_read(slot);
|
||||
unlock_status = psa_unregister_read_under_mutex(slot);
|
||||
|
||||
return (status == PSA_SUCCESS) ? unlock_status : status;
|
||||
}
|
||||
@ -7218,7 +7218,7 @@ psa_status_t psa_key_derivation_key_agreement(psa_key_derivation_operation_t *op
|
||||
}
|
||||
}
|
||||
|
||||
unlock_status = psa_unregister_read(slot);
|
||||
unlock_status = psa_unregister_read_under_mutex(slot);
|
||||
|
||||
return (status == PSA_SUCCESS) ? unlock_status : status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user