mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-12 08:38:08 -04:00
Add testcase for psa_crypto_input_copy_free()
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
8d9d4fe20d
commit
6790a6d36f
@ -33,3 +33,9 @@ input_copy_alloc:200:PSA_SUCCESS
|
|||||||
|
|
||||||
PSA crypto input copy alloc, NULL buffer
|
PSA crypto input copy alloc, NULL buffer
|
||||||
input_copy_alloc:0:PSA_SUCCESS
|
input_copy_alloc:0:PSA_SUCCESS
|
||||||
|
|
||||||
|
PSA crypto input copy free
|
||||||
|
input_copy_free:200
|
||||||
|
|
||||||
|
PSA crypto input copy free, NULL buffer
|
||||||
|
input_copy_free:0
|
||||||
|
@ -109,3 +109,24 @@ exit:
|
|||||||
mbedtls_free(input);
|
mbedtls_free(input);
|
||||||
}
|
}
|
||||||
/* END_CASE */
|
/* END_CASE */
|
||||||
|
|
||||||
|
/* BEGIN_CASE */
|
||||||
|
void input_copy_free(int input_len)
|
||||||
|
{
|
||||||
|
psa_crypto_input_copy_t input_copy;
|
||||||
|
|
||||||
|
input_copy.buffer = NULL;
|
||||||
|
input_copy.len = input_len;
|
||||||
|
TEST_CALLOC(input_copy.buffer, input_copy.len);
|
||||||
|
|
||||||
|
psa_crypto_input_copy_free(&input_copy);
|
||||||
|
|
||||||
|
TEST_ASSERT(input_copy.buffer == NULL);
|
||||||
|
TEST_EQUAL(input_copy.len, 0);
|
||||||
|
|
||||||
|
exit:
|
||||||
|
mbedtls_free(input_copy.buffer);
|
||||||
|
input_copy.buffer = NULL;
|
||||||
|
input_copy.len = 0;
|
||||||
|
}
|
||||||
|
/* END_CASE */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user