Update wrapper generation script and regenerate
Update the guards generated by the wrapper generation script to use
!MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS and regenerate the PSA test
wrappers.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/tests/scripts/generate_psa_wrappers.py b/tests/scripts/generate_psa_wrappers.py
index 1a05c75..07d1450 100755
--- a/tests/scripts/generate_psa_wrappers.py
+++ b/tests/scripts/generate_psa_wrappers.py
@@ -132,10 +132,10 @@
"""
if not buffer_parameters:
return
- out.write('#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)\n')
+ out.write('#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)\n')
for param in buffer_parameters:
self._write_poison_buffer_parameter(out, param, poison)
- out.write('#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */\n')
+ out.write('#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */\n')
@staticmethod
def _parameter_should_be_copied(function_name: str,
diff --git a/tests/src/psa_test_wrappers.c b/tests/src/psa_test_wrappers.c
index b030431..809f1cd 100644
--- a/tests/src/psa_test_wrappers.c
+++ b/tests/src/psa_test_wrappers.c
@@ -70,19 +70,19 @@
size_t arg9_plaintext_size,
size_t *arg10_plaintext_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
MBEDTLS_TEST_MEMORY_POISON(arg6_ciphertext, arg7_ciphertext_length);
MBEDTLS_TEST_MEMORY_POISON(arg8_plaintext, arg9_plaintext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_decrypt)(arg0_key, arg1_alg, arg2_nonce, arg3_nonce_length, arg4_additional_data, arg5_additional_data_length, arg6_ciphertext, arg7_ciphertext_length, arg8_plaintext, arg9_plaintext_size, arg10_plaintext_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg6_ciphertext, arg7_ciphertext_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg8_plaintext, arg9_plaintext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -110,19 +110,19 @@
size_t arg9_ciphertext_size,
size_t *arg10_ciphertext_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
MBEDTLS_TEST_MEMORY_POISON(arg6_plaintext, arg7_plaintext_length);
MBEDTLS_TEST_MEMORY_POISON(arg8_ciphertext, arg9_ciphertext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_encrypt)(arg0_key, arg1_alg, arg2_nonce, arg3_nonce_length, arg4_additional_data, arg5_additional_data_length, arg6_plaintext, arg7_plaintext_length, arg8_ciphertext, arg9_ciphertext_size, arg10_ciphertext_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg6_plaintext, arg7_plaintext_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg8_ciphertext, arg9_ciphertext_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -146,15 +146,15 @@
size_t arg5_tag_size,
size_t *arg6_tag_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_ciphertext, arg2_ciphertext_size);
MBEDTLS_TEST_MEMORY_POISON(arg4_tag, arg5_tag_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_finish)(arg0_operation, arg1_ciphertext, arg2_ciphertext_size, arg3_ciphertext_length, arg4_tag, arg5_tag_size, arg6_tag_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_ciphertext, arg2_ciphertext_size);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_tag, arg5_tag_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -165,13 +165,13 @@
size_t arg2_nonce_size,
size_t *arg3_nonce_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_nonce, arg2_nonce_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_generate_nonce)(arg0_operation, arg1_nonce, arg2_nonce_size, arg3_nonce_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_nonce, arg2_nonce_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -191,13 +191,13 @@
const uint8_t *arg1_nonce,
size_t arg2_nonce_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_nonce, arg2_nonce_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_set_nonce)(arg0_operation, arg1_nonce, arg2_nonce_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_nonce, arg2_nonce_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -210,15 +210,15 @@
size_t arg4_output_size,
size_t *arg5_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg3_output, arg4_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_output, arg4_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -228,13 +228,13 @@
const uint8_t *arg1_input,
size_t arg2_input_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_update_ad)(arg0_operation, arg1_input, arg2_input_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -247,15 +247,15 @@
const uint8_t *arg4_tag,
size_t arg5_tag_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_plaintext, arg2_plaintext_size);
MBEDTLS_TEST_MEMORY_POISON(arg4_tag, arg5_tag_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_aead_verify)(arg0_operation, arg1_plaintext, arg2_plaintext_size, arg3_plaintext_length, arg4_tag, arg5_tag_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_plaintext, arg2_plaintext_size);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_tag, arg5_tag_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -271,17 +271,17 @@
size_t arg7_output_size,
size_t *arg8_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_asymmetric_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_salt, arg5_salt_length, arg6_output, arg7_output_size, arg8_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -297,17 +297,17 @@
size_t arg7_output_size,
size_t *arg8_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_asymmetric_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_salt, arg5_salt_length, arg6_output, arg7_output_size, arg8_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -329,15 +329,15 @@
size_t arg5_output_size,
size_t *arg6_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_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) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_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) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -361,15 +361,15 @@
size_t arg5_output_size,
size_t *arg6_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_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) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_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)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_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) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -390,13 +390,13 @@
size_t arg2_output_size,
size_t *arg3_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -407,13 +407,13 @@
size_t arg2_iv_size,
size_t *arg3_iv_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_iv, arg2_iv_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_iv, arg2_iv_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -423,13 +423,13 @@
const uint8_t *arg1_iv,
size_t arg2_iv_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_iv, arg2_iv_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_iv, arg2_iv_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -442,15 +442,15 @@
size_t arg4_output_size,
size_t *arg5_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg3_output, arg4_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_output, arg4_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -555,13 +555,13 @@
size_t arg2_data_size,
size_t *arg3_data_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -572,13 +572,13 @@
size_t arg2_data_size,
size_t *arg3_data_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -607,13 +607,13 @@
uint8_t *arg0_output,
size_t arg1_output_size)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg0_output, arg1_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg0_output, arg1_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -651,15 +651,15 @@
const uint8_t *arg3_hash,
size_t arg4_hash_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -672,15 +672,15 @@
size_t arg4_hash_size,
size_t *arg5_hash_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -691,13 +691,13 @@
size_t arg2_hash_size,
size_t *arg3_hash_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -716,13 +716,13 @@
const uint8_t *arg1_input,
size_t arg2_input_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -732,13 +732,13 @@
const uint8_t *arg1_hash,
size_t arg2_hash_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -749,13 +749,13 @@
size_t arg2_data_length,
mbedtls_svc_key_id_t *arg3_key)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -783,13 +783,13 @@
const uint8_t *arg2_data,
size_t arg3_data_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_data, arg3_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_data, arg3_data_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -821,13 +821,13 @@
const uint8_t *arg3_peer_key,
size_t arg4_peer_key_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg3_peer_key, arg4_peer_key_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_peer_key, arg4_peer_key_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -837,13 +837,13 @@
uint8_t *arg1_output,
size_t arg2_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -905,15 +905,15 @@
size_t arg5_mac_size,
size_t *arg6_mac_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -924,13 +924,13 @@
size_t arg2_mac_size,
size_t *arg3_mac_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -950,13 +950,13 @@
const uint8_t *arg1_input,
size_t arg2_input_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -969,15 +969,15 @@
const uint8_t *arg4_mac,
size_t arg5_mac_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -987,13 +987,13 @@
const uint8_t *arg1_mac,
size_t arg2_mac_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1031,13 +1031,13 @@
const uint8_t *arg2_input,
size_t arg3_input_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_pake_input)(arg0_operation, arg1_step, arg2_input, arg3_input_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1049,13 +1049,13 @@
size_t arg3_output_size,
size_t *arg4_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_output, arg3_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_pake_output)(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_output, arg3_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1074,13 +1074,13 @@
const uint8_t *arg1_peer_id,
size_t arg2_peer_id_len)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_peer_id, arg2_peer_id_len);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_pake_set_peer)(arg0_operation, arg1_peer_id, arg2_peer_id_len);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_peer_id, arg2_peer_id_len);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1099,13 +1099,13 @@
const uint8_t *arg1_user_id,
size_t arg2_user_id_len)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_user_id, arg2_user_id_len);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_pake_set_user)(arg0_operation, arg1_user_id, arg2_user_id_len);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_user_id, arg2_user_id_len);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1136,15 +1136,15 @@
size_t arg5_output_size,
size_t *arg6_output_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_peer_key, arg3_peer_key_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_raw_key_agreement)(arg0_alg, arg1_private_key, arg2_peer_key, arg3_peer_key_length, arg4_output, arg5_output_size, arg6_output_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_peer_key, arg3_peer_key_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1158,15 +1158,15 @@
size_t arg5_signature_size,
size_t *arg6_signature_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_sign_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1185,13 +1185,13 @@
size_t arg2_signature_size,
size_t *arg3_signature_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg1_signature, arg2_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_sign_hash_complete)(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg1_signature, arg2_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1203,13 +1203,13 @@
const uint8_t *arg3_hash,
size_t arg4_hash_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_sign_hash_start)(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1223,15 +1223,15 @@
size_t arg5_signature_size,
size_t *arg6_signature_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_sign_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1244,15 +1244,15 @@
const uint8_t *arg4_signature,
size_t arg5_signature_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1282,15 +1282,15 @@
const uint8_t *arg5_signature,
size_t arg6_signature_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
MBEDTLS_TEST_MEMORY_POISON(arg5_signature, arg6_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_verify_hash_start)(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg5_signature, arg6_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}
@@ -1303,15 +1303,15 @@
const uint8_t *arg4_signature,
size_t arg5_signature_length)
{
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length);
-#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
+#if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
-#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
+#endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
return status;
}