blob: ecf926eb07431f5b7a085fd62bd06bdae11a44c5 [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
David Horstmann80a5dbd2024-03-12 17:02:48 +0000344psa_status_t mbedtls_test_wrap_psa_generate_key_ext(
345 const psa_key_attributes_t *arg0_attributes,
346 const psa_key_production_parameters_t *arg1_params,
347 size_t arg2_params_data_length,
348 mbedtls_svc_key_id_t *arg3_key);
349#define psa_generate_key_ext(arg0_attributes, arg1_params, arg2_params_data_length, arg3_key) \
350 mbedtls_test_wrap_psa_generate_key_ext(arg0_attributes, arg1_params, arg2_params_data_length, arg3_key)
351
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100352psa_status_t mbedtls_test_wrap_psa_generate_random(
353 uint8_t *arg0_output,
354 size_t arg1_output_size);
355#define psa_generate_random(arg0_output, arg1_output_size) \
356 mbedtls_test_wrap_psa_generate_random(arg0_output, arg1_output_size)
357
358psa_status_t mbedtls_test_wrap_psa_get_key_attributes(
359 mbedtls_svc_key_id_t arg0_key,
360 psa_key_attributes_t *arg1_attributes);
361#define psa_get_key_attributes(arg0_key, arg1_attributes) \
362 mbedtls_test_wrap_psa_get_key_attributes(arg0_key, arg1_attributes)
363
364psa_status_t mbedtls_test_wrap_psa_hash_abort(
365 psa_hash_operation_t *arg0_operation);
366#define psa_hash_abort(arg0_operation) \
367 mbedtls_test_wrap_psa_hash_abort(arg0_operation)
368
369psa_status_t mbedtls_test_wrap_psa_hash_clone(
370 const psa_hash_operation_t *arg0_source_operation,
371 psa_hash_operation_t *arg1_target_operation);
372#define psa_hash_clone(arg0_source_operation, arg1_target_operation) \
373 mbedtls_test_wrap_psa_hash_clone(arg0_source_operation, arg1_target_operation)
374
375psa_status_t mbedtls_test_wrap_psa_hash_compare(
376 psa_algorithm_t arg0_alg,
377 const uint8_t *arg1_input,
378 size_t arg2_input_length,
379 const uint8_t *arg3_hash,
380 size_t arg4_hash_length);
381#define psa_hash_compare(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length) \
382 mbedtls_test_wrap_psa_hash_compare(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length)
383
384psa_status_t mbedtls_test_wrap_psa_hash_compute(
385 psa_algorithm_t arg0_alg,
386 const uint8_t *arg1_input,
387 size_t arg2_input_length,
388 uint8_t *arg3_hash,
389 size_t arg4_hash_size,
390 size_t *arg5_hash_length);
391#define psa_hash_compute(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length) \
392 mbedtls_test_wrap_psa_hash_compute(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length)
393
394psa_status_t mbedtls_test_wrap_psa_hash_finish(
395 psa_hash_operation_t *arg0_operation,
396 uint8_t *arg1_hash,
397 size_t arg2_hash_size,
398 size_t *arg3_hash_length);
399#define psa_hash_finish(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length) \
400 mbedtls_test_wrap_psa_hash_finish(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length)
401
402psa_status_t mbedtls_test_wrap_psa_hash_setup(
403 psa_hash_operation_t *arg0_operation,
404 psa_algorithm_t arg1_alg);
405#define psa_hash_setup(arg0_operation, arg1_alg) \
406 mbedtls_test_wrap_psa_hash_setup(arg0_operation, arg1_alg)
407
408psa_status_t mbedtls_test_wrap_psa_hash_update(
409 psa_hash_operation_t *arg0_operation,
410 const uint8_t *arg1_input,
411 size_t arg2_input_length);
412#define psa_hash_update(arg0_operation, arg1_input, arg2_input_length) \
413 mbedtls_test_wrap_psa_hash_update(arg0_operation, arg1_input, arg2_input_length)
414
415psa_status_t mbedtls_test_wrap_psa_hash_verify(
416 psa_hash_operation_t *arg0_operation,
417 const uint8_t *arg1_hash,
418 size_t arg2_hash_length);
419#define psa_hash_verify(arg0_operation, arg1_hash, arg2_hash_length) \
420 mbedtls_test_wrap_psa_hash_verify(arg0_operation, arg1_hash, arg2_hash_length)
421
422psa_status_t mbedtls_test_wrap_psa_import_key(
423 const psa_key_attributes_t *arg0_attributes,
424 const uint8_t *arg1_data,
425 size_t arg2_data_length,
426 mbedtls_svc_key_id_t *arg3_key);
427#define psa_import_key(arg0_attributes, arg1_data, arg2_data_length, arg3_key) \
428 mbedtls_test_wrap_psa_import_key(arg0_attributes, arg1_data, arg2_data_length, arg3_key)
429
430psa_status_t mbedtls_test_wrap_psa_key_derivation_abort(
431 psa_key_derivation_operation_t *arg0_operation);
432#define psa_key_derivation_abort(arg0_operation) \
433 mbedtls_test_wrap_psa_key_derivation_abort(arg0_operation)
434
435psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity(
436 const psa_key_derivation_operation_t *arg0_operation,
437 size_t *arg1_capacity);
438#define psa_key_derivation_get_capacity(arg0_operation, arg1_capacity) \
439 mbedtls_test_wrap_psa_key_derivation_get_capacity(arg0_operation, arg1_capacity)
440
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#define psa_key_derivation_input_bytes(arg0_operation, arg1_step, arg2_data, arg3_data_length) \
447 mbedtls_test_wrap_psa_key_derivation_input_bytes(arg0_operation, arg1_step, arg2_data, arg3_data_length)
448
449psa_status_t mbedtls_test_wrap_psa_key_derivation_input_integer(
450 psa_key_derivation_operation_t *arg0_operation,
451 psa_key_derivation_step_t arg1_step,
452 uint64_t arg2_value);
453#define psa_key_derivation_input_integer(arg0_operation, arg1_step, arg2_value) \
454 mbedtls_test_wrap_psa_key_derivation_input_integer(arg0_operation, arg1_step, arg2_value)
455
456psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key(
457 psa_key_derivation_operation_t *arg0_operation,
458 psa_key_derivation_step_t arg1_step,
459 mbedtls_svc_key_id_t arg2_key);
460#define psa_key_derivation_input_key(arg0_operation, arg1_step, arg2_key) \
461 mbedtls_test_wrap_psa_key_derivation_input_key(arg0_operation, arg1_step, arg2_key)
462
463psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement(
464 psa_key_derivation_operation_t *arg0_operation,
465 psa_key_derivation_step_t arg1_step,
466 mbedtls_svc_key_id_t arg2_private_key,
467 const uint8_t *arg3_peer_key,
468 size_t arg4_peer_key_length);
469#define psa_key_derivation_key_agreement(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length) \
470 mbedtls_test_wrap_psa_key_derivation_key_agreement(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length)
471
472psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes(
473 psa_key_derivation_operation_t *arg0_operation,
474 uint8_t *arg1_output,
475 size_t arg2_output_length);
476#define psa_key_derivation_output_bytes(arg0_operation, arg1_output, arg2_output_length) \
477 mbedtls_test_wrap_psa_key_derivation_output_bytes(arg0_operation, arg1_output, arg2_output_length)
478
479psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key(
480 const psa_key_attributes_t *arg0_attributes,
481 psa_key_derivation_operation_t *arg1_operation,
482 mbedtls_svc_key_id_t *arg2_key);
483#define psa_key_derivation_output_key(arg0_attributes, arg1_operation, arg2_key) \
484 mbedtls_test_wrap_psa_key_derivation_output_key(arg0_attributes, arg1_operation, arg2_key)
485
David Horstmann80a5dbd2024-03-12 17:02:48 +0000486psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key_ext(
487 const psa_key_attributes_t *arg0_attributes,
488 psa_key_derivation_operation_t *arg1_operation,
489 const psa_key_production_parameters_t *arg2_params,
490 size_t arg3_params_data_length,
491 mbedtls_svc_key_id_t *arg4_key);
492#define psa_key_derivation_output_key_ext(arg0_attributes, arg1_operation, arg2_params, arg3_params_data_length, arg4_key) \
493 mbedtls_test_wrap_psa_key_derivation_output_key_ext(arg0_attributes, arg1_operation, arg2_params, arg3_params_data_length, arg4_key)
494
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100495psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity(
496 psa_key_derivation_operation_t *arg0_operation,
497 size_t arg1_capacity);
498#define psa_key_derivation_set_capacity(arg0_operation, arg1_capacity) \
499 mbedtls_test_wrap_psa_key_derivation_set_capacity(arg0_operation, arg1_capacity)
500
501psa_status_t mbedtls_test_wrap_psa_key_derivation_setup(
502 psa_key_derivation_operation_t *arg0_operation,
503 psa_algorithm_t arg1_alg);
504#define psa_key_derivation_setup(arg0_operation, arg1_alg) \
505 mbedtls_test_wrap_psa_key_derivation_setup(arg0_operation, arg1_alg)
506
507psa_status_t mbedtls_test_wrap_psa_mac_abort(
508 psa_mac_operation_t *arg0_operation);
509#define psa_mac_abort(arg0_operation) \
510 mbedtls_test_wrap_psa_mac_abort(arg0_operation)
511
512psa_status_t mbedtls_test_wrap_psa_mac_compute(
513 mbedtls_svc_key_id_t arg0_key,
514 psa_algorithm_t arg1_alg,
515 const uint8_t *arg2_input,
516 size_t arg3_input_length,
517 uint8_t *arg4_mac,
518 size_t arg5_mac_size,
519 size_t *arg6_mac_length);
520#define psa_mac_compute(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length) \
521 mbedtls_test_wrap_psa_mac_compute(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length)
522
523psa_status_t mbedtls_test_wrap_psa_mac_sign_finish(
524 psa_mac_operation_t *arg0_operation,
525 uint8_t *arg1_mac,
526 size_t arg2_mac_size,
527 size_t *arg3_mac_length);
528#define psa_mac_sign_finish(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length) \
529 mbedtls_test_wrap_psa_mac_sign_finish(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length)
530
531psa_status_t mbedtls_test_wrap_psa_mac_sign_setup(
532 psa_mac_operation_t *arg0_operation,
533 mbedtls_svc_key_id_t arg1_key,
534 psa_algorithm_t arg2_alg);
535#define psa_mac_sign_setup(arg0_operation, arg1_key, arg2_alg) \
536 mbedtls_test_wrap_psa_mac_sign_setup(arg0_operation, arg1_key, arg2_alg)
537
538psa_status_t mbedtls_test_wrap_psa_mac_update(
539 psa_mac_operation_t *arg0_operation,
540 const uint8_t *arg1_input,
541 size_t arg2_input_length);
542#define psa_mac_update(arg0_operation, arg1_input, arg2_input_length) \
543 mbedtls_test_wrap_psa_mac_update(arg0_operation, arg1_input, arg2_input_length)
544
545psa_status_t mbedtls_test_wrap_psa_mac_verify(
546 mbedtls_svc_key_id_t arg0_key,
547 psa_algorithm_t arg1_alg,
548 const uint8_t *arg2_input,
549 size_t arg3_input_length,
550 const uint8_t *arg4_mac,
551 size_t arg5_mac_length);
552#define psa_mac_verify(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length) \
553 mbedtls_test_wrap_psa_mac_verify(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length)
554
555psa_status_t mbedtls_test_wrap_psa_mac_verify_finish(
556 psa_mac_operation_t *arg0_operation,
557 const uint8_t *arg1_mac,
558 size_t arg2_mac_length);
559#define psa_mac_verify_finish(arg0_operation, arg1_mac, arg2_mac_length) \
560 mbedtls_test_wrap_psa_mac_verify_finish(arg0_operation, arg1_mac, arg2_mac_length)
561
562psa_status_t mbedtls_test_wrap_psa_mac_verify_setup(
563 psa_mac_operation_t *arg0_operation,
564 mbedtls_svc_key_id_t arg1_key,
565 psa_algorithm_t arg2_alg);
566#define psa_mac_verify_setup(arg0_operation, arg1_key, arg2_alg) \
567 mbedtls_test_wrap_psa_mac_verify_setup(arg0_operation, arg1_key, arg2_alg)
568
569psa_status_t mbedtls_test_wrap_psa_pake_abort(
570 psa_pake_operation_t *arg0_operation);
571#define psa_pake_abort(arg0_operation) \
572 mbedtls_test_wrap_psa_pake_abort(arg0_operation)
573
574psa_status_t mbedtls_test_wrap_psa_pake_get_implicit_key(
575 psa_pake_operation_t *arg0_operation,
576 psa_key_derivation_operation_t *arg1_output);
577#define psa_pake_get_implicit_key(arg0_operation, arg1_output) \
578 mbedtls_test_wrap_psa_pake_get_implicit_key(arg0_operation, arg1_output)
579
580psa_status_t mbedtls_test_wrap_psa_pake_input(
581 psa_pake_operation_t *arg0_operation,
582 psa_pake_step_t arg1_step,
583 const uint8_t *arg2_input,
584 size_t arg3_input_length);
585#define psa_pake_input(arg0_operation, arg1_step, arg2_input, arg3_input_length) \
586 mbedtls_test_wrap_psa_pake_input(arg0_operation, arg1_step, arg2_input, arg3_input_length)
587
588psa_status_t mbedtls_test_wrap_psa_pake_output(
589 psa_pake_operation_t *arg0_operation,
590 psa_pake_step_t arg1_step,
591 uint8_t *arg2_output,
592 size_t arg3_output_size,
593 size_t *arg4_output_length);
594#define psa_pake_output(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length) \
595 mbedtls_test_wrap_psa_pake_output(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length)
596
597psa_status_t mbedtls_test_wrap_psa_pake_set_password_key(
598 psa_pake_operation_t *arg0_operation,
599 mbedtls_svc_key_id_t arg1_password);
600#define psa_pake_set_password_key(arg0_operation, arg1_password) \
601 mbedtls_test_wrap_psa_pake_set_password_key(arg0_operation, arg1_password)
602
603psa_status_t mbedtls_test_wrap_psa_pake_set_peer(
604 psa_pake_operation_t *arg0_operation,
605 const uint8_t *arg1_peer_id,
606 size_t arg2_peer_id_len);
607#define psa_pake_set_peer(arg0_operation, arg1_peer_id, arg2_peer_id_len) \
608 mbedtls_test_wrap_psa_pake_set_peer(arg0_operation, arg1_peer_id, arg2_peer_id_len)
609
610psa_status_t mbedtls_test_wrap_psa_pake_set_role(
611 psa_pake_operation_t *arg0_operation,
612 psa_pake_role_t arg1_role);
613#define psa_pake_set_role(arg0_operation, arg1_role) \
614 mbedtls_test_wrap_psa_pake_set_role(arg0_operation, arg1_role)
615
616psa_status_t mbedtls_test_wrap_psa_pake_set_user(
617 psa_pake_operation_t *arg0_operation,
618 const uint8_t *arg1_user_id,
619 size_t arg2_user_id_len);
620#define psa_pake_set_user(arg0_operation, arg1_user_id, arg2_user_id_len) \
621 mbedtls_test_wrap_psa_pake_set_user(arg0_operation, arg1_user_id, arg2_user_id_len)
622
623psa_status_t mbedtls_test_wrap_psa_pake_setup(
624 psa_pake_operation_t *arg0_operation,
625 const psa_pake_cipher_suite_t *arg1_cipher_suite);
626#define psa_pake_setup(arg0_operation, arg1_cipher_suite) \
627 mbedtls_test_wrap_psa_pake_setup(arg0_operation, arg1_cipher_suite)
628
629psa_status_t mbedtls_test_wrap_psa_purge_key(
630 mbedtls_svc_key_id_t arg0_key);
631#define psa_purge_key(arg0_key) \
632 mbedtls_test_wrap_psa_purge_key(arg0_key)
633
634psa_status_t mbedtls_test_wrap_psa_raw_key_agreement(
635 psa_algorithm_t arg0_alg,
636 mbedtls_svc_key_id_t arg1_private_key,
637 const uint8_t *arg2_peer_key,
638 size_t arg3_peer_key_length,
639 uint8_t *arg4_output,
640 size_t arg5_output_size,
641 size_t *arg6_output_length);
642#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) \
643 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)
644
645psa_status_t mbedtls_test_wrap_psa_sign_hash(
646 mbedtls_svc_key_id_t arg0_key,
647 psa_algorithm_t arg1_alg,
648 const uint8_t *arg2_hash,
649 size_t arg3_hash_length,
650 uint8_t *arg4_signature,
651 size_t arg5_signature_size,
652 size_t *arg6_signature_length);
653#define psa_sign_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length) \
654 mbedtls_test_wrap_psa_sign_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length)
655
656psa_status_t mbedtls_test_wrap_psa_sign_hash_abort(
657 psa_sign_hash_interruptible_operation_t *arg0_operation);
658#define psa_sign_hash_abort(arg0_operation) \
659 mbedtls_test_wrap_psa_sign_hash_abort(arg0_operation)
660
661psa_status_t mbedtls_test_wrap_psa_sign_hash_complete(
662 psa_sign_hash_interruptible_operation_t *arg0_operation,
663 uint8_t *arg1_signature,
664 size_t arg2_signature_size,
665 size_t *arg3_signature_length);
666#define psa_sign_hash_complete(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length) \
667 mbedtls_test_wrap_psa_sign_hash_complete(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length)
668
669psa_status_t mbedtls_test_wrap_psa_sign_hash_start(
670 psa_sign_hash_interruptible_operation_t *arg0_operation,
671 mbedtls_svc_key_id_t arg1_key,
672 psa_algorithm_t arg2_alg,
673 const uint8_t *arg3_hash,
674 size_t arg4_hash_length);
675#define psa_sign_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length) \
676 mbedtls_test_wrap_psa_sign_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length)
677
678psa_status_t mbedtls_test_wrap_psa_sign_message(
679 mbedtls_svc_key_id_t arg0_key,
680 psa_algorithm_t arg1_alg,
681 const uint8_t *arg2_input,
682 size_t arg3_input_length,
683 uint8_t *arg4_signature,
684 size_t arg5_signature_size,
685 size_t *arg6_signature_length);
686#define psa_sign_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length) \
687 mbedtls_test_wrap_psa_sign_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length)
688
689psa_status_t mbedtls_test_wrap_psa_verify_hash(
690 mbedtls_svc_key_id_t arg0_key,
691 psa_algorithm_t arg1_alg,
692 const uint8_t *arg2_hash,
693 size_t arg3_hash_length,
694 const uint8_t *arg4_signature,
695 size_t arg5_signature_length);
696#define psa_verify_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length) \
697 mbedtls_test_wrap_psa_verify_hash(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length)
698
699psa_status_t mbedtls_test_wrap_psa_verify_hash_abort(
700 psa_verify_hash_interruptible_operation_t *arg0_operation);
701#define psa_verify_hash_abort(arg0_operation) \
702 mbedtls_test_wrap_psa_verify_hash_abort(arg0_operation)
703
704psa_status_t mbedtls_test_wrap_psa_verify_hash_complete(
705 psa_verify_hash_interruptible_operation_t *arg0_operation);
706#define psa_verify_hash_complete(arg0_operation) \
707 mbedtls_test_wrap_psa_verify_hash_complete(arg0_operation)
708
709psa_status_t mbedtls_test_wrap_psa_verify_hash_start(
710 psa_verify_hash_interruptible_operation_t *arg0_operation,
711 mbedtls_svc_key_id_t arg1_key,
712 psa_algorithm_t arg2_alg,
713 const uint8_t *arg3_hash,
714 size_t arg4_hash_length,
715 const uint8_t *arg5_signature,
716 size_t arg6_signature_length);
717#define psa_verify_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length) \
718 mbedtls_test_wrap_psa_verify_hash_start(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length)
719
720psa_status_t mbedtls_test_wrap_psa_verify_message(
721 mbedtls_svc_key_id_t arg0_key,
722 psa_algorithm_t arg1_alg,
723 const uint8_t *arg2_input,
724 size_t arg3_input_length,
725 const uint8_t *arg4_signature,
726 size_t arg5_signature_length);
727#define psa_verify_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length) \
728 mbedtls_test_wrap_psa_verify_message(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length)
729
Gilles Peskine4411c9c2024-01-04 20:51:38 +0100730#endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
731 !defined(RECORD_PSA_STATUS_COVERAGE_LOG) */
Gilles Peskine6e4332c2024-01-04 16:42:40 +0100732
733#ifdef __cplusplus
734}
735#endif
736
737#endif /* TEST_PSA_TEST_WRAPPERS_H */
738
739/* End of automatically generated file. */