mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Add buffer copying to psa_key_derivation_input_bytes
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
@@ -4983,12 +4983,20 @@ exit:
|
|||||||
psa_status_t psa_key_derivation_input_bytes(
|
psa_status_t psa_key_derivation_input_bytes(
|
||||||
psa_key_derivation_operation_t *operation,
|
psa_key_derivation_operation_t *operation,
|
||||||
psa_key_derivation_step_t step,
|
psa_key_derivation_step_t step,
|
||||||
const uint8_t *data,
|
const uint8_t *data_external,
|
||||||
size_t data_length)
|
size_t data_length)
|
||||||
{
|
{
|
||||||
return psa_key_derivation_input_internal(operation, step,
|
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||||
PSA_KEY_TYPE_NONE,
|
LOCAL_INPUT_DECLARE(data_external, data);
|
||||||
data, data_length);
|
|
||||||
|
LOCAL_INPUT_ALLOC(data_external, data_length, data);
|
||||||
|
|
||||||
|
status = psa_key_derivation_input_internal(operation, step,
|
||||||
|
PSA_KEY_TYPE_NONE,
|
||||||
|
data, data_length);
|
||||||
|
exit:
|
||||||
|
LOCAL_INPUT_FREE(data_external, data);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
psa_status_t psa_key_derivation_input_key(
|
psa_status_t psa_key_derivation_input_key(
|
||||||
|
Reference in New Issue
Block a user