mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-07 22:27:01 -04:00
Add implementation of psa_crypto_copy_and_free()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
9ecd53d1bb
commit
5847b70829
@ -5600,4 +5600,18 @@ error:
|
||||
return ret;
|
||||
}
|
||||
|
||||
psa_status_t psa_crypto_copy_and_free(psa_crypto_buffer_copy_t *buffers)
|
||||
{
|
||||
if (buffers->output != NULL) {
|
||||
memcpy(buffers->output_original, buffers->output, buffers->output_len);
|
||||
}
|
||||
|
||||
mbedtls_free(buffers->input);
|
||||
buffers->input = NULL;
|
||||
mbedtls_free(buffers->output);
|
||||
buffers->output = NULL;
|
||||
|
||||
return PSA_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_C */
|
||||
|
Loading…
x
Reference in New Issue
Block a user