blob: 86ead0a126c2d1b328755937d0289ba0c8401f82 [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#ifndef TEST_PSA_TEST_WRAPPERS_H
8#define TEST_PSA_TEST_WRAPPERS_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include <mbedtls/build_info.h>
15
Gilles Peskine4411c9c2024-01-04 20:51:38 +010016#if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
17 !defined(RECORD_PSA_STATUS_COVERAGE_LOG)
Gilles Peskine6e4332c2024-01-04 16:42:40 +010018
19#include <psa/crypto.h>
20
Gilles Peskine90d14d72024-01-04 16:59:28 +010021#include <test/memory.h>
Gilles Peskine6e4332c2024-01-04 16:42:40 +010022#include <test/psa_crypto_helpers.h>
23#include <test/psa_test_wrappers.h>
24
25#if defined(MBEDTLS_PSA_INJECT_ENTROPY)
26psa_status_t mbedtls_test_wrap_mbedtls_psa_inject_entropy(
27 const uint8_t *arg0_seed,
28 size_t arg1_seed_size);
29#define mbedtls_psa_inject_entropy(arg0_seed, arg1_seed_size) \
30 mbedtls_test_wrap_mbedtls_psa_inject_entropy(arg0_seed, arg1_seed_size)
31#endif /* defined(MBEDTLS_PSA_INJECT_ENTROPY) */
32
33#if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS)
34psa_status_t mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key(
35 mbedtls_svc_key_id_t arg0_key_id,
36 psa_key_lifetime_t *arg1_lifetime,
37 psa_drv_slot_number_t *arg2_slot_number);
38#define mbedtls_psa_platform_get_builtin_key(arg0_key_id, arg1_lifetime, arg2_slot_number) \
39 mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key(arg0_key_id, arg1_lifetime, arg2_slot_number)
40#endif /* defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) */
41
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#define mbedtls_psa_register_se_key(arg0_attributes) \
46 mbedtls_test_wrap_mbedtls_psa_register_se_key(arg0_attributes)
47#endif /* defined(MBEDTLS_PSA_CRYPTO_SE_C) */
48
49psa_status_t mbedtls_test_wrap_psa_aead_abort(
50 psa_aead_operation_t *arg0_operation);
51#define psa_aead_abort(arg0_operation) \
52 mbedtls_test_wrap_psa_aead_abort(arg0_operation)
53
54psa_status_t mbedtls_test_wrap_psa_aead_decrypt(
55 mbedtls_svc_key_id_t arg0_key,
56 psa_algorithm_t arg1_alg,
57 const uint8_t *arg2_nonce,
58 size_t arg3_nonce_length,
59 const uint8_t *arg4_additional_data,
60 size_t arg5_additional_data_length,
61 const uint8_t *arg6_ciphertext,
62 size_t arg7_ciphertext_length,
63 uint8_t *arg8_plaintext,
64 size_t arg9_plaintext_size,
65 size_t *arg10_plaintext_length);
66#define 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) \
67 mbedtls_test_wrap_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)
68
69psa_status_t mbedtls_test_wrap_psa_aead_decrypt_setup(
70 psa_aead_operation_t *arg0_operation,
71 mbedtls_svc_key_id_t arg1_key,
72 psa_algorithm_t arg2_alg);
73#define psa_aead_decrypt_setup(arg0_operation, arg1_key, arg2_alg) \
74 mbedtls_test_wrap_psa_aead_decrypt_setup(arg0_operation, arg1_key, arg2_alg)
75
76psa_status_t mbedtls_test_wrap_psa_aead_encrypt(
77 mbedtls_svc_key_id_t arg0_key,
78 psa_algorithm_t arg1_alg,
79 const uint8_t *arg2_nonce,
80 size_t arg3_nonce_length,
81 const uint8_t *arg4_additional_data,
82 size_t arg5_additional_data_length,
83 const uint8_t *arg6_plaintext,
84 size_t arg7_plaintext_length,
85 uint8_t *arg8_ciphertext,
86 size_t arg9_ciphertext_size,
87 size_t *arg10_ciphertext_length);
88#define 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) \
89 mbedtls_test_wrap_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)
90
91psa_status_t mbedtls_test_wrap_psa_aead_encrypt_setup(
92 psa_aead_operation_t *arg0_operation,
93 mbedtls_svc_key_id_t arg1_key,
94 psa_algorithm_t arg2_alg);
95#define psa_aead_encrypt_setup(arg0_operation, arg1_key, arg2_alg) \
96 mbedtls_test_wrap_psa_aead_encrypt_setup(arg0_operation, arg1_key, arg2_alg)
97
98psa_status_t mbedtls_test_wrap_psa_aead_finish(
99 psa_aead_operation_t *arg0_operation,
100 uint8_t *arg1_ciphertext,
101 size_t arg2_ciphertext_size,
102 size_t *arg3_ciphertext_length,
103 uint8_t *arg4_tag,
104 size_t arg5_tag_size,
105 size_t *arg6_tag_length);
106#define psa_aead_finish(arg0_operation, arg1_ciphertext, arg2_ciphertext_size, arg3_ciphertext_length, arg4_tag, arg5_tag_size, arg6_tag_length) \
107 mbedtls_test_wrap_psa_aead_finish(arg0_operation, arg1_ciphertext, arg2_ciphertext_size, arg3_ciphertext_length, arg4_tag, arg5_tag_size, arg6_tag_length)
108
109psa_status_t mbedtls_test_wrap_psa_aead_generate_nonce(
110 psa_aead_operation_t *arg0_operation,
111 uint8_t *arg1_nonce,
112 size_t arg2_nonce_size,
113 size_t *arg3_nonce_length);
114#define psa_aead_generate_nonce(arg0_operation, arg1_nonce, arg2_nonce_size, arg3_nonce_length) \
115 mbedtls_test_wrap_psa_aead_generate_nonce(arg0_operation, arg1_nonce, arg2_nonce_size, arg3_nonce_length)
116
117psa_status_t mbedtls_test_wrap_psa_aead_set_lengths(
118 psa_aead_operation_t *arg0_operation,
119 size_t arg1_ad_length,
120 size_t arg2_plaintext_length);
121#define psa_aead_set_lengths(arg0_operation, arg1_ad_length, arg2_plaintext_length) \
122 mbedtls_test_wrap_psa_aead_set_lengths(arg0_operation, arg1_ad_length, arg2_plaintext_length)
123
124psa_status_t mbedtls_test_wrap_psa_aead_set_nonce(
125 psa_aead_operation_t *arg0_operation,
126 const uint8_t *arg1_nonce,
127 size_t arg2_nonce_length);
128#define psa_aead_set_nonce(arg0_operation, arg1_nonce, arg2_nonce_length) \
129 mbedtls_test_wrap_psa_aead_set_nonce(arg0_operation, arg1_nonce, arg2_nonce_length)
130
131psa_status_t mbedtls_test_wrap_psa_aead_update(
132 psa_aead_operation_t *arg0_operation,
133 const uint8_t *arg1_input,
134 size_t arg2_input_length,
135 uint8_t *arg3_output,
136 size_t arg4_output_size,
137 size_t *arg5_output_length);
138#define psa_aead_update(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length) \
139 mbedtls_test_wrap_psa_aead_update(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length)
140
141psa_status_t mbedtls_test_wrap_psa_aead_update_ad(
142 psa_aead_operation_t *arg0_operation,
143 const uint8_t *arg1_input,
144 size_t arg2_input_length);
145#define psa_aead_update_ad(arg0_operation, arg1_input, arg2_input_length) \
146 mbedtls_test_wrap_psa_aead_update_ad(arg0_operation, arg1_input, arg2_input_length)
147
148psa_status_t mbedtls_test_wrap_psa_aead_verify(
149 psa_aead_operation_t *arg0_operation,
150 uint8_t *arg1_plaintext,
151 size_t arg2_plaintext_size,
152 size_t *arg3_plaintext_length,
153 const uint8_t *arg4_tag,
154 size_t arg5_tag_length);
155#define psa_aead_verify(arg0_operation, arg1_plaintext, arg2_plaintext_size, arg3_plaintext_length, arg4_tag, arg5_tag_length) \
156 mbedtls_test_wrap_psa_aead_verify(arg0_operation, arg1_plaintext, arg2_plaintext_size, arg3_plaintext_length, arg4_tag, arg5_tag_length)
157
158psa_status_t mbedtls_test_wrap_psa_asymmetric_decrypt(
159 mbedtls_svc_key_id_t arg0_key,
160 psa_algorithm_t arg1_alg,
161 const uint8_t *arg2_input,
162 size_t arg3_input_length,
163 const uint8_t *arg4_salt,
164 size_t arg5_salt_length,
165 uint8_t *arg6_output,
166 size_t arg7_output_size,
167 size_t *arg8_output_length);
168#define 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) \
169 mbedtls_test_wrap_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)
170
171psa_status_t mbedtls_test_wrap_psa_asymmetric_encrypt(
172 mbedtls_svc_key_id_t arg0_key,
173 psa_algorithm_t arg1_alg,
174 const uint8_t *arg2_input,
175 size_t arg3_input_length,
176 const uint8_t *arg4_salt,
177 size_t arg5_salt_length,
178 uint8_t *arg6_output,
179 size_t arg7_output_size,
180 size_t *arg8_output_length);
181#define 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) \
182 mbedtls_test_wrap_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)
183
184psa_status_t mbedtls_test_wrap_psa_cipher_abort(
185 psa_cipher_operation_t *arg0_operation);
186#define psa_cipher_abort(arg0_operation) \
187 mbedtls_test_wrap_psa_cipher_abort(arg0_operation)
188
189psa_status_t mbedtls_test_wrap_psa_cipher_decrypt(
190 mbedtls_svc_key_id_t arg0_key,
191 psa_algorithm_t arg1_alg,
192 const uint8_t *arg2_input,
193 size_t arg3_input_length,
194 uint8_t *arg4_output,
195 size_t arg5_output_size,
196 size_t *arg6_output_length);
197#define psa_cipher_decrypt(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length) \
198 mbedtls_test_wrap_psa_cipher_decrypt(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length)
199
200psa_status_t mbedtls_test_wrap_psa_cipher_decrypt_setup(
201 psa_cipher_operation_t *arg0_operation,
202 mbedtls_svc_key_id_t arg1_key,
203 psa_algorithm_t arg2_alg);
204#define psa_cipher_decrypt_setup(arg0_operation, arg1_key, arg2_alg) \
205 mbedtls_test_wrap_psa_cipher_decrypt_setup(arg0_operation, arg1_key, arg2_alg)
206
207psa_status_t mbedtls_test_wrap_psa_cipher_encrypt(
208 mbedtls_svc_key_id_t arg0_key,
209 psa_algorithm_t arg1_alg,
210 const uint8_t *arg2_input,
211 size_t arg3_input_length,
212 uint8_t *arg4_output,
213 size_t arg5_output_size,
214 size_t *arg6_output_length);
215#define psa_cipher_encrypt(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length) \
216 mbedtls_test_wrap_psa_cipher_encrypt(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length)
217
218psa_status_t mbedtls_test_wrap_psa_cipher_encrypt_setup(
219 psa_cipher_operation_t *arg0_operation,
220 mbedtls_svc_key_id_t arg1_key,
221 psa_algorithm_t arg2_alg);
222#define psa_cipher_encrypt_setup(arg0_operation, arg1_key, arg2_alg) \
223 mbedtls_test_wrap_psa_cipher_encrypt_setup(arg0_operation, arg1_key, arg2_alg)
224
225psa_status_t mbedtls_test_wrap_psa_cipher_finish(
226 psa_cipher_operation_t *arg0_operation,
227 uint8_t *arg1_output,
228 size_t arg2_output_size,
229 size_t *arg3_output_length);
230#define psa_cipher_finish(arg0_operation, arg1_output, arg2_output_size, arg3_output_length) \
231 mbedtls_test_wrap_psa_cipher_finish(arg0_operation, arg1_output, arg2_output_size, arg3_output_length)
232
233psa_status_t mbedtls_test_wrap_psa_cipher_generate_iv(
234 psa_cipher_operation_t *arg0_operation,
235 uint8_t *arg1_iv,
236 size_t arg2_iv_size,
237 size_t *arg3_iv_length);
238#define psa_cipher_generate_iv(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length) \
239 mbedtls_test_wrap_psa_cipher_generate_iv(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length)
240
241psa_status_t mbedtls_test_wrap_psa_cipher_set_iv(
242 psa_cipher_operation_t *arg0_operation,
243 const uint8_t *arg1_iv,
244 size_t arg2_iv_length);
245#define psa_cipher_set_iv(arg0_operation, arg1_iv, arg2_iv_length) \
246 mbedtls_test_wrap_psa_cipher_set_iv(arg0_operation, arg1_iv, arg2_iv_length)
247
248psa_status_t mbedtls_test_wrap_psa_cipher_update(
249 psa_cipher_operation_t *arg0_operation,
250 const uint8_t *arg1_input,
251 size_t arg2_input_length,
252 uint8_t *arg3_output,
253 size_t arg4_output_size,
254 size_t *arg5_output_length);
255#define psa_cipher_update(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length) \
256 mbedtls_test_wrap_psa_cipher_update(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length)
257
258psa_status_t mbedtls_test_wrap_psa_copy_key(
259 mbedtls_svc_key_id_t arg0_source_key,
260 const psa_key_attributes_t *arg1_attributes,
261 mbedtls_svc_key_id_t *arg2_target_key);
262#define psa_copy_key(arg0_source_key, arg1_attributes, arg2_target_key) \
263 mbedtls_test_wrap_psa_copy_key(arg0_source_key, arg1_attributes, arg2_target_key)
264
265psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_cipher_suite(
266 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
267 psa_pake_cipher_suite_t *arg1_cipher_suite);
268#define psa_crypto_driver_pake_get_cipher_suite(arg0_inputs, arg1_cipher_suite) \
269 mbedtls_test_wrap_psa_crypto_driver_pake_get_cipher_suite(arg0_inputs, arg1_cipher_suite)
270
271psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_password(
272 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
273 uint8_t *arg1_buffer,
274 size_t arg2_buffer_size,
275 size_t *arg3_buffer_length);
276#define psa_crypto_driver_pake_get_password(arg0_inputs, arg1_buffer, arg2_buffer_size, arg3_buffer_length) \
277 mbedtls_test_wrap_psa_crypto_driver_pake_get_password(arg0_inputs, arg1_buffer, arg2_buffer_size, arg3_buffer_length)
278
279psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_password_len(
280 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
281 size_t *arg1_password_len);
282#define psa_crypto_driver_pake_get_password_len(arg0_inputs, arg1_password_len) \
283 mbedtls_test_wrap_psa_crypto_driver_pake_get_password_len(arg0_inputs, arg1_password_len)
284
285psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_peer(
286 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
287 uint8_t *arg1_peer_id,
288 size_t arg2_peer_id_size,
289 size_t *arg3_peer_id_length);
290#define psa_crypto_driver_pake_get_peer(arg0_inputs, arg1_peer_id, arg2_peer_id_size, arg3_peer_id_length) \
291 mbedtls_test_wrap_psa_crypto_driver_pake_get_peer(arg0_inputs, arg1_peer_id, arg2_peer_id_size, arg3_peer_id_length)
292
293psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_peer_len(
294 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
295 size_t *arg1_peer_len);
296#define psa_crypto_driver_pake_get_peer_len(arg0_inputs, arg1_peer_len) \
297 mbedtls_test_wrap_psa_crypto_driver_pake_get_peer_len(arg0_inputs, arg1_peer_len)
298
299psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_user(
300 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
301 uint8_t *arg1_user_id,
302 size_t arg2_user_id_size,
303 size_t *arg3_user_id_len);
304#define psa_crypto_driver_pake_get_user(arg0_inputs, arg1_user_id, arg2_user_id_size, arg3_user_id_len) \
305 mbedtls_test_wrap_psa_crypto_driver_pake_get_user(arg0_inputs, arg1_user_id, arg2_user_id_size, arg3_user_id_len)
306
307psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_user_len(
308 const psa_crypto_driver_pake_inputs_t *arg0_inputs,
309 size_t *arg1_user_len);
310#define psa_crypto_driver_pake_get_user_len(arg0_inputs, arg1_user_len) \
311 mbedtls_test_wrap_psa_crypto_driver_pake_get_user_len(arg0_inputs, arg1_user_len)
312
313psa_status_t mbedtls_test_wrap_psa_crypto_init(void);
314#define psa_crypto_init() \
315 mbedtls_test_wrap_psa_crypto_init()
316
317psa_status_t mbedtls_test_wrap_psa_destroy_key(
318 mbedtls_svc_key_id_t arg0_key);
319#define psa_destroy_key(arg0_key) \
320 mbedtls_test_wrap_psa_destroy_key(arg0_key)
321
322psa_status_t mbedtls_test_wrap_psa_export_key(
323 mbedtls_svc_key_id_t arg0_key,
324 uint8_t *arg1_data,
325 size_t arg2_data_size,
326 size_t *arg3_data_length);
327#define psa_export_key(arg0_key, arg1_data, arg2_data_size, arg3_data_length) \
328 mbedtls_test_wrap_psa_export_key(arg0_key, arg1_data, arg2_data_size, arg3_data_length)
329
330psa_status_t mbedtls_test_wrap_psa_export_public_key(
331 mbedtls_svc_key_id_t arg0_key,
332 uint8_t *arg1_data,
333 size_t arg2_data_size,
334 size_t *arg3_data_length);
335#define psa_export_public_key(arg0_key, arg1_data, arg2_data_size, arg3_data_length) \
336 mbedtls_test_wrap_psa_export_public_key(arg0_key, arg1_data, arg2_data_size, arg3_data_length)
337
338psa_status_t mbedtls_test_wrap_psa_generate_key(
339 const psa_key_attributes_t *arg0_attributes,
340 mbedtls_svc_key_id_t *arg1_key);
341#define psa_generate_key(arg0_attributes, arg1_key) \
342 mbedtls_test_wrap_psa_generate_key(arg0_attributes, arg1_key)
343
344psa_status_t mbedtls_test_wrap_psa_generate_random(
345 uint8_t *arg0_output,
346 size_t arg1_output_size);
347#define psa_generate_random(arg0_output, arg1_output_size) \
348 mbedtls_test_wrap_psa_generate_random(arg0_output, arg1_output_size)
349
350psa_status_t mbedtls_test_wrap_psa_get_key_attributes(
351 mbedtls_svc_key_id_t arg0_key,
352 psa_key_attributes_t *arg1_attributes);
353#define psa_get_key_attributes(arg0_key, arg1_attributes) \
354 mbedtls_test_wrap_psa_get_key_attributes(arg0_key, arg1_attributes)
355
356psa_status_t mbedtls_test_wrap_psa_hash_abort(
357 psa_hash_operation_t *arg0_operation);
358#define psa_hash_abort(arg0_operation) \
359 mbedtls_test_wrap_psa_hash_abort(arg0_operation)
360
361psa_status_t mbedtls_test_wrap_psa_hash_clone(
362 const psa_hash_operation_t *arg0_source_operation,
363 psa_hash_operation_t *arg1_target_operation);
364#define psa_hash_clone(arg0_source_operation, arg1_target_operation) \
365 mbedtls_test_wrap_psa_hash_clone(arg0_source_operation, arg1_target_operation)
366
367psa_status_t mbedtls_test_wrap_psa_hash_compare(
368 psa_algorithm_t arg0_alg,
369 const uint8_t *arg1_input,
370 size_t arg2_input_length,
371 const uint8_t *arg3_hash,
372 size_t arg4_hash_length);
373#define psa_hash_compare(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length) \
374 mbedtls_test_wrap_psa_hash_compare(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length)
375
376psa_status_t mbedtls_test_wrap_psa_hash_compute(
377 psa_algorithm_t arg0_alg,
378 const uint8_t *arg1_input,
379 size_t arg2_input_length,
380 uint8_t *arg3_hash,
381 size_t arg4_hash_size,
382 size_t *arg5_hash_length);
383#define psa_hash_compute(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length) \
384 mbedtls_test_wrap_psa_hash_compute(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length)
385
386psa_status_t mbedtls_test_wrap_psa_hash_finish(
387 psa_hash_operation_t *arg0_operation,
388 uint8_t *arg1_hash,
389 size_t arg2_hash_size,
390 size_t *arg3_hash_length);
391#define psa_hash_finish(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length) \
392 mbedtls_test_wrap_psa_hash_finish(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length)
393
394psa_status_t mbedtls_test_wrap_psa_hash_setup(
395 psa_hash_operation_t *arg0_operation,
396 psa_algorithm_t arg1_alg);
397#define psa_hash_setup(arg0_operation, arg1_alg) \
398 mbedtls_test_wrap_psa_hash_setup(arg0_operation, arg1_alg)
399
400psa_status_t mbedtls_test_wrap_psa_hash_update(
401 psa_hash_operation_t *arg0_operation,
402 const uint8_t *arg1_input,
403 size_t arg2_input_length);
404#define psa_hash_update(arg0_operation, arg1_input, arg2_input_length) \
405 mbedtls_test_wrap_psa_hash_update(arg0_operation, arg1_input, arg2_input_length)
406
407psa_status_t mbedtls_test_wrap_psa_hash_verify(
408 psa_hash_operation_t *arg0_operation,
409 const uint8_t *arg1_hash,
410 size_t arg2_hash_length);
411#define psa_hash_verify(arg0_operation, arg1_hash, arg2_hash_length) \
412 mbedtls_test_wrap_psa_hash_verify(arg0_operation, arg1_hash, arg2_hash_length)
413
414psa_status_t mbedtls_test_wrap_psa_import_key(
415 const psa_key_attributes_t *arg0_attributes,
416 const uint8_t *arg1_data,
417 size_t arg2_data_length,
418 mbedtls_svc_key_id_t *arg3_key);
419#define psa_import_key(arg0_attributes, arg1_data, arg2_data_length, arg3_key) \
420 mbedtls_test_wrap_psa_import_key(arg0_attributes, arg1_data, arg2_data_length, arg3_key)
421
422psa_status_t mbedtls_test_wrap_psa_key_derivation_abort(
423 psa_key_derivation_operation_t *arg0_operation);
424#define psa_key_derivation_abort(arg0_operation) \
425 mbedtls_test_wrap_psa_key_derivation_abort(arg0_operation)
426
427psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity(
428 const psa_key_derivation_operation_t *arg0_operation,
429 size_t *arg1_capacity);
430#define psa_key_derivation_get_capacity(arg0_operation, arg1_capacity) \
431 mbedtls_test_wrap_psa_key_derivation_get_capacity(arg0_operation, arg1_capacity)
432
433psa_status_t mbedtls_test_wrap_psa_key_derivation_input_bytes(
434 psa_key_derivation_operation_t *arg0_operation,
435 psa_key_derivation_step_t arg1_step,
436 const uint8_t *arg2_data,
437 size_t arg3_data_length);
438#define psa_key_derivation_input_bytes(arg0_operation, arg1_step, arg2_data, arg3_data_length) \
439 mbedtls_test_wrap_psa_key_derivation_input_bytes(arg0_operation, arg1_step, arg2_data, arg3_data_length)
440
441psa_status_t mbedtls_test_wrap_psa_key_derivation_input_integer(
442 psa_key_derivation_operation_t *arg0_operation,
443 psa_key_derivation_step_t arg1_step,
444 uint64_t arg2_value);
445#define psa_key_derivation_input_integer(arg0_operation, arg1_step, arg2_value) \
446 mbedtls_test_wrap_psa_key_derivation_input_integer(arg0_operation, arg1_step, arg2_value)
447
448psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key(
449 psa_key_derivation_operation_t *arg0_operation,
450 psa_key_derivation_step_t arg1_step,
451 mbedtls_svc_key_id_t arg2_key);
452#define psa_key_derivation_input_key(arg0_operation, arg1_step, arg2_key) \
453 mbedtls_test_wrap_psa_key_derivation_input_key(arg0_operation, arg1_step, arg2_key)
454
455psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement(
456 psa_key_derivation_operation_t *arg0_operation,
457 psa_key_derivation_step_t arg1_step,
458 mbedtls_svc_key_id_t arg2_private_key,
459 const uint8_t *arg3_peer_key,
460 size_t arg4_peer_key_length);
461#define psa_key_derivation_key_agreement(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length) \
462 mbedtls_test_wrap_psa_key_derivation_key_agreement(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length)
463
464psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes(
465 psa_key_derivation_operation_t *arg0_operation,
466 uint8_t *arg1_output,
467 size_t arg2_output_length);
468#define psa_key_derivation_output_bytes(arg0_operation, arg1_output, arg2_output_length) \
469 mbedtls_test_wrap_psa_key_derivation_output_bytes(arg0_operation, arg1_output, arg2_output_length)
470
471psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key(
472 const psa_key_attributes_t *arg0_attributes,
473 psa_key_derivation_operation_t *arg1_operation,
474 mbedtls_svc_key_id_t *arg2_key);
475#define psa_key_derivation_output_key(arg0_attributes, arg1_operation, arg2_key) \
476 mbedtls_test_wrap_psa_key_derivation_output_key(arg0_attributes, arg1_operation, arg2_key)
477
478psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity(
479 psa_key_derivation_operation_t *arg0_operation,
480 size_t arg1_capacity);
481#define psa_key_derivation_set_capacity(arg0_operation, arg1_capacity) \
482 mbedtls_test_wrap_psa_key_derivation_set_capacity(arg0_operation, arg1_capacity)
483
484psa_status_t mbedtls_test_wrap_psa_key_derivation_setup(
485 psa_key_derivation_operation_t *arg0_operation,
486 psa_algorithm_t arg1_alg);
487#define psa_key_derivation_setup(arg0_operation, arg1_alg) \
488 mbedtls_test_wrap_psa_key_derivation_setup(arg0_operation, arg1_alg)
489
490psa_status_t mbedtls_test_wrap_psa_mac_abort(
491 psa_mac_operation_t *arg0_operation);
492#define psa_mac_abort(arg0_operation) \
493 mbedtls_test_wrap_psa_mac_abort(arg0_operation)
494
495psa_status_t mbedtls_test_wrap_psa_mac_compute(
496 mbedtls_svc_key_id_t arg0_key,
497 psa_algorithm_t arg1_alg,
498 const uint8_t *arg2_input,
499 size_t arg3_input_length,
500 uint8_t *arg4_mac,
501 size_t arg5_mac_size,
502 size_t *arg6_mac_length);
503#define psa_mac_compute(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length) \
504 mbedtls_test_wrap_psa_mac_compute(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length)
505
506psa_status_t mbedtls_test_wrap_psa_mac_sign_finish(
507 psa_mac_operation_t *arg0_operation,
508 uint8_t *arg1_mac,
509 size_t arg2_mac_size,
510 size_t *arg3_mac_length);
511#define psa_mac_sign_finish(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length) \
512 mbedtls_test_wrap_psa_mac_sign_finish(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length)
513
514psa_status_t mbedtls_test_wrap_psa_mac_sign_setup(
515 psa_mac_operation_t *arg0_operation,
516 mbedtls_svc_key_id_t arg1_key,
517 psa_algorithm_t arg2_alg);
518#define psa_mac_sign_setup(arg0_operation, arg1_key, arg2_alg) \
519 mbedtls_test_wrap_psa_mac_sign_setup(arg0_operation, arg1_key, arg2_alg)
520
521psa_status_t mbedtls_test_wrap_psa_mac_update(
522 psa_mac_operation_t *arg0_operation,
523 const uint8_t *arg1_input,
524 size_t arg2_input_length);
525#define psa_mac_update(arg0_operation, arg1_input, arg2_input_length) \
526 mbedtls_test_wrap_psa_mac_update(arg0_operation, arg1_input, arg2_input_length)
527
528psa_status_t mbedtls_test_wrap_psa_mac_verify(
529 mbedtls_svc_key_id_t arg0_key,
530 psa_algorithm_t arg1_alg,
531 const uint8_t *arg2_input,
532 size_t arg3_input_length,
533 const uint8_t *arg4_mac,
534 size_t arg5_mac_length);
535#define psa_mac_verify(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length) \
536 mbedtls_test_wrap_psa_mac_verify(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length)
537
538psa_status_t mbedtls_test_wrap_psa_mac_verify_finish(
539 psa_mac_operation_t *arg0_operation,
540 const uint8_t *arg1_mac,
541 size_t arg2_mac_length);
542#define psa_mac_verify_finish(arg0_operation, arg1_mac, arg2_mac_length) \
543 mbedtls_test_wrap_psa_mac_verify_finish(arg0_operation, arg1_mac, arg2_mac_length)
544
545psa_status_t mbedtls_test_wrap_psa_mac_verify_setup(
546 psa_mac_operation_t *arg0_operation,
547 mbedtls_svc_key_id_t arg1_key,
548 psa_algorithm_t arg2_alg);
549#define psa_mac_verify_setup(arg0_operation, arg1_key, arg2_alg) \
550 mbedtls_test_wrap_psa_mac_verify_setup(arg0_operation, arg1_key, arg2_alg)
551
552psa_status_t mbedtls_test_wrap_psa_pake_abort(
553 psa_pake_operation_t *arg0_operation);
554#define psa_pake_abort(arg0_operation) \
555 mbedtls_test_wrap_psa_pake_abort(arg0_operation)
556
557psa_status_t mbedtls_test_wrap_psa_pake_get_implicit_key(
558 psa_pake_operation_t *arg0_operation,
559 psa_key_derivation_operation_t *arg1_output);
560#define psa_pake_get_implicit_key(arg0_operation, arg1_output) \
561 mbedtls_test_wrap_psa_pake_get_implicit_key(arg0_operation, arg1_output)
562
563psa_status_t mbedtls_test_wrap_psa_pake_input(
564 psa_pake_operation_t *arg0_operation,
565 psa_pake_step_t arg1_step,
566 const uint8_t *arg2_input,
567 size_t arg3_input_length);
568#define psa_pake_input(arg0_operation, arg1_step, arg2_input, arg3_input_length) \
569 mbedtls_test_wrap_psa_pake_input(arg0_operation, arg1_step, arg2_input, arg3_input_length)
570
571psa_status_t mbedtls_test_wrap_psa_pake_output(
572 psa_pake_operation_t *arg0_operation,
573 psa_pake_step_t arg1_step,
574 uint8_t *arg2_output,
575 size_t arg3_output_size,
576 size_t *arg4_output_length);
577#define psa_pake_output(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length) \
578 mbedtls_test_wrap_psa_pake_output(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length)
579
580psa_status_t mbedtls_test_wrap_psa_pake_set_password_key(
581 psa_pake_operation_t *arg0_operation,
582 mbedtls_svc_key_id_t arg1_password);
583#define psa_pake_set_password_key(arg0_operation, arg1_password) \
584 mbedtls_test_wrap_psa_pake_set_password_key(arg0_operation, arg1_password)
585
586psa_status_t mbedtls_test_wrap_psa_pake_set_peer(
587 psa_pake_operation_t *arg0_operation,
588 const uint8_t *arg1_peer_id,
589 size_t arg2_peer_id_len);
590#define psa_pake_set_peer(arg0_operation, arg1_peer_id, arg2_peer_id_len) \
591 mbedtls_test_wrap_psa_pake_set_peer(arg0_operation, arg1_peer_id, arg2_peer_id_len)
592
593psa_status_t mbedtls_test_wrap_psa_pake_set_role(
594 psa_pake_operation_t *arg0_operation,
595 psa_pake_role_t arg1_role);
596#define psa_pake_set_role(arg0_operation, arg1_role) \
597 mbedtls_test_wrap_psa_pake_set_role(arg0_operation, arg1_role)
598
599psa_status_t mbedtls_test_wrap_psa_pake_set_user(
600 psa_pake_operation_t *arg0_operation,
601 const uint8_t *arg1_user_id,
602 size_t arg2_user_id_len);
603#define psa_pake_set_user(arg0_operation, arg1_user_id, arg2_user_id_len) \
604 mbedtls_test_wrap_psa_pake_set_user(arg0_operation, arg1_user_id, arg2_user_id_len)
605
606psa_status_t mbedtls_test_wrap_psa_pake_setup(
607 psa_pake_operation_t *arg0_operation,
608 const psa_pake_cipher_suite_t *arg1_cipher_suite);
609#define psa_pake_setup(arg0_operation, arg1_cipher_suite) \
610 mbedtls_test_wrap_psa_pake_setup(arg0_operation, arg1_cipher_suite)
611
612psa_status_t mbedtls_test_wrap_psa_purge_key(
613 mbedtls_svc_key_id_t arg0_key);
614#define psa_purge_key(arg0_key) \
615 mbedtls_test_wrap_psa_purge_key(arg0_key)
616
617psa_status_t mbedtls_test_wrap_psa_raw_key_agreement(
618 psa_algorithm_t arg0_alg,
619 mbedtls_svc_key_id_t arg1_private_key,
620 const uint8_t *arg2_peer_key,
621 size_t arg3_peer_key_length,
622 uint8_t *arg4_output,
623 size_t arg5_output_size,
624 size_t *arg6_output_length);
625#define psa_raw_key_agreement(arg0_alg, arg1_private_key, arg2_peer_key, arg3_peer_key_length, arg4_output, arg5_output_size, arg6_output_length) \
626 mbedtls_test_wrap_psa_raw_key_agreement(arg0_alg, arg1_private_key, arg2_peer_key, arg3_peer_key_length, arg4_output, arg5_output_size, arg6_output_length)
627
628psa_status_t mbedtls_test_wrap_psa_sign_hash(
629 mbedtls_svc_key_id_t arg0_key,
630 psa_algorithm_t arg1_alg,
631 const uint8_t *arg2_hash,
632 size_t arg3_hash_length,
633 uint8_t *arg4_signature,
634 size_t arg5_signature_size,
635 size_t *arg6_signature_length);
636#define psa_sign_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length) \
637 mbedtls_test_wrap_psa_sign_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length)
638
639psa_status_t mbedtls_test_wrap_psa_sign_hash_abort(
640 psa_sign_hash_interruptible_operation_t *arg0_operation);
641#define psa_sign_hash_abort(arg0_operation) \
642 mbedtls_test_wrap_psa_sign_hash_abort(arg0_operation)
643
644psa_status_t mbedtls_test_wrap_psa_sign_hash_complete(
645 psa_sign_hash_interruptible_operation_t *arg0_operation,
646 uint8_t *arg1_signature,
647 size_t arg2_signature_size,
648 size_t *arg3_signature_length);
649#define psa_sign_hash_complete(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length) \
650 mbedtls_test_wrap_psa_sign_hash_complete(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length)
651
652psa_status_t mbedtls_test_wrap_psa_sign_hash_start(
653 psa_sign_hash_interruptible_operation_t *arg0_operation,
654 mbedtls_svc_key_id_t arg1_key,
655 psa_algorithm_t arg2_alg,
656 const uint8_t *arg3_hash,
657 size_t arg4_hash_length);
658#define psa_sign_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length) \
659 mbedtls_test_wrap_psa_sign_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length)
660
661psa_status_t mbedtls_test_wrap_psa_sign_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 uint8_t *arg4_signature,
667 size_t arg5_signature_size,
668 size_t *arg6_signature_length);
669#define psa_sign_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length) \
670 mbedtls_test_wrap_psa_sign_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length)
671
672psa_status_t mbedtls_test_wrap_psa_verify_hash(
673 mbedtls_svc_key_id_t arg0_key,
674 psa_algorithm_t arg1_alg,
675 const uint8_t *arg2_hash,
676 size_t arg3_hash_length,
677 const uint8_t *arg4_signature,
678 size_t arg5_signature_length);
679#define psa_verify_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length) \
680 mbedtls_test_wrap_psa_verify_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length)
681
682psa_status_t mbedtls_test_wrap_psa_verify_hash_abort(
683 psa_verify_hash_interruptible_operation_t *arg0_operation);
684#define psa_verify_hash_abort(arg0_operation) \
685 mbedtls_test_wrap_psa_verify_hash_abort(arg0_operation)
686
687psa_status_t mbedtls_test_wrap_psa_verify_hash_complete(
688 psa_verify_hash_interruptible_operation_t *arg0_operation);
689#define psa_verify_hash_complete(arg0_operation) \
690 mbedtls_test_wrap_psa_verify_hash_complete(arg0_operation)
691
692psa_status_t mbedtls_test_wrap_psa_verify_hash_start(
693 psa_verify_hash_interruptible_operation_t *arg0_operation,
694 mbedtls_svc_key_id_t arg1_key,
695 psa_algorithm_t arg2_alg,
696 const uint8_t *arg3_hash,
697 size_t arg4_hash_length,
698 const uint8_t *arg5_signature,
699 size_t arg6_signature_length);
700#define psa_verify_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length) \
701 mbedtls_test_wrap_psa_verify_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length)
702
703psa_status_t mbedtls_test_wrap_psa_verify_message(
704 mbedtls_svc_key_id_t arg0_key,
705 psa_algorithm_t arg1_alg,
706 const uint8_t *arg2_input,
707 size_t arg3_input_length,
708 const uint8_t *arg4_signature,
709 size_t arg5_signature_length);
710#define psa_verify_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length) \
711 mbedtls_test_wrap_psa_verify_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length)
712
Gilles Peskine4411c9c2024-01-04 20:51:38 +0100713#endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
714 !defined(RECORD_PSA_STATUS_COVERAGE_LOG) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100715
716#ifdef __cplusplus
717}
718#endif
719
720#endif /* TEST_PSA_TEST_WRAPPERS_H */
721
722/* End of automatically generated file. */