quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

psa_test_wrappers.c (55351B)


      1 /* Automatically generated by generate_psa_wrappers.py, do not edit! */
      2 
      3 /* Copyright The Mbed TLS Contributors
      4  * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
      5  */
      6 
      7 #include <mbedtls/build_info.h>
      8 
      9 #if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
     10     !defined(RECORD_PSA_STATUS_COVERAGE_LOG)
     11 
     12 #include <psa/crypto.h>
     13 #include <test/memory.h>
     14 #include <test/psa_crypto_helpers.h>
     15 #include <test/psa_test_wrappers.h>
     16 
     17 /* Wrapper for mbedtls_psa_inject_entropy */
     18 #if defined(MBEDTLS_PSA_INJECT_ENTROPY)
     19 psa_status_t mbedtls_test_wrap_mbedtls_psa_inject_entropy(
     20     const uint8_t *arg0_seed,
     21     size_t arg1_seed_size)
     22 {
     23     psa_status_t status = (mbedtls_psa_inject_entropy)(arg0_seed, arg1_seed_size);
     24     return status;
     25 }
     26 #endif /* defined(MBEDTLS_PSA_INJECT_ENTROPY) */
     27 
     28 /* Wrapper for mbedtls_psa_platform_get_builtin_key */
     29 #if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS)
     30 psa_status_t mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key(
     31     mbedtls_svc_key_id_t arg0_key_id,
     32     psa_key_lifetime_t *arg1_lifetime,
     33     psa_drv_slot_number_t *arg2_slot_number)
     34 {
     35     psa_status_t status = (mbedtls_psa_platform_get_builtin_key)(arg0_key_id, arg1_lifetime, arg2_slot_number);
     36     return status;
     37 }
     38 #endif /* defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) */
     39 
     40 /* Wrapper for mbedtls_psa_register_se_key */
     41 #if defined(MBEDTLS_PSA_CRYPTO_SE_C)
     42 psa_status_t mbedtls_test_wrap_mbedtls_psa_register_se_key(
     43     const psa_key_attributes_t *arg0_attributes)
     44 {
     45     psa_status_t status = (mbedtls_psa_register_se_key)(arg0_attributes);
     46     return status;
     47 }
     48 #endif /* defined(MBEDTLS_PSA_CRYPTO_SE_C) */
     49 
     50 /* Wrapper for psa_aead_abort */
     51 psa_status_t mbedtls_test_wrap_psa_aead_abort(
     52     psa_aead_operation_t *arg0_operation)
     53 {
     54     psa_status_t status = (psa_aead_abort)(arg0_operation);
     55     return status;
     56 }
     57 
     58 /* Wrapper for psa_aead_decrypt */
     59 psa_status_t mbedtls_test_wrap_psa_aead_decrypt(
     60     mbedtls_svc_key_id_t arg0_key,
     61     psa_algorithm_t arg1_alg,
     62     const uint8_t *arg2_nonce,
     63     size_t arg3_nonce_length,
     64     const uint8_t *arg4_additional_data,
     65     size_t arg5_additional_data_length,
     66     const uint8_t *arg6_ciphertext,
     67     size_t arg7_ciphertext_length,
     68     uint8_t *arg8_plaintext,
     69     size_t arg9_plaintext_size,
     70     size_t *arg10_plaintext_length)
     71 {
     72 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     73     MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
     74     MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
     75     MBEDTLS_TEST_MEMORY_POISON(arg6_ciphertext, arg7_ciphertext_length);
     76     MBEDTLS_TEST_MEMORY_POISON(arg8_plaintext, arg9_plaintext_size);
     77 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     78     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);
     79 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
     80     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
     81     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
     82     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_ciphertext, arg7_ciphertext_length);
     83     MBEDTLS_TEST_MEMORY_UNPOISON(arg8_plaintext, arg9_plaintext_size);
     84 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
     85     return status;
     86 }
     87 
     88 /* Wrapper for psa_aead_decrypt_setup */
     89 psa_status_t mbedtls_test_wrap_psa_aead_decrypt_setup(
     90     psa_aead_operation_t *arg0_operation,
     91     mbedtls_svc_key_id_t arg1_key,
     92     psa_algorithm_t arg2_alg)
     93 {
     94     psa_status_t status = (psa_aead_decrypt_setup)(arg0_operation, arg1_key, arg2_alg);
     95     return status;
     96 }
     97 
     98 /* Wrapper for psa_aead_encrypt */
     99 psa_status_t mbedtls_test_wrap_psa_aead_encrypt(
    100     mbedtls_svc_key_id_t arg0_key,
    101     psa_algorithm_t arg1_alg,
    102     const uint8_t *arg2_nonce,
    103     size_t arg3_nonce_length,
    104     const uint8_t *arg4_additional_data,
    105     size_t arg5_additional_data_length,
    106     const uint8_t *arg6_plaintext,
    107     size_t arg7_plaintext_length,
    108     uint8_t *arg8_ciphertext,
    109     size_t arg9_ciphertext_size,
    110     size_t *arg10_ciphertext_length)
    111 {
    112 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    113     MBEDTLS_TEST_MEMORY_POISON(arg2_nonce, arg3_nonce_length);
    114     MBEDTLS_TEST_MEMORY_POISON(arg4_additional_data, arg5_additional_data_length);
    115     MBEDTLS_TEST_MEMORY_POISON(arg6_plaintext, arg7_plaintext_length);
    116     MBEDTLS_TEST_MEMORY_POISON(arg8_ciphertext, arg9_ciphertext_size);
    117 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    118     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);
    119 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    120     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_nonce, arg3_nonce_length);
    121     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_additional_data, arg5_additional_data_length);
    122     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_plaintext, arg7_plaintext_length);
    123     MBEDTLS_TEST_MEMORY_UNPOISON(arg8_ciphertext, arg9_ciphertext_size);
    124 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    125     return status;
    126 }
    127 
    128 /* Wrapper for psa_aead_encrypt_setup */
    129 psa_status_t mbedtls_test_wrap_psa_aead_encrypt_setup(
    130     psa_aead_operation_t *arg0_operation,
    131     mbedtls_svc_key_id_t arg1_key,
    132     psa_algorithm_t arg2_alg)
    133 {
    134     psa_status_t status = (psa_aead_encrypt_setup)(arg0_operation, arg1_key, arg2_alg);
    135     return status;
    136 }
    137 
    138 /* Wrapper for psa_aead_finish */
    139 psa_status_t mbedtls_test_wrap_psa_aead_finish(
    140     psa_aead_operation_t *arg0_operation,
    141     uint8_t *arg1_ciphertext,
    142     size_t arg2_ciphertext_size,
    143     size_t *arg3_ciphertext_length,
    144     uint8_t *arg4_tag,
    145     size_t arg5_tag_size,
    146     size_t *arg6_tag_length)
    147 {
    148 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    149     MBEDTLS_TEST_MEMORY_POISON(arg1_ciphertext, arg2_ciphertext_size);
    150     MBEDTLS_TEST_MEMORY_POISON(arg4_tag, arg5_tag_size);
    151 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    152     psa_status_t status = (psa_aead_finish)(arg0_operation, arg1_ciphertext, arg2_ciphertext_size, arg3_ciphertext_length, arg4_tag, arg5_tag_size, arg6_tag_length);
    153 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    154     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_ciphertext, arg2_ciphertext_size);
    155     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_tag, arg5_tag_size);
    156 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    157     return status;
    158 }
    159 
    160 /* Wrapper for psa_aead_generate_nonce */
    161 psa_status_t mbedtls_test_wrap_psa_aead_generate_nonce(
    162     psa_aead_operation_t *arg0_operation,
    163     uint8_t *arg1_nonce,
    164     size_t arg2_nonce_size,
    165     size_t *arg3_nonce_length)
    166 {
    167 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    168     MBEDTLS_TEST_MEMORY_POISON(arg1_nonce, arg2_nonce_size);
    169 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    170     psa_status_t status = (psa_aead_generate_nonce)(arg0_operation, arg1_nonce, arg2_nonce_size, arg3_nonce_length);
    171 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    172     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_nonce, arg2_nonce_size);
    173 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    174     return status;
    175 }
    176 
    177 /* Wrapper for psa_aead_set_lengths */
    178 psa_status_t mbedtls_test_wrap_psa_aead_set_lengths(
    179     psa_aead_operation_t *arg0_operation,
    180     size_t arg1_ad_length,
    181     size_t arg2_plaintext_length)
    182 {
    183     psa_status_t status = (psa_aead_set_lengths)(arg0_operation, arg1_ad_length, arg2_plaintext_length);
    184     return status;
    185 }
    186 
    187 /* Wrapper for psa_aead_set_nonce */
    188 psa_status_t mbedtls_test_wrap_psa_aead_set_nonce(
    189     psa_aead_operation_t *arg0_operation,
    190     const uint8_t *arg1_nonce,
    191     size_t arg2_nonce_length)
    192 {
    193 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    194     MBEDTLS_TEST_MEMORY_POISON(arg1_nonce, arg2_nonce_length);
    195 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    196     psa_status_t status = (psa_aead_set_nonce)(arg0_operation, arg1_nonce, arg2_nonce_length);
    197 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    198     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_nonce, arg2_nonce_length);
    199 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    200     return status;
    201 }
    202 
    203 /* Wrapper for psa_aead_update */
    204 psa_status_t mbedtls_test_wrap_psa_aead_update(
    205     psa_aead_operation_t *arg0_operation,
    206     const uint8_t *arg1_input,
    207     size_t arg2_input_length,
    208     uint8_t *arg3_output,
    209     size_t arg4_output_size,
    210     size_t *arg5_output_length)
    211 {
    212 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    213     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
    214     MBEDTLS_TEST_MEMORY_POISON(arg3_output, arg4_output_size);
    215 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    216     psa_status_t status = (psa_aead_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
    217 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    218     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
    219     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_output, arg4_output_size);
    220 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    221     return status;
    222 }
    223 
    224 /* Wrapper for psa_aead_update_ad */
    225 psa_status_t mbedtls_test_wrap_psa_aead_update_ad(
    226     psa_aead_operation_t *arg0_operation,
    227     const uint8_t *arg1_input,
    228     size_t arg2_input_length)
    229 {
    230 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    231     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
    232 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    233     psa_status_t status = (psa_aead_update_ad)(arg0_operation, arg1_input, arg2_input_length);
    234 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    235     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
    236 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    237     return status;
    238 }
    239 
    240 /* Wrapper for psa_aead_verify */
    241 psa_status_t mbedtls_test_wrap_psa_aead_verify(
    242     psa_aead_operation_t *arg0_operation,
    243     uint8_t *arg1_plaintext,
    244     size_t arg2_plaintext_size,
    245     size_t *arg3_plaintext_length,
    246     const uint8_t *arg4_tag,
    247     size_t arg5_tag_length)
    248 {
    249 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    250     MBEDTLS_TEST_MEMORY_POISON(arg1_plaintext, arg2_plaintext_size);
    251     MBEDTLS_TEST_MEMORY_POISON(arg4_tag, arg5_tag_length);
    252 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    253     psa_status_t status = (psa_aead_verify)(arg0_operation, arg1_plaintext, arg2_plaintext_size, arg3_plaintext_length, arg4_tag, arg5_tag_length);
    254 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    255     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_plaintext, arg2_plaintext_size);
    256     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_tag, arg5_tag_length);
    257 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    258     return status;
    259 }
    260 
    261 /* Wrapper for psa_asymmetric_decrypt */
    262 psa_status_t mbedtls_test_wrap_psa_asymmetric_decrypt(
    263     mbedtls_svc_key_id_t arg0_key,
    264     psa_algorithm_t arg1_alg,
    265     const uint8_t *arg2_input,
    266     size_t arg3_input_length,
    267     const uint8_t *arg4_salt,
    268     size_t arg5_salt_length,
    269     uint8_t *arg6_output,
    270     size_t arg7_output_size,
    271     size_t *arg8_output_length)
    272 {
    273 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    274     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
    275     MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
    276     MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
    277 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    278     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);
    279 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    280     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
    281     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
    282     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
    283 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    284     return status;
    285 }
    286 
    287 /* Wrapper for psa_asymmetric_encrypt */
    288 psa_status_t mbedtls_test_wrap_psa_asymmetric_encrypt(
    289     mbedtls_svc_key_id_t arg0_key,
    290     psa_algorithm_t arg1_alg,
    291     const uint8_t *arg2_input,
    292     size_t arg3_input_length,
    293     const uint8_t *arg4_salt,
    294     size_t arg5_salt_length,
    295     uint8_t *arg6_output,
    296     size_t arg7_output_size,
    297     size_t *arg8_output_length)
    298 {
    299 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    300     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
    301     MBEDTLS_TEST_MEMORY_POISON(arg4_salt, arg5_salt_length);
    302     MBEDTLS_TEST_MEMORY_POISON(arg6_output, arg7_output_size);
    303 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    304     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);
    305 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    306     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
    307     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_salt, arg5_salt_length);
    308     MBEDTLS_TEST_MEMORY_UNPOISON(arg6_output, arg7_output_size);
    309 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    310     return status;
    311 }
    312 
    313 /* Wrapper for psa_cipher_abort */
    314 psa_status_t mbedtls_test_wrap_psa_cipher_abort(
    315     psa_cipher_operation_t *arg0_operation)
    316 {
    317     psa_status_t status = (psa_cipher_abort)(arg0_operation);
    318     return status;
    319 }
    320 
    321 /* Wrapper for psa_cipher_decrypt */
    322 psa_status_t mbedtls_test_wrap_psa_cipher_decrypt(
    323     mbedtls_svc_key_id_t arg0_key,
    324     psa_algorithm_t arg1_alg,
    325     const uint8_t *arg2_input,
    326     size_t arg3_input_length,
    327     uint8_t *arg4_output,
    328     size_t arg5_output_size,
    329     size_t *arg6_output_length)
    330 {
    331 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    332     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
    333     MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
    334 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    335     psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
    336 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    337     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
    338     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
    339 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    340     return status;
    341 }
    342 
    343 /* Wrapper for psa_cipher_decrypt_setup */
    344 psa_status_t mbedtls_test_wrap_psa_cipher_decrypt_setup(
    345     psa_cipher_operation_t *arg0_operation,
    346     mbedtls_svc_key_id_t arg1_key,
    347     psa_algorithm_t arg2_alg)
    348 {
    349     psa_status_t status = (psa_cipher_decrypt_setup)(arg0_operation, arg1_key, arg2_alg);
    350     return status;
    351 }
    352 
    353 /* Wrapper for psa_cipher_encrypt */
    354 psa_status_t mbedtls_test_wrap_psa_cipher_encrypt(
    355     mbedtls_svc_key_id_t arg0_key,
    356     psa_algorithm_t arg1_alg,
    357     const uint8_t *arg2_input,
    358     size_t arg3_input_length,
    359     uint8_t *arg4_output,
    360     size_t arg5_output_size,
    361     size_t *arg6_output_length)
    362 {
    363 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    364     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
    365     MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
    366 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    367     psa_status_t status = (psa_cipher_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length);
    368 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    369     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
    370     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
    371 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    372     return status;
    373 }
    374 
    375 /* Wrapper for psa_cipher_encrypt_setup */
    376 psa_status_t mbedtls_test_wrap_psa_cipher_encrypt_setup(
    377     psa_cipher_operation_t *arg0_operation,
    378     mbedtls_svc_key_id_t arg1_key,
    379     psa_algorithm_t arg2_alg)
    380 {
    381     psa_status_t status = (psa_cipher_encrypt_setup)(arg0_operation, arg1_key, arg2_alg);
    382     return status;
    383 }
    384 
    385 /* Wrapper for psa_cipher_finish */
    386 psa_status_t mbedtls_test_wrap_psa_cipher_finish(
    387     psa_cipher_operation_t *arg0_operation,
    388     uint8_t *arg1_output,
    389     size_t arg2_output_size,
    390     size_t *arg3_output_length)
    391 {
    392 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    393     MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_size);
    394 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    395     psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length);
    396 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    397     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_size);
    398 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    399     return status;
    400 }
    401 
    402 /* Wrapper for psa_cipher_generate_iv */
    403 psa_status_t mbedtls_test_wrap_psa_cipher_generate_iv(
    404     psa_cipher_operation_t *arg0_operation,
    405     uint8_t *arg1_iv,
    406     size_t arg2_iv_size,
    407     size_t *arg3_iv_length)
    408 {
    409 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    410     MBEDTLS_TEST_MEMORY_POISON(arg1_iv, arg2_iv_size);
    411 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    412     psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length);
    413 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    414     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_iv, arg2_iv_size);
    415 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    416     return status;
    417 }
    418 
    419 /* Wrapper for psa_cipher_set_iv */
    420 psa_status_t mbedtls_test_wrap_psa_cipher_set_iv(
    421     psa_cipher_operation_t *arg0_operation,
    422     const uint8_t *arg1_iv,
    423     size_t arg2_iv_length)
    424 {
    425 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    426     MBEDTLS_TEST_MEMORY_POISON(arg1_iv, arg2_iv_length);
    427 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    428     psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length);
    429 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    430     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_iv, arg2_iv_length);
    431 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    432     return status;
    433 }
    434 
    435 /* Wrapper for psa_cipher_update */
    436 psa_status_t mbedtls_test_wrap_psa_cipher_update(
    437     psa_cipher_operation_t *arg0_operation,
    438     const uint8_t *arg1_input,
    439     size_t arg2_input_length,
    440     uint8_t *arg3_output,
    441     size_t arg4_output_size,
    442     size_t *arg5_output_length)
    443 {
    444 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    445     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
    446     MBEDTLS_TEST_MEMORY_POISON(arg3_output, arg4_output_size);
    447 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    448     psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length);
    449 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    450     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
    451     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_output, arg4_output_size);
    452 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    453     return status;
    454 }
    455 
    456 /* Wrapper for psa_copy_key */
    457 psa_status_t mbedtls_test_wrap_psa_copy_key(
    458     mbedtls_svc_key_id_t arg0_source_key,
    459     const psa_key_attributes_t *arg1_attributes,
    460     mbedtls_svc_key_id_t *arg2_target_key)
    461 {
    462     psa_status_t status = (psa_copy_key)(arg0_source_key, arg1_attributes, arg2_target_key);
    463     return status;
    464 }
    465 
    466 /* Wrapper for psa_crypto_driver_pake_get_cipher_suite */
    467 #if defined(PSA_WANT_ALG_SOME_PAKE)
    468 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_cipher_suite(
    469     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    470     psa_pake_cipher_suite_t *arg1_cipher_suite)
    471 {
    472     psa_status_t status = (psa_crypto_driver_pake_get_cipher_suite)(arg0_inputs, arg1_cipher_suite);
    473     return status;
    474 }
    475 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    476 
    477 /* Wrapper for psa_crypto_driver_pake_get_password */
    478 #if defined(PSA_WANT_ALG_SOME_PAKE)
    479 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_password(
    480     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    481     uint8_t *arg1_buffer,
    482     size_t arg2_buffer_size,
    483     size_t *arg3_buffer_length)
    484 {
    485     psa_status_t status = (psa_crypto_driver_pake_get_password)(arg0_inputs, arg1_buffer, arg2_buffer_size, arg3_buffer_length);
    486     return status;
    487 }
    488 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    489 
    490 /* Wrapper for psa_crypto_driver_pake_get_password_len */
    491 #if defined(PSA_WANT_ALG_SOME_PAKE)
    492 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_password_len(
    493     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    494     size_t *arg1_password_len)
    495 {
    496     psa_status_t status = (psa_crypto_driver_pake_get_password_len)(arg0_inputs, arg1_password_len);
    497     return status;
    498 }
    499 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    500 
    501 /* Wrapper for psa_crypto_driver_pake_get_peer */
    502 #if defined(PSA_WANT_ALG_SOME_PAKE)
    503 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_peer(
    504     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    505     uint8_t *arg1_peer_id,
    506     size_t arg2_peer_id_size,
    507     size_t *arg3_peer_id_length)
    508 {
    509     psa_status_t status = (psa_crypto_driver_pake_get_peer)(arg0_inputs, arg1_peer_id, arg2_peer_id_size, arg3_peer_id_length);
    510     return status;
    511 }
    512 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    513 
    514 /* Wrapper for psa_crypto_driver_pake_get_peer_len */
    515 #if defined(PSA_WANT_ALG_SOME_PAKE)
    516 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_peer_len(
    517     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    518     size_t *arg1_peer_len)
    519 {
    520     psa_status_t status = (psa_crypto_driver_pake_get_peer_len)(arg0_inputs, arg1_peer_len);
    521     return status;
    522 }
    523 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    524 
    525 /* Wrapper for psa_crypto_driver_pake_get_user */
    526 #if defined(PSA_WANT_ALG_SOME_PAKE)
    527 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_user(
    528     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    529     uint8_t *arg1_user_id,
    530     size_t arg2_user_id_size,
    531     size_t *arg3_user_id_len)
    532 {
    533     psa_status_t status = (psa_crypto_driver_pake_get_user)(arg0_inputs, arg1_user_id, arg2_user_id_size, arg3_user_id_len);
    534     return status;
    535 }
    536 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    537 
    538 /* Wrapper for psa_crypto_driver_pake_get_user_len */
    539 #if defined(PSA_WANT_ALG_SOME_PAKE)
    540 psa_status_t mbedtls_test_wrap_psa_crypto_driver_pake_get_user_len(
    541     const psa_crypto_driver_pake_inputs_t *arg0_inputs,
    542     size_t *arg1_user_len)
    543 {
    544     psa_status_t status = (psa_crypto_driver_pake_get_user_len)(arg0_inputs, arg1_user_len);
    545     return status;
    546 }
    547 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
    548 
    549 /* Wrapper for psa_crypto_init */
    550 psa_status_t mbedtls_test_wrap_psa_crypto_init(void)
    551 {
    552     psa_status_t status = (psa_crypto_init)();
    553     return status;
    554 }
    555 
    556 /* Wrapper for psa_destroy_key */
    557 psa_status_t mbedtls_test_wrap_psa_destroy_key(
    558     mbedtls_svc_key_id_t arg0_key)
    559 {
    560     psa_status_t status = (psa_destroy_key)(arg0_key);
    561     return status;
    562 }
    563 
    564 /* Wrapper for psa_export_key */
    565 psa_status_t mbedtls_test_wrap_psa_export_key(
    566     mbedtls_svc_key_id_t arg0_key,
    567     uint8_t *arg1_data,
    568     size_t arg2_data_size,
    569     size_t *arg3_data_length)
    570 {
    571 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    572     MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
    573 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    574     psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
    575 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    576     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
    577 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    578     return status;
    579 }
    580 
    581 /* Wrapper for psa_export_public_key */
    582 psa_status_t mbedtls_test_wrap_psa_export_public_key(
    583     mbedtls_svc_key_id_t arg0_key,
    584     uint8_t *arg1_data,
    585     size_t arg2_data_size,
    586     size_t *arg3_data_length)
    587 {
    588 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    589     MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_size);
    590 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    591     psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length);
    592 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    593     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_size);
    594 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    595     return status;
    596 }
    597 
    598 /* Wrapper for psa_generate_key */
    599 psa_status_t mbedtls_test_wrap_psa_generate_key(
    600     const psa_key_attributes_t *arg0_attributes,
    601     mbedtls_svc_key_id_t *arg1_key)
    602 {
    603     psa_status_t status = (psa_generate_key)(arg0_attributes, arg1_key);
    604     return status;
    605 }
    606 
    607 /* Wrapper for psa_generate_key_custom */
    608 psa_status_t mbedtls_test_wrap_psa_generate_key_custom(
    609     const psa_key_attributes_t *arg0_attributes,
    610     const psa_custom_key_parameters_t *arg1_custom,
    611     const uint8_t *arg2_custom_data,
    612     size_t arg3_custom_data_length,
    613     mbedtls_svc_key_id_t *arg4_key)
    614 {
    615 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    616     MBEDTLS_TEST_MEMORY_POISON(arg2_custom_data, arg3_custom_data_length);
    617 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    618     psa_status_t status = (psa_generate_key_custom)(arg0_attributes, arg1_custom, arg2_custom_data, arg3_custom_data_length, arg4_key);
    619 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    620     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_custom_data, arg3_custom_data_length);
    621 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    622     return status;
    623 }
    624 
    625 /* Wrapper for psa_generate_key_ext */
    626 psa_status_t mbedtls_test_wrap_psa_generate_key_ext(
    627     const psa_key_attributes_t *arg0_attributes,
    628     const psa_key_production_parameters_t *arg1_params,
    629     size_t arg2_params_data_length,
    630     mbedtls_svc_key_id_t *arg3_key)
    631 {
    632     psa_status_t status = (psa_generate_key_ext)(arg0_attributes, arg1_params, arg2_params_data_length, arg3_key);
    633     return status;
    634 }
    635 
    636 /* Wrapper for psa_generate_random */
    637 psa_status_t mbedtls_test_wrap_psa_generate_random(
    638     uint8_t *arg0_output,
    639     size_t arg1_output_size)
    640 {
    641 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    642     MBEDTLS_TEST_MEMORY_POISON(arg0_output, arg1_output_size);
    643 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    644     psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size);
    645 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    646     MBEDTLS_TEST_MEMORY_UNPOISON(arg0_output, arg1_output_size);
    647 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    648     return status;
    649 }
    650 
    651 /* Wrapper for psa_get_key_attributes */
    652 psa_status_t mbedtls_test_wrap_psa_get_key_attributes(
    653     mbedtls_svc_key_id_t arg0_key,
    654     psa_key_attributes_t *arg1_attributes)
    655 {
    656     psa_status_t status = (psa_get_key_attributes)(arg0_key, arg1_attributes);
    657     return status;
    658 }
    659 
    660 /* Wrapper for psa_hash_abort */
    661 psa_status_t mbedtls_test_wrap_psa_hash_abort(
    662     psa_hash_operation_t *arg0_operation)
    663 {
    664     psa_status_t status = (psa_hash_abort)(arg0_operation);
    665     return status;
    666 }
    667 
    668 /* Wrapper for psa_hash_clone */
    669 psa_status_t mbedtls_test_wrap_psa_hash_clone(
    670     const psa_hash_operation_t *arg0_source_operation,
    671     psa_hash_operation_t *arg1_target_operation)
    672 {
    673     psa_status_t status = (psa_hash_clone)(arg0_source_operation, arg1_target_operation);
    674     return status;
    675 }
    676 
    677 /* Wrapper for psa_hash_compare */
    678 psa_status_t mbedtls_test_wrap_psa_hash_compare(
    679     psa_algorithm_t arg0_alg,
    680     const uint8_t *arg1_input,
    681     size_t arg2_input_length,
    682     const uint8_t *arg3_hash,
    683     size_t arg4_hash_length)
    684 {
    685 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    686     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
    687     MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
    688 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    689     psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length);
    690 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    691     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
    692     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
    693 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    694     return status;
    695 }
    696 
    697 /* Wrapper for psa_hash_compute */
    698 psa_status_t mbedtls_test_wrap_psa_hash_compute(
    699     psa_algorithm_t arg0_alg,
    700     const uint8_t *arg1_input,
    701     size_t arg2_input_length,
    702     uint8_t *arg3_hash,
    703     size_t arg4_hash_size,
    704     size_t *arg5_hash_length)
    705 {
    706 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    707     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
    708     MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_size);
    709 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    710     psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length);
    711 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    712     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
    713     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_size);
    714 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    715     return status;
    716 }
    717 
    718 /* Wrapper for psa_hash_finish */
    719 psa_status_t mbedtls_test_wrap_psa_hash_finish(
    720     psa_hash_operation_t *arg0_operation,
    721     uint8_t *arg1_hash,
    722     size_t arg2_hash_size,
    723     size_t *arg3_hash_length)
    724 {
    725 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    726     MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_size);
    727 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    728     psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length);
    729 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    730     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_size);
    731 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    732     return status;
    733 }
    734 
    735 /* Wrapper for psa_hash_setup */
    736 psa_status_t mbedtls_test_wrap_psa_hash_setup(
    737     psa_hash_operation_t *arg0_operation,
    738     psa_algorithm_t arg1_alg)
    739 {
    740     psa_status_t status = (psa_hash_setup)(arg0_operation, arg1_alg);
    741     return status;
    742 }
    743 
    744 /* Wrapper for psa_hash_update */
    745 psa_status_t mbedtls_test_wrap_psa_hash_update(
    746     psa_hash_operation_t *arg0_operation,
    747     const uint8_t *arg1_input,
    748     size_t arg2_input_length)
    749 {
    750 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    751     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
    752 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    753     psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length);
    754 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    755     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
    756 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    757     return status;
    758 }
    759 
    760 /* Wrapper for psa_hash_verify */
    761 psa_status_t mbedtls_test_wrap_psa_hash_verify(
    762     psa_hash_operation_t *arg0_operation,
    763     const uint8_t *arg1_hash,
    764     size_t arg2_hash_length)
    765 {
    766 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    767     MBEDTLS_TEST_MEMORY_POISON(arg1_hash, arg2_hash_length);
    768 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    769     psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length);
    770 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    771     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_hash, arg2_hash_length);
    772 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    773     return status;
    774 }
    775 
    776 /* Wrapper for psa_import_key */
    777 psa_status_t mbedtls_test_wrap_psa_import_key(
    778     const psa_key_attributes_t *arg0_attributes,
    779     const uint8_t *arg1_data,
    780     size_t arg2_data_length,
    781     mbedtls_svc_key_id_t *arg3_key)
    782 {
    783 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    784     MBEDTLS_TEST_MEMORY_POISON(arg1_data, arg2_data_length);
    785 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    786     psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key);
    787 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    788     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_data, arg2_data_length);
    789 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    790     return status;
    791 }
    792 
    793 /* Wrapper for psa_key_derivation_abort */
    794 psa_status_t mbedtls_test_wrap_psa_key_derivation_abort(
    795     psa_key_derivation_operation_t *arg0_operation)
    796 {
    797     psa_status_t status = (psa_key_derivation_abort)(arg0_operation);
    798     return status;
    799 }
    800 
    801 /* Wrapper for psa_key_derivation_get_capacity */
    802 psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity(
    803     const psa_key_derivation_operation_t *arg0_operation,
    804     size_t *arg1_capacity)
    805 {
    806     psa_status_t status = (psa_key_derivation_get_capacity)(arg0_operation, arg1_capacity);
    807     return status;
    808 }
    809 
    810 /* Wrapper for psa_key_derivation_input_bytes */
    811 psa_status_t mbedtls_test_wrap_psa_key_derivation_input_bytes(
    812     psa_key_derivation_operation_t *arg0_operation,
    813     psa_key_derivation_step_t arg1_step,
    814     const uint8_t *arg2_data,
    815     size_t arg3_data_length)
    816 {
    817 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    818     MBEDTLS_TEST_MEMORY_POISON(arg2_data, arg3_data_length);
    819 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    820     psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length);
    821 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    822     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_data, arg3_data_length);
    823 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    824     return status;
    825 }
    826 
    827 /* Wrapper for psa_key_derivation_input_integer */
    828 psa_status_t mbedtls_test_wrap_psa_key_derivation_input_integer(
    829     psa_key_derivation_operation_t *arg0_operation,
    830     psa_key_derivation_step_t arg1_step,
    831     uint64_t arg2_value)
    832 {
    833     psa_status_t status = (psa_key_derivation_input_integer)(arg0_operation, arg1_step, arg2_value);
    834     return status;
    835 }
    836 
    837 /* Wrapper for psa_key_derivation_input_key */
    838 psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key(
    839     psa_key_derivation_operation_t *arg0_operation,
    840     psa_key_derivation_step_t arg1_step,
    841     mbedtls_svc_key_id_t arg2_key)
    842 {
    843     psa_status_t status = (psa_key_derivation_input_key)(arg0_operation, arg1_step, arg2_key);
    844     return status;
    845 }
    846 
    847 /* Wrapper for psa_key_derivation_key_agreement */
    848 psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement(
    849     psa_key_derivation_operation_t *arg0_operation,
    850     psa_key_derivation_step_t arg1_step,
    851     mbedtls_svc_key_id_t arg2_private_key,
    852     const uint8_t *arg3_peer_key,
    853     size_t arg4_peer_key_length)
    854 {
    855 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    856     MBEDTLS_TEST_MEMORY_POISON(arg3_peer_key, arg4_peer_key_length);
    857 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    858     psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length);
    859 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    860     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_peer_key, arg4_peer_key_length);
    861 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    862     return status;
    863 }
    864 
    865 /* Wrapper for psa_key_derivation_output_bytes */
    866 psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes(
    867     psa_key_derivation_operation_t *arg0_operation,
    868     uint8_t *arg1_output,
    869     size_t arg2_output_length)
    870 {
    871 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    872     MBEDTLS_TEST_MEMORY_POISON(arg1_output, arg2_output_length);
    873 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    874     psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length);
    875 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    876     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_output, arg2_output_length);
    877 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    878     return status;
    879 }
    880 
    881 /* Wrapper for psa_key_derivation_output_key */
    882 psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key(
    883     const psa_key_attributes_t *arg0_attributes,
    884     psa_key_derivation_operation_t *arg1_operation,
    885     mbedtls_svc_key_id_t *arg2_key)
    886 {
    887     psa_status_t status = (psa_key_derivation_output_key)(arg0_attributes, arg1_operation, arg2_key);
    888     return status;
    889 }
    890 
    891 /* Wrapper for psa_key_derivation_output_key_custom */
    892 psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key_custom(
    893     const psa_key_attributes_t *arg0_attributes,
    894     psa_key_derivation_operation_t *arg1_operation,
    895     const psa_custom_key_parameters_t *arg2_custom,
    896     const uint8_t *arg3_custom_data,
    897     size_t arg4_custom_data_length,
    898     mbedtls_svc_key_id_t *arg5_key)
    899 {
    900 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    901     MBEDTLS_TEST_MEMORY_POISON(arg3_custom_data, arg4_custom_data_length);
    902 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    903     psa_status_t status = (psa_key_derivation_output_key_custom)(arg0_attributes, arg1_operation, arg2_custom, arg3_custom_data, arg4_custom_data_length, arg5_key);
    904 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    905     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_custom_data, arg4_custom_data_length);
    906 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    907     return status;
    908 }
    909 
    910 /* Wrapper for psa_key_derivation_output_key_ext */
    911 psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key_ext(
    912     const psa_key_attributes_t *arg0_attributes,
    913     psa_key_derivation_operation_t *arg1_operation,
    914     const psa_key_production_parameters_t *arg2_params,
    915     size_t arg3_params_data_length,
    916     mbedtls_svc_key_id_t *arg4_key)
    917 {
    918     psa_status_t status = (psa_key_derivation_output_key_ext)(arg0_attributes, arg1_operation, arg2_params, arg3_params_data_length, arg4_key);
    919     return status;
    920 }
    921 
    922 /* Wrapper for psa_key_derivation_set_capacity */
    923 psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity(
    924     psa_key_derivation_operation_t *arg0_operation,
    925     size_t arg1_capacity)
    926 {
    927     psa_status_t status = (psa_key_derivation_set_capacity)(arg0_operation, arg1_capacity);
    928     return status;
    929 }
    930 
    931 /* Wrapper for psa_key_derivation_setup */
    932 psa_status_t mbedtls_test_wrap_psa_key_derivation_setup(
    933     psa_key_derivation_operation_t *arg0_operation,
    934     psa_algorithm_t arg1_alg)
    935 {
    936     psa_status_t status = (psa_key_derivation_setup)(arg0_operation, arg1_alg);
    937     return status;
    938 }
    939 
    940 /* Wrapper for psa_mac_abort */
    941 psa_status_t mbedtls_test_wrap_psa_mac_abort(
    942     psa_mac_operation_t *arg0_operation)
    943 {
    944     psa_status_t status = (psa_mac_abort)(arg0_operation);
    945     return status;
    946 }
    947 
    948 /* Wrapper for psa_mac_compute */
    949 psa_status_t mbedtls_test_wrap_psa_mac_compute(
    950     mbedtls_svc_key_id_t arg0_key,
    951     psa_algorithm_t arg1_alg,
    952     const uint8_t *arg2_input,
    953     size_t arg3_input_length,
    954     uint8_t *arg4_mac,
    955     size_t arg5_mac_size,
    956     size_t *arg6_mac_length)
    957 {
    958 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    959     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
    960     MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_size);
    961 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    962     psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length);
    963 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    964     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
    965     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_size);
    966 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    967     return status;
    968 }
    969 
    970 /* Wrapper for psa_mac_sign_finish */
    971 psa_status_t mbedtls_test_wrap_psa_mac_sign_finish(
    972     psa_mac_operation_t *arg0_operation,
    973     uint8_t *arg1_mac,
    974     size_t arg2_mac_size,
    975     size_t *arg3_mac_length)
    976 {
    977 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    978     MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_size);
    979 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    980     psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length);
    981 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
    982     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_size);
    983 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
    984     return status;
    985 }
    986 
    987 /* Wrapper for psa_mac_sign_setup */
    988 psa_status_t mbedtls_test_wrap_psa_mac_sign_setup(
    989     psa_mac_operation_t *arg0_operation,
    990     mbedtls_svc_key_id_t arg1_key,
    991     psa_algorithm_t arg2_alg)
    992 {
    993     psa_status_t status = (psa_mac_sign_setup)(arg0_operation, arg1_key, arg2_alg);
    994     return status;
    995 }
    996 
    997 /* Wrapper for psa_mac_update */
    998 psa_status_t mbedtls_test_wrap_psa_mac_update(
    999     psa_mac_operation_t *arg0_operation,
   1000     const uint8_t *arg1_input,
   1001     size_t arg2_input_length)
   1002 {
   1003 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1004     MBEDTLS_TEST_MEMORY_POISON(arg1_input, arg2_input_length);
   1005 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1006     psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length);
   1007 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1008     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_input, arg2_input_length);
   1009 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1010     return status;
   1011 }
   1012 
   1013 /* Wrapper for psa_mac_verify */
   1014 psa_status_t mbedtls_test_wrap_psa_mac_verify(
   1015     mbedtls_svc_key_id_t arg0_key,
   1016     psa_algorithm_t arg1_alg,
   1017     const uint8_t *arg2_input,
   1018     size_t arg3_input_length,
   1019     const uint8_t *arg4_mac,
   1020     size_t arg5_mac_length)
   1021 {
   1022 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1023     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
   1024     MBEDTLS_TEST_MEMORY_POISON(arg4_mac, arg5_mac_length);
   1025 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1026     psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length);
   1027 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1028     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
   1029     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_mac, arg5_mac_length);
   1030 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1031     return status;
   1032 }
   1033 
   1034 /* Wrapper for psa_mac_verify_finish */
   1035 psa_status_t mbedtls_test_wrap_psa_mac_verify_finish(
   1036     psa_mac_operation_t *arg0_operation,
   1037     const uint8_t *arg1_mac,
   1038     size_t arg2_mac_length)
   1039 {
   1040 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1041     MBEDTLS_TEST_MEMORY_POISON(arg1_mac, arg2_mac_length);
   1042 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1043     psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length);
   1044 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1045     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_mac, arg2_mac_length);
   1046 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1047     return status;
   1048 }
   1049 
   1050 /* Wrapper for psa_mac_verify_setup */
   1051 psa_status_t mbedtls_test_wrap_psa_mac_verify_setup(
   1052     psa_mac_operation_t *arg0_operation,
   1053     mbedtls_svc_key_id_t arg1_key,
   1054     psa_algorithm_t arg2_alg)
   1055 {
   1056     psa_status_t status = (psa_mac_verify_setup)(arg0_operation, arg1_key, arg2_alg);
   1057     return status;
   1058 }
   1059 
   1060 /* Wrapper for psa_pake_abort */
   1061 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1062 psa_status_t mbedtls_test_wrap_psa_pake_abort(
   1063     psa_pake_operation_t *arg0_operation)
   1064 {
   1065     psa_status_t status = (psa_pake_abort)(arg0_operation);
   1066     return status;
   1067 }
   1068 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1069 
   1070 /* Wrapper for psa_pake_get_implicit_key */
   1071 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1072 psa_status_t mbedtls_test_wrap_psa_pake_get_implicit_key(
   1073     psa_pake_operation_t *arg0_operation,
   1074     psa_key_derivation_operation_t *arg1_output)
   1075 {
   1076     psa_status_t status = (psa_pake_get_implicit_key)(arg0_operation, arg1_output);
   1077     return status;
   1078 }
   1079 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1080 
   1081 /* Wrapper for psa_pake_input */
   1082 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1083 psa_status_t mbedtls_test_wrap_psa_pake_input(
   1084     psa_pake_operation_t *arg0_operation,
   1085     psa_pake_step_t arg1_step,
   1086     const uint8_t *arg2_input,
   1087     size_t arg3_input_length)
   1088 {
   1089 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1090     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
   1091 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1092     psa_status_t status = (psa_pake_input)(arg0_operation, arg1_step, arg2_input, arg3_input_length);
   1093 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1094     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
   1095 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1096     return status;
   1097 }
   1098 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1099 
   1100 /* Wrapper for psa_pake_output */
   1101 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1102 psa_status_t mbedtls_test_wrap_psa_pake_output(
   1103     psa_pake_operation_t *arg0_operation,
   1104     psa_pake_step_t arg1_step,
   1105     uint8_t *arg2_output,
   1106     size_t arg3_output_size,
   1107     size_t *arg4_output_length)
   1108 {
   1109 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1110     MBEDTLS_TEST_MEMORY_POISON(arg2_output, arg3_output_size);
   1111 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1112     psa_status_t status = (psa_pake_output)(arg0_operation, arg1_step, arg2_output, arg3_output_size, arg4_output_length);
   1113 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1114     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_output, arg3_output_size);
   1115 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1116     return status;
   1117 }
   1118 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1119 
   1120 /* Wrapper for psa_pake_set_password_key */
   1121 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1122 psa_status_t mbedtls_test_wrap_psa_pake_set_password_key(
   1123     psa_pake_operation_t *arg0_operation,
   1124     mbedtls_svc_key_id_t arg1_password)
   1125 {
   1126     psa_status_t status = (psa_pake_set_password_key)(arg0_operation, arg1_password);
   1127     return status;
   1128 }
   1129 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1130 
   1131 /* Wrapper for psa_pake_set_peer */
   1132 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1133 psa_status_t mbedtls_test_wrap_psa_pake_set_peer(
   1134     psa_pake_operation_t *arg0_operation,
   1135     const uint8_t *arg1_peer_id,
   1136     size_t arg2_peer_id_len)
   1137 {
   1138 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1139     MBEDTLS_TEST_MEMORY_POISON(arg1_peer_id, arg2_peer_id_len);
   1140 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1141     psa_status_t status = (psa_pake_set_peer)(arg0_operation, arg1_peer_id, arg2_peer_id_len);
   1142 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1143     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_peer_id, arg2_peer_id_len);
   1144 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1145     return status;
   1146 }
   1147 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1148 
   1149 /* Wrapper for psa_pake_set_role */
   1150 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1151 psa_status_t mbedtls_test_wrap_psa_pake_set_role(
   1152     psa_pake_operation_t *arg0_operation,
   1153     psa_pake_role_t arg1_role)
   1154 {
   1155     psa_status_t status = (psa_pake_set_role)(arg0_operation, arg1_role);
   1156     return status;
   1157 }
   1158 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1159 
   1160 /* Wrapper for psa_pake_set_user */
   1161 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1162 psa_status_t mbedtls_test_wrap_psa_pake_set_user(
   1163     psa_pake_operation_t *arg0_operation,
   1164     const uint8_t *arg1_user_id,
   1165     size_t arg2_user_id_len)
   1166 {
   1167 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1168     MBEDTLS_TEST_MEMORY_POISON(arg1_user_id, arg2_user_id_len);
   1169 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1170     psa_status_t status = (psa_pake_set_user)(arg0_operation, arg1_user_id, arg2_user_id_len);
   1171 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1172     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_user_id, arg2_user_id_len);
   1173 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1174     return status;
   1175 }
   1176 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1177 
   1178 /* Wrapper for psa_pake_setup */
   1179 #if defined(PSA_WANT_ALG_SOME_PAKE)
   1180 psa_status_t mbedtls_test_wrap_psa_pake_setup(
   1181     psa_pake_operation_t *arg0_operation,
   1182     const psa_pake_cipher_suite_t *arg1_cipher_suite)
   1183 {
   1184     psa_status_t status = (psa_pake_setup)(arg0_operation, arg1_cipher_suite);
   1185     return status;
   1186 }
   1187 #endif /* defined(PSA_WANT_ALG_SOME_PAKE) */
   1188 
   1189 /* Wrapper for psa_purge_key */
   1190 psa_status_t mbedtls_test_wrap_psa_purge_key(
   1191     mbedtls_svc_key_id_t arg0_key)
   1192 {
   1193     psa_status_t status = (psa_purge_key)(arg0_key);
   1194     return status;
   1195 }
   1196 
   1197 /* Wrapper for psa_raw_key_agreement */
   1198 psa_status_t mbedtls_test_wrap_psa_raw_key_agreement(
   1199     psa_algorithm_t arg0_alg,
   1200     mbedtls_svc_key_id_t arg1_private_key,
   1201     const uint8_t *arg2_peer_key,
   1202     size_t arg3_peer_key_length,
   1203     uint8_t *arg4_output,
   1204     size_t arg5_output_size,
   1205     size_t *arg6_output_length)
   1206 {
   1207 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1208     MBEDTLS_TEST_MEMORY_POISON(arg2_peer_key, arg3_peer_key_length);
   1209     MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size);
   1210 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1211     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);
   1212 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1213     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_peer_key, arg3_peer_key_length);
   1214     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size);
   1215 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1216     return status;
   1217 }
   1218 
   1219 /* Wrapper for psa_sign_hash */
   1220 psa_status_t mbedtls_test_wrap_psa_sign_hash(
   1221     mbedtls_svc_key_id_t arg0_key,
   1222     psa_algorithm_t arg1_alg,
   1223     const uint8_t *arg2_hash,
   1224     size_t arg3_hash_length,
   1225     uint8_t *arg4_signature,
   1226     size_t arg5_signature_size,
   1227     size_t *arg6_signature_length)
   1228 {
   1229 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1230     MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
   1231     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
   1232 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1233     psa_status_t status = (psa_sign_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length);
   1234 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1235     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
   1236     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
   1237 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1238     return status;
   1239 }
   1240 
   1241 /* Wrapper for psa_sign_hash_abort */
   1242 psa_status_t mbedtls_test_wrap_psa_sign_hash_abort(
   1243     psa_sign_hash_interruptible_operation_t *arg0_operation)
   1244 {
   1245     psa_status_t status = (psa_sign_hash_abort)(arg0_operation);
   1246     return status;
   1247 }
   1248 
   1249 /* Wrapper for psa_sign_hash_complete */
   1250 psa_status_t mbedtls_test_wrap_psa_sign_hash_complete(
   1251     psa_sign_hash_interruptible_operation_t *arg0_operation,
   1252     uint8_t *arg1_signature,
   1253     size_t arg2_signature_size,
   1254     size_t *arg3_signature_length)
   1255 {
   1256 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1257     MBEDTLS_TEST_MEMORY_POISON(arg1_signature, arg2_signature_size);
   1258 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1259     psa_status_t status = (psa_sign_hash_complete)(arg0_operation, arg1_signature, arg2_signature_size, arg3_signature_length);
   1260 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1261     MBEDTLS_TEST_MEMORY_UNPOISON(arg1_signature, arg2_signature_size);
   1262 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1263     return status;
   1264 }
   1265 
   1266 /* Wrapper for psa_sign_hash_start */
   1267 psa_status_t mbedtls_test_wrap_psa_sign_hash_start(
   1268     psa_sign_hash_interruptible_operation_t *arg0_operation,
   1269     mbedtls_svc_key_id_t arg1_key,
   1270     psa_algorithm_t arg2_alg,
   1271     const uint8_t *arg3_hash,
   1272     size_t arg4_hash_length)
   1273 {
   1274 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1275     MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
   1276 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1277     psa_status_t status = (psa_sign_hash_start)(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length);
   1278 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1279     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
   1280 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1281     return status;
   1282 }
   1283 
   1284 /* Wrapper for psa_sign_message */
   1285 psa_status_t mbedtls_test_wrap_psa_sign_message(
   1286     mbedtls_svc_key_id_t arg0_key,
   1287     psa_algorithm_t arg1_alg,
   1288     const uint8_t *arg2_input,
   1289     size_t arg3_input_length,
   1290     uint8_t *arg4_signature,
   1291     size_t arg5_signature_size,
   1292     size_t *arg6_signature_length)
   1293 {
   1294 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1295     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
   1296     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_size);
   1297 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1298     psa_status_t status = (psa_sign_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length);
   1299 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1300     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
   1301     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_size);
   1302 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1303     return status;
   1304 }
   1305 
   1306 /* Wrapper for psa_verify_hash */
   1307 psa_status_t mbedtls_test_wrap_psa_verify_hash(
   1308     mbedtls_svc_key_id_t arg0_key,
   1309     psa_algorithm_t arg1_alg,
   1310     const uint8_t *arg2_hash,
   1311     size_t arg3_hash_length,
   1312     const uint8_t *arg4_signature,
   1313     size_t arg5_signature_length)
   1314 {
   1315 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1316     MBEDTLS_TEST_MEMORY_POISON(arg2_hash, arg3_hash_length);
   1317     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
   1318 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1319     psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length);
   1320 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1321     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_hash, arg3_hash_length);
   1322     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
   1323 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1324     return status;
   1325 }
   1326 
   1327 /* Wrapper for psa_verify_hash_abort */
   1328 psa_status_t mbedtls_test_wrap_psa_verify_hash_abort(
   1329     psa_verify_hash_interruptible_operation_t *arg0_operation)
   1330 {
   1331     psa_status_t status = (psa_verify_hash_abort)(arg0_operation);
   1332     return status;
   1333 }
   1334 
   1335 /* Wrapper for psa_verify_hash_complete */
   1336 psa_status_t mbedtls_test_wrap_psa_verify_hash_complete(
   1337     psa_verify_hash_interruptible_operation_t *arg0_operation)
   1338 {
   1339     psa_status_t status = (psa_verify_hash_complete)(arg0_operation);
   1340     return status;
   1341 }
   1342 
   1343 /* Wrapper for psa_verify_hash_start */
   1344 psa_status_t mbedtls_test_wrap_psa_verify_hash_start(
   1345     psa_verify_hash_interruptible_operation_t *arg0_operation,
   1346     mbedtls_svc_key_id_t arg1_key,
   1347     psa_algorithm_t arg2_alg,
   1348     const uint8_t *arg3_hash,
   1349     size_t arg4_hash_length,
   1350     const uint8_t *arg5_signature,
   1351     size_t arg6_signature_length)
   1352 {
   1353 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1354     MBEDTLS_TEST_MEMORY_POISON(arg3_hash, arg4_hash_length);
   1355     MBEDTLS_TEST_MEMORY_POISON(arg5_signature, arg6_signature_length);
   1356 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1357     psa_status_t status = (psa_verify_hash_start)(arg0_operation, arg1_key, arg2_alg, arg3_hash, arg4_hash_length, arg5_signature, arg6_signature_length);
   1358 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1359     MBEDTLS_TEST_MEMORY_UNPOISON(arg3_hash, arg4_hash_length);
   1360     MBEDTLS_TEST_MEMORY_UNPOISON(arg5_signature, arg6_signature_length);
   1361 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1362     return status;
   1363 }
   1364 
   1365 /* Wrapper for psa_verify_message */
   1366 psa_status_t mbedtls_test_wrap_psa_verify_message(
   1367     mbedtls_svc_key_id_t arg0_key,
   1368     psa_algorithm_t arg1_alg,
   1369     const uint8_t *arg2_input,
   1370     size_t arg3_input_length,
   1371     const uint8_t *arg4_signature,
   1372     size_t arg5_signature_length)
   1373 {
   1374 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1375     MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length);
   1376     MBEDTLS_TEST_MEMORY_POISON(arg4_signature, arg5_signature_length);
   1377 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1378     psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length);
   1379 #if !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS)
   1380     MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length);
   1381     MBEDTLS_TEST_MEMORY_UNPOISON(arg4_signature, arg5_signature_length);
   1382 #endif /* !defined(MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS) */
   1383     return status;
   1384 }
   1385 
   1386 #endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) && \
   1387     !defined(RECORD_PSA_STATUS_COVERAGE_LOG) */
   1388 
   1389 /* End of automatically generated file. */