blob: b6815c1f6a62727fb96ca15eb0d6d9b6c4d57384 [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{
127 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);
128 return status;
129}
130
131/* Wrapper for psa_asymmetric_encrypt */
132psa_status_t mbedtls_test_wrap_psa_asymmetric_encrypt(
133 mbedtls_svc_key_id_t arg0_key,
134 psa_algorithm_t arg1_alg,
135 const uint8_t *arg2_input,
136 size_t arg3_input_length,
137 const uint8_t *arg4_salt,
138 size_t arg5_salt_length,
139 uint8_t *arg6_output,
140 size_t arg7_output_size,
141 size_t *arg8_output_length)
142{
143 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);
144 return status;
145}
146
147/* Wrapper for psa_cipher_abort */
148psa_status_t mbedtls_test_wrap_psa_cipher_abort(
149 psa_cipher_operation_t *arg0_operation)
150{
151 psa_status_t status = (psa_cipher_abort)(arg0_operation);
152 return status;
153}
154
155/* Wrapper for psa_cipher_decrypt */
156psa_status_t mbedtls_test_wrap_psa_cipher_decrypt(
157 mbedtls_svc_key_id_t arg0_key,
158 psa_algorithm_t arg1_alg,
159 const uint8_t *arg2_input,
160 size_t arg3_input_length,
161 uint8_t *arg4_output,
162 size_t arg5_output_size,
163 size_t *arg6_output_length)
164{
165 psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
166 return status;
167}
168
169/* Wrapper for psa_cipher_decrypt_setup */
170psa_status_t mbedtls_test_wrap_psa_cipher_decrypt_setup(
171 psa_cipher_operation_t *arg0_operation,
172 mbedtls_svc_key_id_t arg1_key,
173 psa_algorithm_t arg2_alg)
174{
175 psa_status_t status = (psa_cipher_decrypt_setup)(arg0_operation, arg1_key, arg2_alg);
176 return status;
177}
178
179/* Wrapper for psa_cipher_encrypt */
180psa_status_t mbedtls_test_wrap_psa_cipher_encrypt(
181 mbedtls_svc_key_id_t arg0_key,
182 psa_algorithm_t arg1_alg,
183 const uint8_t *arg2_input,
184 size_t arg3_input_length,
185 uint8_t *arg4_output,
186 size_t arg5_output_size,
187 size_t *arg6_output_length)
188{
Gilles Peskineb3d457c2024-01-04 20:33:29 +0100189#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
Gilles Peskine42fa8ea2024-01-04 16:59:28 +0100190 MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
191 MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
Gilles Peskineb3d457c2024-01-04 20:33:29 +0100192#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100193 psa_status_t status = (psa_cipher_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
Gilles Peskineb3d457c2024-01-04 20:33:29 +0100194#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS)
Gilles Peskine42fa8ea2024-01-04 16:59:28 +0100195 MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
196 MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
Gilles Peskineb3d457c2024-01-04 20:33:29 +0100197#endif /* defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100198 return status;
199}
200
201/* Wrapper for psa_cipher_encrypt_setup */
202psa_status_t mbedtls_test_wrap_psa_cipher_encrypt_setup(
203 psa_cipher_operation_t *arg0_operation,
204 mbedtls_svc_key_id_t arg1_key,
205 psa_algorithm_t arg2_alg)
206{
207 psa_status_t status = (psa_cipher_encrypt_setup)(arg0_operation, arg1_key, arg2_alg);
208 return status;
209}
210
211/* Wrapper for psa_cipher_finish */
212psa_status_t mbedtls_test_wrap_psa_cipher_finish(
213 psa_cipher_operation_t *arg0_operation,
214 uint8_t *arg1_output,
215 size_t arg2_output_size,
216 size_t *arg3_output_length)
217{
218 psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length);
219 return status;
220}
221
222/* Wrapper for psa_cipher_generate_iv */
223psa_status_t mbedtls_test_wrap_psa_cipher_generate_iv(
224 psa_cipher_operation_t *arg0_operation,
225 uint8_t *arg1_iv,
226 size_t arg2_iv_size,
227 size_t *arg3_iv_length)
228{
229 psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length);
230 return status;
231}
232
233/* Wrapper for psa_cipher_set_iv */
234psa_status_t mbedtls_test_wrap_psa_cipher_set_iv(
235 psa_cipher_operation_t *arg0_operation,
236 const uint8_t *arg1_iv,
237 size_t arg2_iv_length)
238{
239 psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length);
240 return status;
241}
242
243/* Wrapper for psa_cipher_update */
244psa_status_t mbedtls_test_wrap_psa_cipher_update(
245 psa_cipher_operation_t *arg0_operation,
246 const uint8_t *arg1_input,
247 size_t arg2_input_length,
248 uint8_t *arg3_output,
249 size_t arg4_output_size,
250 size_t *arg5_output_length)
251{
252 psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
253 return status;
254}
255
256/* Wrapper for psa_copy_key */
257psa_status_t mbedtls_test_wrap_psa_copy_key(
258 mbedtls_svc_key_id_t arg0_source_key,
259 const psa_key_attributes_t *arg1_attributes,
260 mbedtls_svc_key_id_t *arg2_target_key)
261{
262 psa_status_t status = (psa_copy_key)(arg0_source_key, arg1_attributes, arg2_target_key);
263 return status;
264}
265
266/* Wrapper for psa_crypto_init */
267psa_status_t mbedtls_test_wrap_psa_crypto_init(void)
268{
269 psa_status_t status = (psa_crypto_init)();
270 return status;
271}
272
273/* Wrapper for psa_destroy_key */
274psa_status_t mbedtls_test_wrap_psa_destroy_key(
275 mbedtls_svc_key_id_t arg0_key)
276{
277 psa_status_t status = (psa_destroy_key)(arg0_key);
278 return status;
279}
280
281/* Wrapper for psa_export_key */
282psa_status_t mbedtls_test_wrap_psa_export_key(
283 mbedtls_svc_key_id_t arg0_key,
284 uint8_t *arg1_data,
285 size_t arg2_data_size,
286 size_t *arg3_data_length)
287{
288 psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
289 return status;
290}
291
292/* Wrapper for psa_export_public_key */
293psa_status_t mbedtls_test_wrap_psa_export_public_key(
294 mbedtls_svc_key_id_t arg0_key,
295 uint8_t *arg1_data,
296 size_t arg2_data_size,
297 size_t *arg3_data_length)
298{
299 psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
300 return status;
301}
302
303/* Wrapper for psa_generate_key */
304psa_status_t mbedtls_test_wrap_psa_generate_key(
305 const psa_key_attributes_t *arg0_attributes,
306 mbedtls_svc_key_id_t *arg1_key)
307{
308 psa_status_t status = (psa_generate_key)(arg0_attributes, arg1_key);
309 return status;
310}
311
312/* Wrapper for psa_generate_random */
313psa_status_t mbedtls_test_wrap_psa_generate_random(
314 uint8_t *arg0_output,
315 size_t arg1_output_size)
316{
317 psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size);
318 return status;
319}
320
321/* Wrapper for psa_get_key_attributes */
322psa_status_t mbedtls_test_wrap_psa_get_key_attributes(
323 mbedtls_svc_key_id_t arg0_key,
324 psa_key_attributes_t *arg1_attributes)
325{
326 psa_status_t status = (psa_get_key_attributes)(arg0_key, arg1_attributes);
327 return status;
328}
329
330/* Wrapper for psa_hash_abort */
331psa_status_t mbedtls_test_wrap_psa_hash_abort(
332 psa_hash_operation_t *arg0_operation)
333{
334 psa_status_t status = (psa_hash_abort)(arg0_operation);
335 return status;
336}
337
338/* Wrapper for psa_hash_clone */
339psa_status_t mbedtls_test_wrap_psa_hash_clone(
340 const psa_hash_operation_t *arg0_source_operation,
341 psa_hash_operation_t *arg1_target_operation)
342{
343 psa_status_t status = (psa_hash_clone)(arg0_source_operation, arg1_target_operation);
344 return status;
345}
346
347/* Wrapper for psa_hash_compare */
348psa_status_t mbedtls_test_wrap_psa_hash_compare(
349 psa_algorithm_t arg0_alg,
350 const uint8_t *arg1_input,
351 size_t arg2_input_length,
352 const uint8_t *arg3_hash,
353 size_t arg4_hash_length)
354{
355 psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length);
356 return status;
357}
358
359/* Wrapper for psa_hash_compute */
360psa_status_t mbedtls_test_wrap_psa_hash_compute(
361 psa_algorithm_t arg0_alg,
362 const uint8_t *arg1_input,
363 size_t arg2_input_length,
364 uint8_t *arg3_hash,
365 size_t arg4_hash_size,
366 size_t *arg5_hash_length)
367{
368 psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length);
369 return status;
370}
371
372/* Wrapper for psa_hash_finish */
373psa_status_t mbedtls_test_wrap_psa_hash_finish(
374 psa_hash_operation_t *arg0_operation,
375 uint8_t *arg1_hash,
376 size_t arg2_hash_size,
377 size_t *arg3_hash_length)
378{
379 psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length);
380 return status;
381}
382
383/* Wrapper for psa_hash_setup */
384psa_status_t mbedtls_test_wrap_psa_hash_setup(
385 psa_hash_operation_t *arg0_operation,
386 psa_algorithm_t arg1_alg)
387{
388 psa_status_t status = (psa_hash_setup)(arg0_operation, arg1_alg);
389 return status;
390}
391
392/* Wrapper for psa_hash_update */
393psa_status_t mbedtls_test_wrap_psa_hash_update(
394 psa_hash_operation_t *arg0_operation,
395 const uint8_t *arg1_input,
396 size_t arg2_input_length)
397{
398 psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length);
399 return status;
400}
401
402/* Wrapper for psa_hash_verify */
403psa_status_t mbedtls_test_wrap_psa_hash_verify(
404 psa_hash_operation_t *arg0_operation,
405 const uint8_t *arg1_hash,
406 size_t arg2_hash_length)
407{
408 psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length);
409 return status;
410}
411
412/* Wrapper for psa_import_key */
413psa_status_t mbedtls_test_wrap_psa_import_key(
414 const psa_key_attributes_t *arg0_attributes,
415 const uint8_t *arg1_data,
416 size_t arg2_data_length,
417 mbedtls_svc_key_id_t *arg3_key)
418{
419 psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key);
420 return status;
421}
422
423/* Wrapper for psa_key_derivation_abort */
424psa_status_t mbedtls_test_wrap_psa_key_derivation_abort(
425 psa_key_derivation_operation_t *arg0_operation)
426{
427 psa_status_t status = (psa_key_derivation_abort)(arg0_operation);
428 return status;
429}
430
431/* Wrapper for psa_key_derivation_get_capacity */
432psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity(
433 const psa_key_derivation_operation_t *arg0_operation,
434 size_t *arg1_capacity)
435{
436 psa_status_t status = (psa_key_derivation_get_capacity)(arg0_operation, arg1_capacity);
437 return status;
438}
439
440/* Wrapper for psa_key_derivation_input_bytes */
441psa_status_t mbedtls_test_wrap_psa_key_derivation_input_bytes(
442 psa_key_derivation_operation_t *arg0_operation,
443 psa_key_derivation_step_t arg1_step,
444 const uint8_t *arg2_data,
445 size_t arg3_data_length)
446{
447 psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length);
448 return status;
449}
450
451/* Wrapper for psa_key_derivation_input_key */
452psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key(
453 psa_key_derivation_operation_t *arg0_operation,
454 psa_key_derivation_step_t arg1_step,
455 mbedtls_svc_key_id_t arg2_key)
456{
457 psa_status_t status = (psa_key_derivation_input_key)(arg0_operation, arg1_step, arg2_key);
458 return status;
459}
460
461/* Wrapper for psa_key_derivation_key_agreement */
462psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement(
463 psa_key_derivation_operation_t *arg0_operation,
464 psa_key_derivation_step_t arg1_step,
465 mbedtls_svc_key_id_t arg2_private_key,
466 const uint8_t *arg3_peer_key,
467 size_t arg4_peer_key_length)
468{
469 psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length);
470 return status;
471}
472
473/* Wrapper for psa_key_derivation_output_bytes */
474psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes(
475 psa_key_derivation_operation_t *arg0_operation,
476 uint8_t *arg1_output,
477 size_t arg2_output_length)
478{
479 psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length);
480 return status;
481}
482
483/* Wrapper for psa_key_derivation_output_key */
484psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key(
485 const psa_key_attributes_t *arg0_attributes,
486 psa_key_derivation_operation_t *arg1_operation,
487 mbedtls_svc_key_id_t *arg2_key)
488{
489 psa_status_t status = (psa_key_derivation_output_key)(arg0_attributes, arg1_operation, arg2_key);
490 return status;
491}
492
493/* Wrapper for psa_key_derivation_set_capacity */
494psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity(
495 psa_key_derivation_operation_t *arg0_operation,
496 size_t arg1_capacity)
497{
498 psa_status_t status = (psa_key_derivation_set_capacity)(arg0_operation, arg1_capacity);
499 return status;
500}
501
502/* Wrapper for psa_key_derivation_setup */
503psa_status_t mbedtls_test_wrap_psa_key_derivation_setup(
504 psa_key_derivation_operation_t *arg0_operation,
505 psa_algorithm_t arg1_alg)
506{
507 psa_status_t status = (psa_key_derivation_setup)(arg0_operation, arg1_alg);
508 return status;
509}
510
511/* Wrapper for psa_mac_abort */
512psa_status_t mbedtls_test_wrap_psa_mac_abort(
513 psa_mac_operation_t *arg0_operation)
514{
515 psa_status_t status = (psa_mac_abort)(arg0_operation);
516 return status;
517}
518
519/* Wrapper for psa_mac_compute */
520psa_status_t mbedtls_test_wrap_psa_mac_compute(
521 mbedtls_svc_key_id_t arg0_key,
522 psa_algorithm_t arg1_alg,
523 const uint8_t *arg2_input,
524 size_t arg3_input_length,
525 uint8_t *arg4_mac,
526 size_t arg5_mac_size,
527 size_t *arg6_mac_length)
528{
529 psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length);
530 return status;
531}
532
533/* Wrapper for psa_mac_sign_finish */
534psa_status_t mbedtls_test_wrap_psa_mac_sign_finish(
535 psa_mac_operation_t *arg0_operation,
536 uint8_t *arg1_mac,
537 size_t arg2_mac_size,
538 size_t *arg3_mac_length)
539{
540 psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length);
541 return status;
542}
543
544/* Wrapper for psa_mac_sign_setup */
545psa_status_t mbedtls_test_wrap_psa_mac_sign_setup(
546 psa_mac_operation_t *arg0_operation,
547 mbedtls_svc_key_id_t arg1_key,
548 psa_algorithm_t arg2_alg)
549{
550 psa_status_t status = (psa_mac_sign_setup)(arg0_operation, arg1_key, arg2_alg);
551 return status;
552}
553
554/* Wrapper for psa_mac_update */
555psa_status_t mbedtls_test_wrap_psa_mac_update(
556 psa_mac_operation_t *arg0_operation,
557 const uint8_t *arg1_input,
558 size_t arg2_input_length)
559{
560 psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length);
561 return status;
562}
563
564/* Wrapper for psa_mac_verify */
565psa_status_t mbedtls_test_wrap_psa_mac_verify(
566 mbedtls_svc_key_id_t arg0_key,
567 psa_algorithm_t arg1_alg,
568 const uint8_t *arg2_input,
569 size_t arg3_input_length,
570 const uint8_t *arg4_mac,
571 size_t arg5_mac_length)
572{
573 psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length);
574 return status;
575}
576
577/* Wrapper for psa_mac_verify_finish */
578psa_status_t mbedtls_test_wrap_psa_mac_verify_finish(
579 psa_mac_operation_t *arg0_operation,
580 const uint8_t *arg1_mac,
581 size_t arg2_mac_length)
582{
583 psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length);
584 return status;
585}
586
587/* Wrapper for psa_mac_verify_setup */
588psa_status_t mbedtls_test_wrap_psa_mac_verify_setup(
589 psa_mac_operation_t *arg0_operation,
590 mbedtls_svc_key_id_t arg1_key,
591 psa_algorithm_t arg2_alg)
592{
593 psa_status_t status = (psa_mac_verify_setup)(arg0_operation, arg1_key, arg2_alg);
594 return status;
595}
596
597/* Wrapper for psa_purge_key */
598psa_status_t mbedtls_test_wrap_psa_purge_key(
599 mbedtls_svc_key_id_t arg0_key)
600{
601 psa_status_t status = (psa_purge_key)(arg0_key);
602 return status;
603}
604
605/* Wrapper for psa_raw_key_agreement */
606psa_status_t mbedtls_test_wrap_psa_raw_key_agreement(
607 psa_algorithm_t arg0_alg,
608 mbedtls_svc_key_id_t arg1_private_key,
609 const uint8_t *arg2_peer_key,
610 size_t arg3_peer_key_length,
611 uint8_t *arg4_output,
612 size_t arg5_output_size,
613 size_t *arg6_output_length)
614{
615 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);
616 return status;
617}
618
619/* Wrapper for psa_sign_hash */
620psa_status_t mbedtls_test_wrap_psa_sign_hash(
621 mbedtls_svc_key_id_t arg0_key,
622 psa_algorithm_t arg1_alg,
623 const uint8_t *arg2_hash,
624 size_t arg3_hash_length,
625 uint8_t *arg4_signature,
626 size_t arg5_signature_size,
627 size_t *arg6_signature_length)
628{
629 psa_status_t status = (psa_sign_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length);
630 return status;
631}
632
633/* Wrapper for psa_sign_message */
634psa_status_t mbedtls_test_wrap_psa_sign_message(
635 mbedtls_svc_key_id_t arg0_key,
636 psa_algorithm_t arg1_alg,
637 const uint8_t *arg2_input,
638 size_t arg3_input_length,
639 uint8_t *arg4_signature,
640 size_t arg5_signature_size,
641 size_t *arg6_signature_length)
642{
643 psa_status_t status = (psa_sign_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length);
644 return status;
645}
646
647/* Wrapper for psa_verify_hash */
648psa_status_t mbedtls_test_wrap_psa_verify_hash(
649 mbedtls_svc_key_id_t arg0_key,
650 psa_algorithm_t arg1_alg,
651 const uint8_t *arg2_hash,
652 size_t arg3_hash_length,
653 const uint8_t *arg4_signature,
654 size_t arg5_signature_length)
655{
656 psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length);
657 return status;
658}
659
660/* Wrapper for psa_verify_message */
661psa_status_t mbedtls_test_wrap_psa_verify_message(
662 mbedtls_svc_key_id_t arg0_key,
663 psa_algorithm_t arg1_alg,
664 const uint8_t *arg2_input,
665 size_t arg3_input_length,
666 const uint8_t *arg4_signature,
667 size_t arg5_signature_length)
668{
669 psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length);
670 return status;
671}
672
Gilles Peskinea980aa02024-01-04 20:51:38 +0100673#endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
674 !defined(RECORD_PSA_STATUS_COVERAGE_LOG) */
Gilles Peskined5e5e6d2024-01-04 16:42:40 +0100675
676/* End of automatically generated file. */