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