mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-29 21:33:02 +00:00
Re-add cipher_encrypt to test wrapper script
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
This commit is contained in:
parent
77b91e3930
commit
84a666daa8
@ -143,6 +143,8 @@ class PSAWrapperGenerator(c_wrapper_generator.Base):
|
||||
"""Whether the specified buffer argument to a PSA function should be copied.
|
||||
"""
|
||||
# Proof-of-concept: just instrument one function for now
|
||||
if function_name == 'psa_cipher_encrypt':
|
||||
return True
|
||||
if function_name == 'psa_import_key' or function_name == 'psa_export_key' or function_name == 'psa_export_public_key':
|
||||
return True
|
||||
if function_name in ('psa_sign_message',
|
||||
|
@ -267,7 +267,15 @@ psa_status_t mbedtls_test_wrap_psa_cipher_encrypt(
|
||||
size_t arg5_output_size,
|
||||
size_t *arg6_output_length)
|
||||
{
|
||||
#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
|
||||
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
|
||||
MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
|
||||
#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
|
||||
psa_status_t status = (psa_cipher_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
|
||||
#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
|
||||
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
|
||||
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
|
||||
#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user