blob: fa9a8d6f0227f0e70a0f300e9422e8530bae9464 [file] [log] [blame]
Gilles Peskine6e4332c2024-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#include <mbedtls/build_info.h>
8
Gilles Peskine4411c9c2024-01-04 20:51:38 +01009#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
10 !defined(RECORD_PSA_STATUS_COVERAGE_LOG)
Gilles Peskine6e4332c2024-01-04 16:42:40 +010011
12#include <psa/crypto.h>
13
Gilles Peskine90d14d72024-01-04 16:59:28 +010014#include <test/memory.h>
Gilles Peskine6e4332c2024-01-04 16:42:40 +010015#include <test/psa_crypto_helpers.h>
16#include <test/psa_test_wrappers.h>
17
18/* Wrapper for mbedtls_psa_inject_entropy */
19#if defined(MBEDTLS_PSA_INJECT_ENTROPY)
20psa_status_t mbedtls_test_wrap_mbedtls_psa_inject_entropy(
21 const uint8_t *arg0_seed,
22 size_t arg1_seed_size)
23{
24 psa_status_t status = (mbedtls_psa_inject_entropy)(arg0_seed, arg1_seed_size);
25 return status;
26}
27#endif /* defined(MBEDTLS_PSA_INJECT_ENTROPY) */
28
29/* Wrapper for mbedtls_psa_platform_get_builtin_key */
30#if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS)
31psa_status_t mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key(
32 mbedtls_svc_key_id_t arg0_key_id,
33 psa_key_lifetime_t *arg1_lifetime,
34 psa_drv_slot_number_t *arg2_slot_number)
35{
36 psa_status_t status = (mbedtls_psa_platform_get_builtin_key)(arg0_key_id, arg1_lifetime, arg2_slot_number);
37 return status;
38}
39#endif /* defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) */
40
41/* Wrapper for mbedtls_psa_register_se_key */
42#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
43psa_status_t mbedtls_test_wrap_mbedtls_psa_register_se_key(
44 const psa_key_attributes_t *arg0_attributes)
45{
46 psa_status_t status = (mbedtls_psa_register_se_key)(arg0_attributes);
47 return status;
48}
49#endif /* defined(MBEDTLS_PSA_CRYPTO_SE_C) */
50
51/* Wrapper for psa_aead_abort */
52psa_status_t mbedtls_test_wrap_psa_aead_abort(
53 psa_aead_operation_t *arg0_operation)
54{
55 psa_status_t status = (psa_aead_abort)(arg0_operation);
56 return status;
57}
58
59/* Wrapper for psa_aead_decrypt */
60psa_status_t mbedtls_test_wrap_psa_aead_decrypt(
61 mbedtls_svc_key_id_t arg0_key,
62 psa_algorithm_t arg1_alg,
63 const uint8_t *arg2_nonce,
64 size_t arg3_nonce_length,
65 const uint8_t *arg4_additional_data,
66 size_t arg5_additional_data_length,
67 const uint8_t *arg6_ciphertext,
68 size_t arg7_ciphertext_length,
69 uint8_t *arg8_plaintext,
70 size_t arg9_plaintext_size,
71 size_t *arg10_plaintext_length)
72{
David Horstmann86e6fe02024-01-22 14:36:01 +000073#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
74 MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
75 MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
76 MBEDTLS_TEST_MEMORY_POISON(arg6_ciphertext, arg7_ciphertext_length);
77 MBEDTLS_TEST_MEMORY_POISON(arg8_plaintext, arg9_plaintext_size);
78#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +010079 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 Horstmann86e6fe02024-01-22 14:36:01 +000080#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
81 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
82 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
83 MBEDTLS_TEST_MEMORY_UNPOISON(arg6_ciphertext, arg7_ciphertext_length);
84 MBEDTLS_TEST_MEMORY_UNPOISON(arg8_plaintext, arg9_plaintext_size);
85#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +010086 return status;
87}
88
89/* Wrapper for psa_aead_decrypt_setup */
90psa_status_t mbedtls_test_wrap_psa_aead_decrypt_setup(
91 psa_aead_operation_t *arg0_operation,
92 mbedtls_svc_key_id_t arg1_key,
93 psa_algorithm_t arg2_alg)
94{
95 psa_status_t status = (psa_aead_decrypt_setup)(arg0_operation, arg1_key, arg2_alg);
96 return status;
97}
98
99/* Wrapper for psa_aead_encrypt */
100psa_status_t mbedtls_test_wrap_psa_aead_encrypt(
101 mbedtls_svc_key_id_t arg0_key,
102 psa_algorithm_t arg1_alg,
103 const uint8_t *arg2_nonce,
104 size_t arg3_nonce_length,
105 const uint8_t *arg4_additional_data,
106 size_t arg5_additional_data_length,
107 const uint8_t *arg6_plaintext,
108 size_t arg7_plaintext_length,
109 uint8_t *arg8_ciphertext,
110 size_t arg9_ciphertext_size,
111 size_t *arg10_ciphertext_length)
112{
David Horstmann86e6fe02024-01-22 14:36:01 +0000113#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
114 MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
115 MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
116 MBEDTLS_TEST_MEMORY_POISON(arg6_plaintext, arg7_plaintext_length);
117 MBEDTLS_TEST_MEMORY_POISON(arg8_ciphertext, arg9_ciphertext_size);
118#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100119 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 Horstmann86e6fe02024-01-22 14:36:01 +0000120#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
121 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
122 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
123 MBEDTLS_TEST_MEMORY_UNPOISON(arg6_plaintext, arg7_plaintext_length);
124 MBEDTLS_TEST_MEMORY_UNPOISON(arg8_ciphertext, arg9_ciphertext_size);
125#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100126 return status;
127}
128
129/* Wrapper for psa_aead_encrypt_setup */
130psa_status_t mbedtls_test_wrap_psa_aead_encrypt_setup(
131 psa_aead_operation_t *arg0_operation,
132 mbedtls_svc_key_id_t arg1_key,
133 psa_algorithm_t arg2_alg)
134{
135 psa_status_t status = (psa_aead_encrypt_setup)(arg0_operation, arg1_key, arg2_alg);
136 return status;
137}
138
139/* Wrapper for psa_aead_finish */
140psa_status_t mbedtls_test_wrap_psa_aead_finish(
141 psa_aead_operation_t *arg0_operation,
142 uint8_t *arg1_ciphertext,
143 size_t arg2_ciphertext_size,
144 size_t *arg3_ciphertext_length,
145 uint8_t *arg4_tag,
146 size_t arg5_tag_size,
147 size_t *arg6_tag_length)
148{
David Horstmann86e6fe02024-01-22 14:36:01 +0000149#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
150 MBEDTLS_TEST_MEMORY_POISON(arg1_ciphertext, arg2_ciphertext_size);
151 MBEDTLS_TEST_MEMORY_POISON(arg4_tag, arg5_tag_size);
152#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100153 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);
David Horstmann86e6fe02024-01-22 14:36:01 +0000154#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
155 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_ciphertext, arg2_ciphertext_size);
156 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_tag, arg5_tag_size);
157#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100158 return status;
159}
160
161/* Wrapper for psa_aead_generate_nonce */
162psa_status_t mbedtls_test_wrap_psa_aead_generate_nonce(
163 psa_aead_operation_t *arg0_operation,
164 uint8_t *arg1_nonce,
165 size_t arg2_nonce_size,
166 size_t *arg3_nonce_length)
167{
David Horstmann86e6fe02024-01-22 14:36:01 +0000168#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
169 MBEDTLS_TEST_MEMORY_POISON(arg1_nonce, arg2_nonce_size);
170#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100171 psa_status_t status = (psa_aead_generate_nonce)(arg0_operation, arg1_nonce, arg2_nonce_size, arg3_nonce_length);
David Horstmann86e6fe02024-01-22 14:36:01 +0000172#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
173 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_nonce, arg2_nonce_size);
174#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100175 return status;
176}
177
178/* Wrapper for psa_aead_set_lengths */
179psa_status_t mbedtls_test_wrap_psa_aead_set_lengths(
180 psa_aead_operation_t *arg0_operation,
181 size_t arg1_ad_length,
182 size_t arg2_plaintext_length)
183{
184 psa_status_t status = (psa_aead_set_lengths)(arg0_operation, arg1_ad_length, arg2_plaintext_length);
185 return status;
186}
187
188/* Wrapper for psa_aead_set_nonce */
189psa_status_t mbedtls_test_wrap_psa_aead_set_nonce(
190 psa_aead_operation_t *arg0_operation,
191 const uint8_t *arg1_nonce,
192 size_t arg2_nonce_length)
193{
David Horstmann86e6fe02024-01-22 14:36:01 +0000194#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
195 MBEDTLS_TEST_MEMORY_POISON(arg1_nonce, arg2_nonce_length);
196#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100197 psa_status_t status = (psa_aead_set_nonce)(arg0_operation, arg1_nonce, arg2_nonce_length);
David Horstmann86e6fe02024-01-22 14:36:01 +0000198#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
199 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_nonce, arg2_nonce_length);
200#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100201 return status;
202}
203
204/* Wrapper for psa_aead_update */
205psa_status_t mbedtls_test_wrap_psa_aead_update(
206 psa_aead_operation_t *arg0_operation,
207 const uint8_t *arg1_input,
208 size_t arg2_input_length,
209 uint8_t *arg3_output,
210 size_t arg4_output_size,
211 size_t *arg5_output_length)
212{
David Horstmann86e6fe02024-01-22 14:36:01 +0000213#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
214 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
215 MBEDTLS_TEST_MEMORY_POISON(arg3_output, arg4_output_size);
216#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100217 psa_status_t status = (psa_aead_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
David Horstmann86e6fe02024-01-22 14:36:01 +0000218#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
219 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
220 MBEDTLS_TEST_MEMORY_UNPOISON(arg3_output, arg4_output_size);
221#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100222 return status;
223}
224
225/* Wrapper for psa_aead_update_ad */
226psa_status_t mbedtls_test_wrap_psa_aead_update_ad(
227 psa_aead_operation_t *arg0_operation,
228 const uint8_t *arg1_input,
229 size_t arg2_input_length)
230{
David Horstmann86e6fe02024-01-22 14:36:01 +0000231#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
232 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
233#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100234 psa_status_t status = (psa_aead_update_ad)(arg0_operation, arg1_input, arg2_input_length);
David Horstmann86e6fe02024-01-22 14:36:01 +0000235#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
236 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
237#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100238 return status;
239}
240
241/* Wrapper for psa_aead_verify */
242psa_status_t mbedtls_test_wrap_psa_aead_verify(
243 psa_aead_operation_t *arg0_operation,
244 uint8_t *arg1_plaintext,
245 size_t arg2_plaintext_size,
246 size_t *arg3_plaintext_length,
247 const uint8_t *arg4_tag,
248 size_t arg5_tag_length)
249{
David Horstmann86e6fe02024-01-22 14:36:01 +0000250#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
251 MBEDTLS_TEST_MEMORY_POISON(arg1_plaintext, arg2_plaintext_size);
252 MBEDTLS_TEST_MEMORY_POISON(arg4_tag, arg5_tag_length);
253#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100254 psa_status_t status = (psa_aead_verify)(arg0_operation, arg1_plaintext, arg2_plaintext_size, arg3_plaintext_length, arg4_tag, arg5_tag_length);
David Horstmann86e6fe02024-01-22 14:36:01 +0000255#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
256 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_plaintext, arg2_plaintext_size);
257 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_tag, arg5_tag_length);
258#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100259 return status;
260}
261
262/* Wrapper for psa_asymmetric_decrypt */
263psa_status_t mbedtls_test_wrap_psa_asymmetric_decrypt(
264 mbedtls_svc_key_id_t arg0_key,
265 psa_algorithm_t arg1_alg,
266 const uint8_t *arg2_input,
267 size_t arg3_input_length,
268 const uint8_t *arg4_salt,
269 size_t arg5_salt_length,
270 uint8_t *arg6_output,
271 size_t arg7_output_size,
272 size_t *arg8_output_length)
273{
274 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);
275 return status;
276}
277
278/* Wrapper for psa_asymmetric_encrypt */
279psa_status_t mbedtls_test_wrap_psa_asymmetric_encrypt(
280 mbedtls_svc_key_id_t arg0_key,
281 psa_algorithm_t arg1_alg,
282 const uint8_t *arg2_input,
283 size_t arg3_input_length,
284 const uint8_t *arg4_salt,
285 size_t arg5_salt_length,
286 uint8_t *arg6_output,
287 size_t arg7_output_size,
288 size_t *arg8_output_length)
289{
290 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);
291 return status;
292}
293
294/* Wrapper for psa_cipher_abort */
295psa_status_t mbedtls_test_wrap_psa_cipher_abort(
296 psa_cipher_operation_t *arg0_operation)
297{
298 psa_status_t status = (psa_cipher_abort)(arg0_operation);
299 return status;
300}
301
302/* Wrapper for psa_cipher_decrypt */
303psa_status_t mbedtls_test_wrap_psa_cipher_decrypt(
304 mbedtls_svc_key_id_t arg0_key,
305 psa_algorithm_t arg1_alg,
306 const uint8_t *arg2_input,
307 size_t arg3_input_length,
308 uint8_t *arg4_output,
309 size_t arg5_output_size,
310 size_t *arg6_output_length)
311{
312 psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
313 return status;
314}
315
316/* Wrapper for psa_cipher_decrypt_setup */
317psa_status_t mbedtls_test_wrap_psa_cipher_decrypt_setup(
318 psa_cipher_operation_t *arg0_operation,
319 mbedtls_svc_key_id_t arg1_key,
320 psa_algorithm_t arg2_alg)
321{
322 psa_status_t status = (psa_cipher_decrypt_setup)(arg0_operation, arg1_key, arg2_alg);
323 return status;
324}
325
326/* Wrapper for psa_cipher_encrypt */
327psa_status_t mbedtls_test_wrap_psa_cipher_encrypt(
328 mbedtls_svc_key_id_t arg0_key,
329 psa_algorithm_t arg1_alg,
330 const uint8_t *arg2_input,
331 size_t arg3_input_length,
332 uint8_t *arg4_output,
333 size_t arg5_output_size,
334 size_t *arg6_output_length)
335{
Ryan Everett84a666d2024-01-25 12:00:02 +0000336#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
337 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
338 MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
339#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100340 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 Everett84a666d2024-01-25 12:00:02 +0000341#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
342 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
343 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
344#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100345 return status;
346}
347
348/* Wrapper for psa_cipher_encrypt_setup */
349psa_status_t mbedtls_test_wrap_psa_cipher_encrypt_setup(
350 psa_cipher_operation_t *arg0_operation,
351 mbedtls_svc_key_id_t arg1_key,
352 psa_algorithm_t arg2_alg)
353{
354 psa_status_t status = (psa_cipher_encrypt_setup)(arg0_operation, arg1_key, arg2_alg);
355 return status;
356}
357
358/* Wrapper for psa_cipher_finish */
359psa_status_t mbedtls_test_wrap_psa_cipher_finish(
360 psa_cipher_operation_t *arg0_operation,
361 uint8_t *arg1_output,
362 size_t arg2_output_size,
363 size_t *arg3_output_length)
364{
365 psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length);
366 return status;
367}
368
369/* Wrapper for psa_cipher_generate_iv */
370psa_status_t mbedtls_test_wrap_psa_cipher_generate_iv(
371 psa_cipher_operation_t *arg0_operation,
372 uint8_t *arg1_iv,
373 size_t arg2_iv_size,
374 size_t *arg3_iv_length)
375{
376 psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length);
377 return status;
378}
379
380/* Wrapper for psa_cipher_set_iv */
381psa_status_t mbedtls_test_wrap_psa_cipher_set_iv(
382 psa_cipher_operation_t *arg0_operation,
383 const uint8_t *arg1_iv,
384 size_t arg2_iv_length)
385{
386 psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length);
387 return status;
388}
389
390/* Wrapper for psa_cipher_update */
391psa_status_t mbedtls_test_wrap_psa_cipher_update(
392 psa_cipher_operation_t *arg0_operation,
393 const uint8_t *arg1_input,
394 size_t arg2_input_length,
395 uint8_t *arg3_output,
396 size_t arg4_output_size,
397 size_t *arg5_output_length)
398{
399 psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
400 return status;
401}
402
403/* Wrapper for psa_copy_key */
404psa_status_t mbedtls_test_wrap_psa_copy_key(
405 mbedtls_svc_key_id_t arg0_source_key,
406 const psa_key_attributes_t *arg1_attributes,
407 mbedtls_svc_key_id_t *arg2_target_key)
408{
409 psa_status_t status = (psa_copy_key)(arg0_source_key, arg1_attributes, arg2_target_key);
410 return status;
411}
412
413/* Wrapper for psa_crypto_driver_pake_get_cipher_suite */
414psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_cipher_suite(
415 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
416 psa_pake_cipher_suite_t *arg1_cipher_suite)
417{
418 psa_status_t status = (psa_crypto_driver_pake_get_cipher_suite)(arg0_inputs, arg1_cipher_suite);
419 return status;
420}
421
422/* Wrapper for psa_crypto_driver_pake_get_password */
423psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_password(
424 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
425 uint8_t *arg1_buffer,
426 size_t arg2_buffer_size,
427 size_t *arg3_buffer_length)
428{
429 psa_status_t status = (psa_crypto_driver_pake_get_password)(arg0_inputs, arg1_buffer, arg2_buffer_size, arg3_buffer_length);
430 return status;
431}
432
433/* Wrapper for psa_crypto_driver_pake_get_password_len */
434psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_password_len(
435 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
436 size_t *arg1_password_len)
437{
438 psa_status_t status = (psa_crypto_driver_pake_get_password_len)(arg0_inputs, arg1_password_len);
439 return status;
440}
441
442/* Wrapper for psa_crypto_driver_pake_get_peer */
443psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_peer(
444 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
445 uint8_t *arg1_peer_id,
446 size_t arg2_peer_id_size,
447 size_t *arg3_peer_id_length)
448{
449 psa_status_t status = (psa_crypto_driver_pake_get_peer)(arg0_inputs, arg1_peer_id, arg2_peer_id_size, arg3_peer_id_length);
450 return status;
451}
452
453/* Wrapper for psa_crypto_driver_pake_get_peer_len */
454psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_peer_len(
455 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
456 size_t *arg1_peer_len)
457{
458 psa_status_t status = (psa_crypto_driver_pake_get_peer_len)(arg0_inputs, arg1_peer_len);
459 return status;
460}
461
462/* Wrapper for psa_crypto_driver_pake_get_user */
463psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_user(
464 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
465 uint8_t *arg1_user_id,
466 size_t arg2_user_id_size,
467 size_t *arg3_user_id_len)
468{
469 psa_status_t status = (psa_crypto_driver_pake_get_user)(arg0_inputs, arg1_user_id, arg2_user_id_size, arg3_user_id_len);
470 return status;
471}
472
473/* Wrapper for psa_crypto_driver_pake_get_user_len */
474psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_user_len(
475 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
476 size_t *arg1_user_len)
477{
478 psa_status_t status = (psa_crypto_driver_pake_get_user_len)(arg0_inputs, arg1_user_len);
479 return status;
480}
481
482/* Wrapper for psa_crypto_init */
483psa_status_t mbedtls_test_wrap_psa_crypto_init(void)
484{
485 psa_status_t status = (psa_crypto_init)();
486 return status;
487}
488
489/* Wrapper for psa_destroy_key */
490psa_status_t mbedtls_test_wrap_psa_destroy_key(
491 mbedtls_svc_key_id_t arg0_key)
492{
493 psa_status_t status = (psa_destroy_key)(arg0_key);
494 return status;
495}
496
497/* Wrapper for psa_export_key */
498psa_status_t mbedtls_test_wrap_psa_export_key(
499 mbedtls_svc_key_id_t arg0_key,
500 uint8_t *arg1_data,
501 size_t arg2_data_size,
502 size_t *arg3_data_length)
503{
Ryan Everett77b91e32024-01-25 10:58:06 +0000504#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
505 MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
506#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100507 psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
Ryan Everett77b91e32024-01-25 10:58:06 +0000508#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
509 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
510#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100511 return status;
512}
513
514/* Wrapper for psa_export_public_key */
515psa_status_t mbedtls_test_wrap_psa_export_public_key(
516 mbedtls_svc_key_id_t arg0_key,
517 uint8_t *arg1_data,
518 size_t arg2_data_size,
519 size_t *arg3_data_length)
520{
Ryan Everett77b91e32024-01-25 10:58:06 +0000521#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
522 MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
523#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100524 psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
Ryan Everett77b91e32024-01-25 10:58:06 +0000525#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
526 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
527#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100528 return status;
529}
530
531/* Wrapper for psa_generate_key */
532psa_status_t mbedtls_test_wrap_psa_generate_key(
533 const psa_key_attributes_t *arg0_attributes,
534 mbedtls_svc_key_id_t *arg1_key)
535{
536 psa_status_t status = (psa_generate_key)(arg0_attributes, arg1_key);
537 return status;
538}
539
540/* Wrapper for psa_generate_random */
541psa_status_t mbedtls_test_wrap_psa_generate_random(
542 uint8_t *arg0_output,
543 size_t arg1_output_size)
544{
David Horstmann075c5fb2024-02-06 15:44:08 +0000545#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
546 MBEDTLS_TEST_MEMORY_POISON(arg0_output, arg1_output_size);
547#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100548 psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size);
David Horstmann075c5fb2024-02-06 15:44:08 +0000549#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
550 MBEDTLS_TEST_MEMORY_UNPOISON(arg0_output, arg1_output_size);
551#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100552 return status;
553}
554
555/* Wrapper for psa_get_key_attributes */
556psa_status_t mbedtls_test_wrap_psa_get_key_attributes(
557 mbedtls_svc_key_id_t arg0_key,
558 psa_key_attributes_t *arg1_attributes)
559{
560 psa_status_t status = (psa_get_key_attributes)(arg0_key, arg1_attributes);
561 return status;
562}
563
564/* Wrapper for psa_hash_abort */
565psa_status_t mbedtls_test_wrap_psa_hash_abort(
566 psa_hash_operation_t *arg0_operation)
567{
568 psa_status_t status = (psa_hash_abort)(arg0_operation);
569 return status;
570}
571
572/* Wrapper for psa_hash_clone */
573psa_status_t mbedtls_test_wrap_psa_hash_clone(
574 const psa_hash_operation_t *arg0_source_operation,
575 psa_hash_operation_t *arg1_target_operation)
576{
577 psa_status_t status = (psa_hash_clone)(arg0_source_operation, arg1_target_operation);
578 return status;
579}
580
581/* Wrapper for psa_hash_compare */
582psa_status_t mbedtls_test_wrap_psa_hash_compare(
583 psa_algorithm_t arg0_alg,
584 const uint8_t *arg1_input,
585 size_t arg2_input_length,
586 const uint8_t *arg3_hash,
587 size_t arg4_hash_length)
588{
Thomas Daubney45c85862024-01-25 16:48:09 +0000589#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
590 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
591 MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
592#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100593 psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length);
Thomas Daubney45c85862024-01-25 16:48:09 +0000594#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
595 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
596 MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
597#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100598 return status;
599}
600
601/* Wrapper for psa_hash_compute */
602psa_status_t mbedtls_test_wrap_psa_hash_compute(
603 psa_algorithm_t arg0_alg,
604 const uint8_t *arg1_input,
605 size_t arg2_input_length,
606 uint8_t *arg3_hash,
607 size_t arg4_hash_size,
608 size_t *arg5_hash_length)
609{
Thomas Daubney45c85862024-01-25 16:48:09 +0000610#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
611 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
612 MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_size);
613#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100614 psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length);
Thomas Daubney45c85862024-01-25 16:48:09 +0000615#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
616 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
617 MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_size);
618#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100619 return status;
620}
621
622/* Wrapper for psa_hash_finish */
623psa_status_t mbedtls_test_wrap_psa_hash_finish(
624 psa_hash_operation_t *arg0_operation,
625 uint8_t *arg1_hash,
626 size_t arg2_hash_size,
627 size_t *arg3_hash_length)
628{
Thomas Daubney45c85862024-01-25 16:48:09 +0000629#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
630 MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_size);
631#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100632 psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length);
Thomas Daubney45c85862024-01-25 16:48:09 +0000633#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
634 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_size);
635#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100636 return status;
637}
638
639/* Wrapper for psa_hash_setup */
640psa_status_t mbedtls_test_wrap_psa_hash_setup(
641 psa_hash_operation_t *arg0_operation,
642 psa_algorithm_t arg1_alg)
643{
644 psa_status_t status = (psa_hash_setup)(arg0_operation, arg1_alg);
645 return status;
646}
647
648/* Wrapper for psa_hash_update */
649psa_status_t mbedtls_test_wrap_psa_hash_update(
650 psa_hash_operation_t *arg0_operation,
651 const uint8_t *arg1_input,
652 size_t arg2_input_length)
653{
Thomas Daubney45c85862024-01-25 16:48:09 +0000654#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
655 MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
656#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100657 psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length);
Thomas Daubney45c85862024-01-25 16:48:09 +0000658#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
659 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
660#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100661 return status;
662}
663
664/* Wrapper for psa_hash_verify */
665psa_status_t mbedtls_test_wrap_psa_hash_verify(
666 psa_hash_operation_t *arg0_operation,
667 const uint8_t *arg1_hash,
668 size_t arg2_hash_length)
669{
Thomas Daubney45c85862024-01-25 16:48:09 +0000670#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
671 MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_length);
672#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100673 psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length);
Thomas Daubney45c85862024-01-25 16:48:09 +0000674#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
675 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_length);
676#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100677 return status;
678}
679
680/* Wrapper for psa_import_key */
681psa_status_t mbedtls_test_wrap_psa_import_key(
682 const psa_key_attributes_t *arg0_attributes,
683 const uint8_t *arg1_data,
684 size_t arg2_data_length,
685 mbedtls_svc_key_id_t *arg3_key)
686{
Ryan Everett77b91e32024-01-25 10:58:06 +0000687#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
688 MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_length);
689#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100690 psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key);
Ryan Everett77b91e32024-01-25 10:58:06 +0000691#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
692 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_length);
693#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100694 return status;
695}
696
697/* Wrapper for psa_key_derivation_abort */
698psa_status_t mbedtls_test_wrap_psa_key_derivation_abort(
699 psa_key_derivation_operation_t *arg0_operation)
700{
701 psa_status_t status = (psa_key_derivation_abort)(arg0_operation);
702 return status;
703}
704
705/* Wrapper for psa_key_derivation_get_capacity */
706psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity(
707 const psa_key_derivation_operation_t *arg0_operation,
708 size_t *arg1_capacity)
709{
710 psa_status_t status = (psa_key_derivation_get_capacity)(arg0_operation, arg1_capacity);
711 return status;
712}
713
714/* Wrapper for psa_key_derivation_input_bytes */
715psa_status_t mbedtls_test_wrap_psa_key_derivation_input_bytes(
716 psa_key_derivation_operation_t *arg0_operation,
717 psa_key_derivation_step_t arg1_step,
718 const uint8_t *arg2_data,
719 size_t arg3_data_length)
720{
Ryan Everett198a4d92024-01-25 11:44:56 +0000721#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
722 MBEDTLS_TEST_MEMORY_POISON(arg2_data, arg3_data_length);
723#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100724 psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length);
Ryan Everett198a4d92024-01-25 11:44:56 +0000725#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
726 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_data, arg3_data_length);
727#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100728 return status;
729}
730
731/* Wrapper for psa_key_derivation_input_integer */
732psa_status_t mbedtls_test_wrap_psa_key_derivation_input_integer(
733 psa_key_derivation_operation_t *arg0_operation,
734 psa_key_derivation_step_t arg1_step,
735 uint64_t arg2_value)
736{
737 psa_status_t status = (psa_key_derivation_input_integer)(arg0_operation, arg1_step, arg2_value);
738 return status;
739}
740
741/* Wrapper for psa_key_derivation_input_key */
742psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key(
743 psa_key_derivation_operation_t *arg0_operation,
744 psa_key_derivation_step_t arg1_step,
745 mbedtls_svc_key_id_t arg2_key)
746{
747 psa_status_t status = (psa_key_derivation_input_key)(arg0_operation, arg1_step, arg2_key);
748 return status;
749}
750
751/* Wrapper for psa_key_derivation_key_agreement */
752psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement(
753 psa_key_derivation_operation_t *arg0_operation,
754 psa_key_derivation_step_t arg1_step,
755 mbedtls_svc_key_id_t arg2_private_key,
756 const uint8_t *arg3_peer_key,
757 size_t arg4_peer_key_length)
758{
759 psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length);
760 return status;
761}
762
763/* Wrapper for psa_key_derivation_output_bytes */
764psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes(
765 psa_key_derivation_operation_t *arg0_operation,
766 uint8_t *arg1_output,
767 size_t arg2_output_length)
768{
Ryan Everett198a4d92024-01-25 11:44:56 +0000769#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
770 MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_length);
771#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100772 psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length);
Ryan Everett198a4d92024-01-25 11:44:56 +0000773#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
774 MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_length);
775#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100776 return status;
777}
778
779/* Wrapper for psa_key_derivation_output_key */
780psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key(
781 const psa_key_attributes_t *arg0_attributes,
782 psa_key_derivation_operation_t *arg1_operation,
783 mbedtls_svc_key_id_t *arg2_key)
784{
785 psa_status_t status = (psa_key_derivation_output_key)(arg0_attributes, arg1_operation, arg2_key);
786 return status;
787}
788
789/* Wrapper for psa_key_derivation_set_capacity */
790psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity(
791 psa_key_derivation_operation_t *arg0_operation,
792 size_t arg1_capacity)
793{
794 psa_status_t status = (psa_key_derivation_set_capacity)(arg0_operation, arg1_capacity);
795 return status;
796}
797
798/* Wrapper for psa_key_derivation_setup */
799psa_status_t mbedtls_test_wrap_psa_key_derivation_setup(
800 psa_key_derivation_operation_t *arg0_operation,
801 psa_algorithm_t arg1_alg)
802{
803 psa_status_t status = (psa_key_derivation_setup)(arg0_operation, arg1_alg);
804 return status;
805}
806
807/* Wrapper for psa_mac_abort */
808psa_status_t mbedtls_test_wrap_psa_mac_abort(
809 psa_mac_operation_t *arg0_operation)
810{
811 psa_status_t status = (psa_mac_abort)(arg0_operation);
812 return status;
813}
814
815/* Wrapper for psa_mac_compute */
816psa_status_t mbedtls_test_wrap_psa_mac_compute(
817 mbedtls_svc_key_id_t arg0_key,
818 psa_algorithm_t arg1_alg,
819 const uint8_t *arg2_input,
820 size_t arg3_input_length,
821 uint8_t *arg4_mac,
822 size_t arg5_mac_size,
823 size_t *arg6_mac_length)
824{
825 psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length);
826 return status;
827}
828
829/* Wrapper for psa_mac_sign_finish */
830psa_status_t mbedtls_test_wrap_psa_mac_sign_finish(
831 psa_mac_operation_t *arg0_operation,
832 uint8_t *arg1_mac,
833 size_t arg2_mac_size,
834 size_t *arg3_mac_length)
835{
836 psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length);
837 return status;
838}
839
840/* Wrapper for psa_mac_sign_setup */
841psa_status_t mbedtls_test_wrap_psa_mac_sign_setup(
842 psa_mac_operation_t *arg0_operation,
843 mbedtls_svc_key_id_t arg1_key,
844 psa_algorithm_t arg2_alg)
845{
846 psa_status_t status = (psa_mac_sign_setup)(arg0_operation, arg1_key, arg2_alg);
847 return status;
848}
849
850/* Wrapper for psa_mac_update */
851psa_status_t mbedtls_test_wrap_psa_mac_update(
852 psa_mac_operation_t *arg0_operation,
853 const uint8_t *arg1_input,
854 size_t arg2_input_length)
855{
856 psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length);
857 return status;
858}
859
860/* Wrapper for psa_mac_verify */
861psa_status_t mbedtls_test_wrap_psa_mac_verify(
862 mbedtls_svc_key_id_t arg0_key,
863 psa_algorithm_t arg1_alg,
864 const uint8_t *arg2_input,
865 size_t arg3_input_length,
866 const uint8_t *arg4_mac,
867 size_t arg5_mac_length)
868{
869 psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length);
870 return status;
871}
872
873/* Wrapper for psa_mac_verify_finish */
874psa_status_t mbedtls_test_wrap_psa_mac_verify_finish(
875 psa_mac_operation_t *arg0_operation,
876 const uint8_t *arg1_mac,
877 size_t arg2_mac_length)
878{
879 psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length);
880 return status;
881}
882
883/* Wrapper for psa_mac_verify_setup */
884psa_status_t mbedtls_test_wrap_psa_mac_verify_setup(
885 psa_mac_operation_t *arg0_operation,
886 mbedtls_svc_key_id_t arg1_key,
887 psa_algorithm_t arg2_alg)
888{
889 psa_status_t status = (psa_mac_verify_setup)(arg0_operation, arg1_key, arg2_alg);
890 return status;
891}
892
893/* Wrapper for psa_pake_abort */
894psa_status_t mbedtls_test_wrap_psa_pake_abort(
895 psa_pake_operation_t *arg0_operation)
896{
897 psa_status_t status = (psa_pake_abort)(arg0_operation);
898 return status;
899}
900
901/* Wrapper for psa_pake_get_implicit_key */
902psa_status_t mbedtls_test_wrap_psa_pake_get_implicit_key(
903 psa_pake_operation_t *arg0_operation,
904 psa_key_derivation_operation_t *arg1_output)
905{
906 psa_status_t status = (psa_pake_get_implicit_key)(arg0_operation, arg1_output);
907 return status;
908}
909
910/* Wrapper for psa_pake_input */
911psa_status_t mbedtls_test_wrap_psa_pake_input(
912 psa_pake_operation_t *arg0_operation,
913 psa_pake_step_t arg1_step,
914 const uint8_t *arg2_input,
915 size_t arg3_input_length)
916{
917 psa_status_t status = (psa_pake_input)(arg0_operation, arg1_step, arg2_input, arg3_input_length);
918 return status;
919}
920
921/* Wrapper for psa_pake_output */
922psa_status_t mbedtls_test_wrap_psa_pake_output(
923 psa_pake_operation_t *arg0_operation,
924 psa_pake_step_t arg1_step,
925 uint8_t *arg2_output,
926 size_t arg3_output_size,
927 size_t *arg4_output_length)
928{
929 psa_status_t status = (psa_pake_output)(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length);
930 return status;
931}
932
933/* Wrapper for psa_pake_set_password_key */
934psa_status_t mbedtls_test_wrap_psa_pake_set_password_key(
935 psa_pake_operation_t *arg0_operation,
936 mbedtls_svc_key_id_t arg1_password)
937{
938 psa_status_t status = (psa_pake_set_password_key)(arg0_operation, arg1_password);
939 return status;
940}
941
942/* Wrapper for psa_pake_set_peer */
943psa_status_t mbedtls_test_wrap_psa_pake_set_peer(
944 psa_pake_operation_t *arg0_operation,
945 const uint8_t *arg1_peer_id,
946 size_t arg2_peer_id_len)
947{
948 psa_status_t status = (psa_pake_set_peer)(arg0_operation, arg1_peer_id, arg2_peer_id_len);
949 return status;
950}
951
952/* Wrapper for psa_pake_set_role */
953psa_status_t mbedtls_test_wrap_psa_pake_set_role(
954 psa_pake_operation_t *arg0_operation,
955 psa_pake_role_t arg1_role)
956{
957 psa_status_t status = (psa_pake_set_role)(arg0_operation, arg1_role);
958 return status;
959}
960
961/* Wrapper for psa_pake_set_user */
962psa_status_t mbedtls_test_wrap_psa_pake_set_user(
963 psa_pake_operation_t *arg0_operation,
964 const uint8_t *arg1_user_id,
965 size_t arg2_user_id_len)
966{
967 psa_status_t status = (psa_pake_set_user)(arg0_operation, arg1_user_id, arg2_user_id_len);
968 return status;
969}
970
971/* Wrapper for psa_pake_setup */
972psa_status_t mbedtls_test_wrap_psa_pake_setup(
973 psa_pake_operation_t *arg0_operation,
974 const psa_pake_cipher_suite_t *arg1_cipher_suite)
975{
976 psa_status_t status = (psa_pake_setup)(arg0_operation, arg1_cipher_suite);
977 return status;
978}
979
980/* Wrapper for psa_purge_key */
981psa_status_t mbedtls_test_wrap_psa_purge_key(
982 mbedtls_svc_key_id_t arg0_key)
983{
984 psa_status_t status = (psa_purge_key)(arg0_key);
985 return status;
986}
987
988/* Wrapper for psa_raw_key_agreement */
989psa_status_t mbedtls_test_wrap_psa_raw_key_agreement(
990 psa_algorithm_t arg0_alg,
991 mbedtls_svc_key_id_t arg1_private_key,
992 const uint8_t *arg2_peer_key,
993 size_t arg3_peer_key_length,
994 uint8_t *arg4_output,
995 size_t arg5_output_size,
996 size_t *arg6_output_length)
997{
998 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);
999 return status;
1000}
1001
1002/* Wrapper for psa_sign_hash */
1003psa_status_t mbedtls_test_wrap_psa_sign_hash(
1004 mbedtls_svc_key_id_t arg0_key,
1005 psa_algorithm_t arg1_alg,
1006 const uint8_t *arg2_hash,
1007 size_t arg3_hash_length,
1008 uint8_t *arg4_signature,
1009 size_t arg5_signature_size,
1010 size_t *arg6_signature_length)
1011{
Thomas Daubneyf430f472024-01-30 12:25:35 +00001012#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1013 MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
1014 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
1015#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001016 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 Daubneyf430f472024-01-30 12:25:35 +00001017#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1018 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
1019 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
1020#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001021 return status;
1022}
1023
1024/* Wrapper for psa_sign_hash_abort */
1025psa_status_t mbedtls_test_wrap_psa_sign_hash_abort(
1026 psa_sign_hash_interruptible_operation_t *arg0_operation)
1027{
1028 psa_status_t status = (psa_sign_hash_abort)(arg0_operation);
1029 return status;
1030}
1031
1032/* Wrapper for psa_sign_hash_complete */
1033psa_status_t mbedtls_test_wrap_psa_sign_hash_complete(
1034 psa_sign_hash_interruptible_operation_t *arg0_operation,
1035 uint8_t *arg1_signature,
1036 size_t arg2_signature_size,
1037 size_t *arg3_signature_length)
1038{
1039 psa_status_t status = (psa_sign_hash_complete)(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length);
1040 return status;
1041}
1042
1043/* Wrapper for psa_sign_hash_start */
1044psa_status_t mbedtls_test_wrap_psa_sign_hash_start(
1045 psa_sign_hash_interruptible_operation_t *arg0_operation,
1046 mbedtls_svc_key_id_t arg1_key,
1047 psa_algorithm_t arg2_alg,
1048 const uint8_t *arg3_hash,
1049 size_t arg4_hash_length)
1050{
1051 psa_status_t status = (psa_sign_hash_start)(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length);
1052 return status;
1053}
1054
1055/* Wrapper for psa_sign_message */
1056psa_status_t mbedtls_test_wrap_psa_sign_message(
1057 mbedtls_svc_key_id_t arg0_key,
1058 psa_algorithm_t arg1_alg,
1059 const uint8_t *arg2_input,
1060 size_t arg3_input_length,
1061 uint8_t *arg4_signature,
1062 size_t arg5_signature_size,
1063 size_t *arg6_signature_length)
1064{
Thomas Daubneyf430f472024-01-30 12:25:35 +00001065#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1066 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
1067 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
1068#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001069 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 Daubneyf430f472024-01-30 12:25:35 +00001070#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1071 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
1072 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
1073#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001074 return status;
1075}
1076
1077/* Wrapper for psa_verify_hash */
1078psa_status_t mbedtls_test_wrap_psa_verify_hash(
1079 mbedtls_svc_key_id_t arg0_key,
1080 psa_algorithm_t arg1_alg,
1081 const uint8_t *arg2_hash,
1082 size_t arg3_hash_length,
1083 const uint8_t *arg4_signature,
1084 size_t arg5_signature_length)
1085{
Thomas Daubneyf430f472024-01-30 12:25:35 +00001086#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1087 MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
1088 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
1089#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001090 psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length);
Thomas Daubneyf430f472024-01-30 12:25:35 +00001091#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1092 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
1093 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
1094#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001095 return status;
1096}
1097
1098/* Wrapper for psa_verify_hash_abort */
1099psa_status_t mbedtls_test_wrap_psa_verify_hash_abort(
1100 psa_verify_hash_interruptible_operation_t *arg0_operation)
1101{
1102 psa_status_t status = (psa_verify_hash_abort)(arg0_operation);
1103 return status;
1104}
1105
1106/* Wrapper for psa_verify_hash_complete */
1107psa_status_t mbedtls_test_wrap_psa_verify_hash_complete(
1108 psa_verify_hash_interruptible_operation_t *arg0_operation)
1109{
1110 psa_status_t status = (psa_verify_hash_complete)(arg0_operation);
1111 return status;
1112}
1113
1114/* Wrapper for psa_verify_hash_start */
1115psa_status_t mbedtls_test_wrap_psa_verify_hash_start(
1116 psa_verify_hash_interruptible_operation_t *arg0_operation,
1117 mbedtls_svc_key_id_t arg1_key,
1118 psa_algorithm_t arg2_alg,
1119 const uint8_t *arg3_hash,
1120 size_t arg4_hash_length,
1121 const uint8_t *arg5_signature,
1122 size_t arg6_signature_length)
1123{
1124 psa_status_t status = (psa_verify_hash_start)(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length);
1125 return status;
1126}
1127
1128/* Wrapper for psa_verify_message */
1129psa_status_t mbedtls_test_wrap_psa_verify_message(
1130 mbedtls_svc_key_id_t arg0_key,
1131 psa_algorithm_t arg1_alg,
1132 const uint8_t *arg2_input,
1133 size_t arg3_input_length,
1134 const uint8_t *arg4_signature,
1135 size_t arg5_signature_length)
1136{
Thomas Daubneyf430f472024-01-30 12:25:35 +00001137#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1138 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
1139 MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
1140#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001141 psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length);
Thomas Daubneyf430f472024-01-30 12:25:35 +00001142#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
1143 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
1144 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
1145#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001146 return status;
1147}
1148
Gilles Peskine4411c9c2024-01-04 20:51:38 +01001149#endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
1150 !defined(RECORD_PSA_STATUS_COVERAGE_LOG) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +01001151
1152/* End of automatically generated file. */