blob: 0f13cf5c61d0fac0b6f0f593189fcc307fae31a0 [file] [log] [blame]
Gilles Peskined5e5e6d2024-01-04 16:42:40 +01001/* Automatically generated by generate_psa_wrappers.py, do not edit! */
2
3/* Copyright The Mbed TLS Contributors
4 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
5 */
6
7#if !defined(MBEDTLS_CONFIG_FILE)
8#include "mbedtls/config.h"
9#else
10#include MBEDTLS_CONFIG_FILE
11#endif
12
Gilles Peskinea980aa02024-01-04 20:51:38 +010013#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
14 !defined(RECORD_PSA_STATUS_COVERAGE_LOG)
Gilles Peskined5e5e6d2024-01-04 16:42:40 +010015
16#include <psa/crypto.h>
17
Gilles Peskine42fa8ea2024-01-04 16:59:28 +010018#include <test/memory.h>
Gilles Peskined5e5e6d2024-01-04 16:42:40 +010019#include <test/psa_crypto_helpers.h>
20#include <test/psa_test_wrappers.h>
21
22/* Wrapper for mbedtls_psa_inject_entropy */
23#if defined(MBEDTLS_PSA_INJECT_ENTROPY)
24psa_status_t mbedtls_test_wrap_mbedtls_psa_inject_entropy(
25 const uint8_t *arg0_seed,
26 size_t arg1_seed_size)
27{
28 psa_status_t status = (mbedtls_psa_inject_entropy)(arg0_seed, arg1_seed_size);
29 return status;
30}
31#endif /* defined(MBEDTLS_PSA_INJECT_ENTROPY) */
32
33/* Wrapper for mbedtls_psa_platform_get_builtin_key */
34#if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS)
35psa_status_t mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key(
36 mbedtls_svc_key_id_t arg0_key_id,
37 psa_key_lifetime_t *arg1_lifetime,
38 psa_drv_slot_number_t *arg2_slot_number)
39{
40 psa_status_t status = (mbedtls_psa_platform_get_builtin_key)(arg0_key_id, arg1_lifetime, arg2_slot_number);
41 return status;
42}
43#endif /* defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) */
44
45/* Wrapper for mbedtls_psa_register_se_key */
46#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
47psa_status_t mbedtls_test_wrap_mbedtls_psa_register_se_key(
48 const psa_key_attributes_t *arg0_attributes)
49{
50 psa_status_t status = (mbedtls_psa_register_se_key)(arg0_attributes);
51 return status;
52}
53#endif /* defined(MBEDTLS_PSA_CRYPTO_SE_C) */
54
55/* Wrapper for psa_aead_decrypt */
56psa_status_t mbedtls_test_wrap_psa_aead_decrypt(
57 mbedtls_svc_key_id_t arg0_key,
58 psa_algorithm_t arg1_alg,
59 const uint8_t *arg2_nonce,
60 size_t arg3_nonce_length,
61 const uint8_t *arg4_additional_data,
62 size_t arg5_additional_data_length,
63 const uint8_t *arg6_ciphertext,
64 size_t arg7_ciphertext_length,
65 uint8_t *arg8_plaintext,
66 size_t arg9_plaintext_size,
67 size_t *arg10_plaintext_length)
68{
David Horstmann436b2ef2024-01-22 14:36:01 +000069#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
70 MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
71 MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
72 MBEDTLS_TEST_MEMORY_POISON(arg6_ciphertext, arg7_ciphertext_length);
73 MBEDTLS_TEST_MEMORY_POISON(arg8_plaintext, arg9_plaintext_size);
74#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +010075 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);
David Horstmann436b2ef2024-01-22 14:36:01 +000076#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
77 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
78 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
79 MBEDTLS_TEST_MEMORY_UNPOISON(arg6_ciphertext, arg7_ciphertext_length);
80 MBEDTLS_TEST_MEMORY_UNPOISON(arg8_plaintext, arg9_plaintext_size);
81#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +010082 return status;
83}
84
85/* Wrapper for psa_aead_encrypt */
86psa_status_t mbedtls_test_wrap_psa_aead_encrypt(
87 mbedtls_svc_key_id_t arg0_key,
88 psa_algorithm_t arg1_alg,
89 const uint8_t *arg2_nonce,
90 size_t arg3_nonce_length,
91 const uint8_t *arg4_additional_data,
92 size_t arg5_additional_data_length,
93 const uint8_t *arg6_plaintext,
94 size_t arg7_plaintext_length,
95 uint8_t *arg8_ciphertext,
96 size_t arg9_ciphertext_size,
97 size_t *arg10_ciphertext_length)
98{
David Horstmann436b2ef2024-01-22 14:36:01 +000099#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
100 MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
101 MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
102 MBEDTLS_TEST_MEMORY_POISON(arg6_plaintext, arg7_plaintext_length);
103 MBEDTLS_TEST_MEMORY_POISON(arg8_ciphertext, arg9_ciphertext_size);
104#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100105 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);
David Horstmann436b2ef2024-01-22 14:36:01 +0000106#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
107 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
108 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
109 MBEDTLS_TEST_MEMORY_UNPOISON(arg6_plaintext, arg7_plaintext_length);
110 MBEDTLS_TEST_MEMORY_UNPOISON(arg8_ciphertext, arg9_ciphertext_size);
111#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100112 return status;
113}
114
115/* Wrapper for psa_asymmetric_decrypt */
116psa_status_t mbedtls_test_wrap_psa_asymmetric_decrypt(
117 mbedtls_svc_key_id_t arg0_key,
118 psa_algorithm_t arg1_alg,
119 const uint8_t *arg2_input,
120 size_t arg3_input_length,
121 const uint8_t *arg4_salt,
122 size_t arg5_salt_length,
123 uint8_t *arg6_output,
124 size_t arg7_output_size,
125 size_t *arg8_output_length)
126{
Thomas Daubney2b614f92024-01-31 16:57:30 +0000127#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
128 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
129 MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
130 MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
131#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100132 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);
Thomas Daubney2b614f92024-01-31 16:57:30 +0000133#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
134 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
135 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
136 MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
137#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100138 return status;
139}
140
141/* Wrapper for psa_asymmetric_encrypt */
142psa_status_t mbedtls_test_wrap_psa_asymmetric_encrypt(
143 mbedtls_svc_key_id_t arg0_key,
144 psa_algorithm_t arg1_alg,
145 const uint8_t *arg2_input,
146 size_t arg3_input_length,
147 const uint8_t *arg4_salt,
148 size_t arg5_salt_length,
149 uint8_t *arg6_output,
150 size_t arg7_output_size,
151 size_t *arg8_output_length)
152{
Thomas Daubneyd8adccf2024-01-30 14:41:05 +0000153#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
154 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
155 MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
156 MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
157#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100158 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);
Thomas Daubneyd8adccf2024-01-30 14:41:05 +0000159#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
160 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
161 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
162 MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
163#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100164 return status;
165}
166
167/* Wrapper for psa_cipher_abort */
168psa_status_t mbedtls_test_wrap_psa_cipher_abort(
169 psa_cipher_operation_t *arg0_operation)
170{
171 psa_status_t status = (psa_cipher_abort)(arg0_operation);
172 return status;
173}
174
175/* Wrapper for psa_cipher_decrypt */
176psa_status_t mbedtls_test_wrap_psa_cipher_decrypt(
177 mbedtls_svc_key_id_t arg0_key,
178 psa_algorithm_t arg1_alg,
179 const uint8_t *arg2_input,
180 size_t arg3_input_length,
181 uint8_t *arg4_output,
182 size_t arg5_output_size,
183 size_t *arg6_output_length)
184{
185 psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
186 return status;
187}
188
189/* Wrapper for psa_cipher_decrypt_setup */
190psa_status_t mbedtls_test_wrap_psa_cipher_decrypt_setup(
191 psa_cipher_operation_t *arg0_operation,
192 mbedtls_svc_key_id_t arg1_key,
193 psa_algorithm_t arg2_alg)
194{
195 psa_status_t status = (psa_cipher_decrypt_setup)(arg0_operation, arg1_key, arg2_alg);
196 return status;
197}
198
199/* Wrapper for psa_cipher_encrypt */
200psa_status_t mbedtls_test_wrap_psa_cipher_encrypt(
201 mbedtls_svc_key_id_t arg0_key,
202 psa_algorithm_t arg1_alg,
203 const uint8_t *arg2_input,
204 size_t arg3_input_length,
205 uint8_t *arg4_output,
206 size_t arg5_output_size,
207 size_t *arg6_output_length)
208{
Ryan Everett810421c2024-01-25 12:09:09 +0000209#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
210 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
211 MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
212#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100213 psa_status_t status = (psa_cipher_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
Ryan Everett810421c2024-01-25 12:09:09 +0000214#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
215 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
216 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
217#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100218 return status;
219}
220
221/* Wrapper for psa_cipher_encrypt_setup */
222psa_status_t mbedtls_test_wrap_psa_cipher_encrypt_setup(
223 psa_cipher_operation_t *arg0_operation,
224 mbedtls_svc_key_id_t arg1_key,
225 psa_algorithm_t arg2_alg)
226{
227 psa_status_t status = (psa_cipher_encrypt_setup)(arg0_operation, arg1_key, arg2_alg);
228 return status;
229}
230
231/* Wrapper for psa_cipher_finish */
232psa_status_t mbedtls_test_wrap_psa_cipher_finish(
233 psa_cipher_operation_t *arg0_operation,
234 uint8_t *arg1_output,
235 size_t arg2_output_size,
236 size_t *arg3_output_length)
237{
238 psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length);
239 return status;
240}
241
242/* Wrapper for psa_cipher_generate_iv */
243psa_status_t mbedtls_test_wrap_psa_cipher_generate_iv(
244 psa_cipher_operation_t *arg0_operation,
245 uint8_t *arg1_iv,
246 size_t arg2_iv_size,
247 size_t *arg3_iv_length)
248{
249 psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length);
250 return status;
251}
252
253/* Wrapper for psa_cipher_set_iv */
254psa_status_t mbedtls_test_wrap_psa_cipher_set_iv(
255 psa_cipher_operation_t *arg0_operation,
256 const uint8_t *arg1_iv,
257 size_t arg2_iv_length)
258{
259 psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length);
260 return status;
261}
262
263/* Wrapper for psa_cipher_update */
264psa_status_t mbedtls_test_wrap_psa_cipher_update(
265 psa_cipher_operation_t *arg0_operation,
266 const uint8_t *arg1_input,
267 size_t arg2_input_length,
268 uint8_t *arg3_output,
269 size_t arg4_output_size,
270 size_t *arg5_output_length)
271{
272 psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
273 return status;
274}
275
276/* Wrapper for psa_copy_key */
277psa_status_t mbedtls_test_wrap_psa_copy_key(
278 mbedtls_svc_key_id_t arg0_source_key,
279 const psa_key_attributes_t *arg1_attributes,
280 mbedtls_svc_key_id_t *arg2_target_key)
281{
282 psa_status_t status = (psa_copy_key)(arg0_source_key, arg1_attributes, arg2_target_key);
283 return status;
284}
285
286/* Wrapper for psa_crypto_init */
287psa_status_t mbedtls_test_wrap_psa_crypto_init(void)
288{
289 psa_status_t status = (psa_crypto_init)();
290 return status;
291}
292
293/* Wrapper for psa_destroy_key */
294psa_status_t mbedtls_test_wrap_psa_destroy_key(
295 mbedtls_svc_key_id_t arg0_key)
296{
297 psa_status_t status = (psa_destroy_key)(arg0_key);
298 return status;
299}
300
301/* Wrapper for psa_export_key */
302psa_status_t mbedtls_test_wrap_psa_export_key(
303 mbedtls_svc_key_id_t arg0_key,
304 uint8_t *arg1_data,
305 size_t arg2_data_size,
306 size_t *arg3_data_length)
307{
Ryan Everettdcbc1d32024-01-25 11:04:48 +0000308#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
309 MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
310#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100311 psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
Ryan Everettdcbc1d32024-01-25 11:04:48 +0000312#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
313 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
314#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100315 return status;
316}
317
318/* Wrapper for psa_export_public_key */
319psa_status_t mbedtls_test_wrap_psa_export_public_key(
320 mbedtls_svc_key_id_t arg0_key,
321 uint8_t *arg1_data,
322 size_t arg2_data_size,
323 size_t *arg3_data_length)
324{
Ryan Everettdcbc1d32024-01-25 11:04:48 +0000325#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
326 MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
327#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100328 psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
Ryan Everettdcbc1d32024-01-25 11:04:48 +0000329#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
330 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
331#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100332 return status;
333}
334
335/* Wrapper for psa_generate_key */
336psa_status_t mbedtls_test_wrap_psa_generate_key(
337 const psa_key_attributes_t *arg0_attributes,
338 mbedtls_svc_key_id_t *arg1_key)
339{
340 psa_status_t status = (psa_generate_key)(arg0_attributes, arg1_key);
341 return status;
342}
343
344/* Wrapper for psa_generate_random */
345psa_status_t mbedtls_test_wrap_psa_generate_random(
346 uint8_t *arg0_output,
347 size_t arg1_output_size)
348{
349 psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size);
350 return status;
351}
352
353/* Wrapper for psa_get_key_attributes */
354psa_status_t mbedtls_test_wrap_psa_get_key_attributes(
355 mbedtls_svc_key_id_t arg0_key,
356 psa_key_attributes_t *arg1_attributes)
357{
358 psa_status_t status = (psa_get_key_attributes)(arg0_key, arg1_attributes);
359 return status;
360}
361
362/* Wrapper for psa_hash_abort */
363psa_status_t mbedtls_test_wrap_psa_hash_abort(
364 psa_hash_operation_t *arg0_operation)
365{
366 psa_status_t status = (psa_hash_abort)(arg0_operation);
367 return status;
368}
369
370/* Wrapper for psa_hash_clone */
371psa_status_t mbedtls_test_wrap_psa_hash_clone(
372 const psa_hash_operation_t *arg0_source_operation,
373 psa_hash_operation_t *arg1_target_operation)
374{
375 psa_status_t status = (psa_hash_clone)(arg0_source_operation, arg1_target_operation);
376 return status;
377}
378
379/* Wrapper for psa_hash_compare */
380psa_status_t mbedtls_test_wrap_psa_hash_compare(
381 psa_algorithm_t arg0_alg,
382 const uint8_t *arg1_input,
383 size_t arg2_input_length,
384 const uint8_t *arg3_hash,
385 size_t arg4_hash_length)
386{
Thomas Daubneyebf93292024-01-25 17:09:10 +0000387#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
388 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
389 MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
390#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100391 psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length);
Thomas Daubneyebf93292024-01-25 17:09:10 +0000392#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
393 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
394 MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
395#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100396 return status;
397}
398
399/* Wrapper for psa_hash_compute */
400psa_status_t mbedtls_test_wrap_psa_hash_compute(
401 psa_algorithm_t arg0_alg,
402 const uint8_t *arg1_input,
403 size_t arg2_input_length,
404 uint8_t *arg3_hash,
405 size_t arg4_hash_size,
406 size_t *arg5_hash_length)
407{
Thomas Daubneyebf93292024-01-25 17:09:10 +0000408#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
409 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
410 MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_size);
411#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100412 psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length);
Thomas Daubneyebf93292024-01-25 17:09:10 +0000413#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
414 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
415 MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_size);
416#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100417 return status;
418}
419
420/* Wrapper for psa_hash_finish */
421psa_status_t mbedtls_test_wrap_psa_hash_finish(
422 psa_hash_operation_t *arg0_operation,
423 uint8_t *arg1_hash,
424 size_t arg2_hash_size,
425 size_t *arg3_hash_length)
426{
Thomas Daubneyebf93292024-01-25 17:09:10 +0000427#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
428 MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_size);
429#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100430 psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length);
Thomas Daubneyebf93292024-01-25 17:09:10 +0000431#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
432 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_size);
433#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100434 return status;
435}
436
437/* Wrapper for psa_hash_setup */
438psa_status_t mbedtls_test_wrap_psa_hash_setup(
439 psa_hash_operation_t *arg0_operation,
440 psa_algorithm_t arg1_alg)
441{
442 psa_status_t status = (psa_hash_setup)(arg0_operation, arg1_alg);
443 return status;
444}
445
446/* Wrapper for psa_hash_update */
447psa_status_t mbedtls_test_wrap_psa_hash_update(
448 psa_hash_operation_t *arg0_operation,
449 const uint8_t *arg1_input,
450 size_t arg2_input_length)
451{
Thomas Daubneyebf93292024-01-25 17:09:10 +0000452#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
453 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
454#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100455 psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length);
Thomas Daubneyebf93292024-01-25 17:09:10 +0000456#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
457 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
458#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100459 return status;
460}
461
462/* Wrapper for psa_hash_verify */
463psa_status_t mbedtls_test_wrap_psa_hash_verify(
464 psa_hash_operation_t *arg0_operation,
465 const uint8_t *arg1_hash,
466 size_t arg2_hash_length)
467{
Thomas Daubneyebf93292024-01-25 17:09:10 +0000468#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
469 MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_length);
470#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100471 psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length);
Thomas Daubneyebf93292024-01-25 17:09:10 +0000472#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
473 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_length);
474#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100475 return status;
476}
477
478/* Wrapper for psa_import_key */
479psa_status_t mbedtls_test_wrap_psa_import_key(
480 const psa_key_attributes_t *arg0_attributes,
481 const uint8_t *arg1_data,
482 size_t arg2_data_length,
483 mbedtls_svc_key_id_t *arg3_key)
484{
Ryan Everettdcbc1d32024-01-25 11:04:48 +0000485#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
486 MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_length);
487#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100488 psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key);
Ryan Everettdcbc1d32024-01-25 11:04:48 +0000489#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
490 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_length);
491#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100492 return status;
493}
494
495/* Wrapper for psa_key_derivation_abort */
496psa_status_t mbedtls_test_wrap_psa_key_derivation_abort(
497 psa_key_derivation_operation_t *arg0_operation)
498{
499 psa_status_t status = (psa_key_derivation_abort)(arg0_operation);
500 return status;
501}
502
503/* Wrapper for psa_key_derivation_get_capacity */
504psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity(
505 const psa_key_derivation_operation_t *arg0_operation,
506 size_t *arg1_capacity)
507{
508 psa_status_t status = (psa_key_derivation_get_capacity)(arg0_operation, arg1_capacity);
509 return status;
510}
511
512/* Wrapper for psa_key_derivation_input_bytes */
513psa_status_t mbedtls_test_wrap_psa_key_derivation_input_bytes(
514 psa_key_derivation_operation_t *arg0_operation,
515 psa_key_derivation_step_t arg1_step,
516 const uint8_t *arg2_data,
517 size_t arg3_data_length)
518{
Ryan Everett6c9e69d2024-02-09 16:23:25 +0000519#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
520 MBEDTLS_TEST_MEMORY_POISON(arg2_data, arg3_data_length);
521#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100522 psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length);
Ryan Everett6c9e69d2024-02-09 16:23:25 +0000523#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
524 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_data, arg3_data_length);
525#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100526 return status;
527}
528
529/* Wrapper for psa_key_derivation_input_key */
530psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key(
531 psa_key_derivation_operation_t *arg0_operation,
532 psa_key_derivation_step_t arg1_step,
533 mbedtls_svc_key_id_t arg2_key)
534{
535 psa_status_t status = (psa_key_derivation_input_key)(arg0_operation, arg1_step, arg2_key);
536 return status;
537}
538
539/* Wrapper for psa_key_derivation_key_agreement */
540psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement(
541 psa_key_derivation_operation_t *arg0_operation,
542 psa_key_derivation_step_t arg1_step,
543 mbedtls_svc_key_id_t arg2_private_key,
544 const uint8_t *arg3_peer_key,
545 size_t arg4_peer_key_length)
546{
547 psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length);
548 return status;
549}
550
551/* Wrapper for psa_key_derivation_output_bytes */
552psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes(
553 psa_key_derivation_operation_t *arg0_operation,
554 uint8_t *arg1_output,
555 size_t arg2_output_length)
556{
Ryan Everett6c9e69d2024-02-09 16:23:25 +0000557#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
558 MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_length);
559#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100560 psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length);
Ryan Everett6c9e69d2024-02-09 16:23:25 +0000561#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
562 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_length);
563#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100564 return status;
565}
566
567/* Wrapper for psa_key_derivation_output_key */
568psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key(
569 const psa_key_attributes_t *arg0_attributes,
570 psa_key_derivation_operation_t *arg1_operation,
571 mbedtls_svc_key_id_t *arg2_key)
572{
573 psa_status_t status = (psa_key_derivation_output_key)(arg0_attributes, arg1_operation, arg2_key);
574 return status;
575}
576
577/* Wrapper for psa_key_derivation_set_capacity */
578psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity(
579 psa_key_derivation_operation_t *arg0_operation,
580 size_t arg1_capacity)
581{
582 psa_status_t status = (psa_key_derivation_set_capacity)(arg0_operation, arg1_capacity);
583 return status;
584}
585
586/* Wrapper for psa_key_derivation_setup */
587psa_status_t mbedtls_test_wrap_psa_key_derivation_setup(
588 psa_key_derivation_operation_t *arg0_operation,
589 psa_algorithm_t arg1_alg)
590{
591 psa_status_t status = (psa_key_derivation_setup)(arg0_operation, arg1_alg);
592 return status;
593}
594
595/* Wrapper for psa_mac_abort */
596psa_status_t mbedtls_test_wrap_psa_mac_abort(
597 psa_mac_operation_t *arg0_operation)
598{
599 psa_status_t status = (psa_mac_abort)(arg0_operation);
600 return status;
601}
602
603/* Wrapper for psa_mac_compute */
604psa_status_t mbedtls_test_wrap_psa_mac_compute(
605 mbedtls_svc_key_id_t arg0_key,
606 psa_algorithm_t arg1_alg,
607 const uint8_t *arg2_input,
608 size_t arg3_input_length,
609 uint8_t *arg4_mac,
610 size_t arg5_mac_size,
611 size_t *arg6_mac_length)
612{
Thomas Daubney6b915032024-01-30 12:07:38 +0000613#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
614 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
615 MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_size);
616#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100617 psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length);
Thomas Daubney6b915032024-01-30 12:07:38 +0000618#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
619 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
620 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_size);
621#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100622 return status;
623}
624
625/* Wrapper for psa_mac_sign_finish */
626psa_status_t mbedtls_test_wrap_psa_mac_sign_finish(
627 psa_mac_operation_t *arg0_operation,
628 uint8_t *arg1_mac,
629 size_t arg2_mac_size,
630 size_t *arg3_mac_length)
631{
Thomas Daubney6b915032024-01-30 12:07:38 +0000632#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
633 MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_size);
634#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100635 psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length);
Thomas Daubney6b915032024-01-30 12:07:38 +0000636#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
637 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_size);
638#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100639 return status;
640}
641
642/* Wrapper for psa_mac_sign_setup */
643psa_status_t mbedtls_test_wrap_psa_mac_sign_setup(
644 psa_mac_operation_t *arg0_operation,
645 mbedtls_svc_key_id_t arg1_key,
646 psa_algorithm_t arg2_alg)
647{
648 psa_status_t status = (psa_mac_sign_setup)(arg0_operation, arg1_key, arg2_alg);
649 return status;
650}
651
652/* Wrapper for psa_mac_update */
653psa_status_t mbedtls_test_wrap_psa_mac_update(
654 psa_mac_operation_t *arg0_operation,
655 const uint8_t *arg1_input,
656 size_t arg2_input_length)
657{
Thomas Daubney6b915032024-01-30 12:07:38 +0000658#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
659 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
660#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100661 psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length);
Thomas Daubney6b915032024-01-30 12:07:38 +0000662#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
663 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
664#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100665 return status;
666}
667
668/* Wrapper for psa_mac_verify */
669psa_status_t mbedtls_test_wrap_psa_mac_verify(
670 mbedtls_svc_key_id_t arg0_key,
671 psa_algorithm_t arg1_alg,
672 const uint8_t *arg2_input,
673 size_t arg3_input_length,
674 const uint8_t *arg4_mac,
675 size_t arg5_mac_length)
676{
Thomas Daubney6b915032024-01-30 12:07:38 +0000677#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
678 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
679 MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_length);
680#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100681 psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length);
Thomas Daubney6b915032024-01-30 12:07:38 +0000682#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
683 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
684 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_length);
685#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100686 return status;
687}
688
689/* Wrapper for psa_mac_verify_finish */
690psa_status_t mbedtls_test_wrap_psa_mac_verify_finish(
691 psa_mac_operation_t *arg0_operation,
692 const uint8_t *arg1_mac,
693 size_t arg2_mac_length)
694{
Thomas Daubney6b915032024-01-30 12:07:38 +0000695#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
696 MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_length);
697#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100698 psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length);
Thomas Daubney6b915032024-01-30 12:07:38 +0000699#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
700 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_length);
701#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100702 return status;
703}
704
705/* Wrapper for psa_mac_verify_setup */
706psa_status_t mbedtls_test_wrap_psa_mac_verify_setup(
707 psa_mac_operation_t *arg0_operation,
708 mbedtls_svc_key_id_t arg1_key,
709 psa_algorithm_t arg2_alg)
710{
711 psa_status_t status = (psa_mac_verify_setup)(arg0_operation, arg1_key, arg2_alg);
712 return status;
713}
714
715/* Wrapper for psa_purge_key */
716psa_status_t mbedtls_test_wrap_psa_purge_key(
717 mbedtls_svc_key_id_t arg0_key)
718{
719 psa_status_t status = (psa_purge_key)(arg0_key);
720 return status;
721}
722
723/* Wrapper for psa_raw_key_agreement */
724psa_status_t mbedtls_test_wrap_psa_raw_key_agreement(
725 psa_algorithm_t arg0_alg,
726 mbedtls_svc_key_id_t arg1_private_key,
727 const uint8_t *arg2_peer_key,
728 size_t arg3_peer_key_length,
729 uint8_t *arg4_output,
730 size_t arg5_output_size,
731 size_t *arg6_output_length)
732{
733 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);
734 return status;
735}
736
737/* Wrapper for psa_sign_hash */
738psa_status_t mbedtls_test_wrap_psa_sign_hash(
739 mbedtls_svc_key_id_t arg0_key,
740 psa_algorithm_t arg1_alg,
741 const uint8_t *arg2_hash,
742 size_t arg3_hash_length,
743 uint8_t *arg4_signature,
744 size_t arg5_signature_size,
745 size_t *arg6_signature_length)
746{
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000747#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
748 MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
749 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
750#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100751 psa_status_t status = (psa_sign_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length);
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000752#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
753 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
754 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
755#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100756 return status;
757}
758
759/* Wrapper for psa_sign_message */
760psa_status_t mbedtls_test_wrap_psa_sign_message(
761 mbedtls_svc_key_id_t arg0_key,
762 psa_algorithm_t arg1_alg,
763 const uint8_t *arg2_input,
764 size_t arg3_input_length,
765 uint8_t *arg4_signature,
766 size_t arg5_signature_size,
767 size_t *arg6_signature_length)
768{
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000769#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
770 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
771 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
772#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100773 psa_status_t status = (psa_sign_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length);
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000774#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
775 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
776 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
777#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100778 return status;
779}
780
781/* Wrapper for psa_verify_hash */
782psa_status_t mbedtls_test_wrap_psa_verify_hash(
783 mbedtls_svc_key_id_t arg0_key,
784 psa_algorithm_t arg1_alg,
785 const uint8_t *arg2_hash,
786 size_t arg3_hash_length,
787 const uint8_t *arg4_signature,
788 size_t arg5_signature_length)
789{
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000790#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
791 MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
792 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
793#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100794 psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length);
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000795#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
796 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
797 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
798#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100799 return status;
800}
801
802/* Wrapper for psa_verify_message */
803psa_status_t mbedtls_test_wrap_psa_verify_message(
804 mbedtls_svc_key_id_t arg0_key,
805 psa_algorithm_t arg1_alg,
806 const uint8_t *arg2_input,
807 size_t arg3_input_length,
808 const uint8_t *arg4_signature,
809 size_t arg5_signature_length)
810{
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000811#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
812 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
813 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
814#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100815 psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length);
Thomas Daubneyc63e31a2024-01-30 13:33:14 +0000816#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
817 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
818 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
819#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100820 return status;
821}
822
Gilles Peskinea980aa02024-01-04 20:51:38 +0100823#endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
824 !defined(RECORD_PSA_STATUS_COVERAGE_LOG) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100825
826/* End of automatically generated file. */