Gilles Peskine | d5e5e6d | 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 | #if !defined(MBEDTLS_CONFIG_FILE) |
| 8 | #include "mbedtls/config.h" |
| 9 | #else |
| 10 | #include MBEDTLS_CONFIG_FILE |
| 11 | #endif |
| 12 | |
| 13 | #if defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) |
| 14 | |
| 15 | #include <psa/crypto.h> |
| 16 | |
Gilles Peskine | 42fa8ea | 2024-01-04 16:59:28 +0100 | [diff] [blame^] | 17 | #include <test/memory.h> |
Gilles Peskine | d5e5e6d | 2024-01-04 16:42:40 +0100 | [diff] [blame] | 18 | #include <test/psa_crypto_helpers.h> |
| 19 | #include <test/psa_test_wrappers.h> |
| 20 | |
| 21 | /* Wrapper for mbedtls_psa_inject_entropy */ |
| 22 | #if defined(MBEDTLS_PSA_INJECT_ENTROPY) |
| 23 | psa_status_t mbedtls_test_wrap_mbedtls_psa_inject_entropy( |
| 24 | const uint8_t *arg0_seed, |
| 25 | size_t arg1_seed_size) |
| 26 | { |
| 27 | psa_status_t status = (mbedtls_psa_inject_entropy)(arg0_seed, arg1_seed_size); |
| 28 | return status; |
| 29 | } |
| 30 | #endif /* defined(MBEDTLS_PSA_INJECT_ENTROPY) */ |
| 31 | |
| 32 | /* Wrapper for mbedtls_psa_platform_get_builtin_key */ |
| 33 | #if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) |
| 34 | psa_status_t mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key( |
| 35 | mbedtls_svc_key_id_t arg0_key_id, |
| 36 | psa_key_lifetime_t *arg1_lifetime, |
| 37 | psa_drv_slot_number_t *arg2_slot_number) |
| 38 | { |
| 39 | psa_status_t status = (mbedtls_psa_platform_get_builtin_key)(arg0_key_id, arg1_lifetime, arg2_slot_number); |
| 40 | return status; |
| 41 | } |
| 42 | #endif /* defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS) */ |
| 43 | |
| 44 | /* Wrapper for mbedtls_psa_register_se_key */ |
| 45 | #if defined(MBEDTLS_PSA_CRYPTO_SE_C) |
| 46 | psa_status_t mbedtls_test_wrap_mbedtls_psa_register_se_key( |
| 47 | const psa_key_attributes_t *arg0_attributes) |
| 48 | { |
| 49 | psa_status_t status = (mbedtls_psa_register_se_key)(arg0_attributes); |
| 50 | return status; |
| 51 | } |
| 52 | #endif /* defined(MBEDTLS_PSA_CRYPTO_SE_C) */ |
| 53 | |
| 54 | /* Wrapper for psa_aead_decrypt */ |
| 55 | psa_status_t mbedtls_test_wrap_psa_aead_decrypt( |
| 56 | mbedtls_svc_key_id_t arg0_key, |
| 57 | psa_algorithm_t arg1_alg, |
| 58 | const uint8_t *arg2_nonce, |
| 59 | size_t arg3_nonce_length, |
| 60 | const uint8_t *arg4_additional_data, |
| 61 | size_t arg5_additional_data_length, |
| 62 | const uint8_t *arg6_ciphertext, |
| 63 | size_t arg7_ciphertext_length, |
| 64 | uint8_t *arg8_plaintext, |
| 65 | size_t arg9_plaintext_size, |
| 66 | size_t *arg10_plaintext_length) |
| 67 | { |
| 68 | 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); |
| 69 | return status; |
| 70 | } |
| 71 | |
| 72 | /* Wrapper for psa_aead_encrypt */ |
| 73 | psa_status_t mbedtls_test_wrap_psa_aead_encrypt( |
| 74 | mbedtls_svc_key_id_t arg0_key, |
| 75 | psa_algorithm_t arg1_alg, |
| 76 | const uint8_t *arg2_nonce, |
| 77 | size_t arg3_nonce_length, |
| 78 | const uint8_t *arg4_additional_data, |
| 79 | size_t arg5_additional_data_length, |
| 80 | const uint8_t *arg6_plaintext, |
| 81 | size_t arg7_plaintext_length, |
| 82 | uint8_t *arg8_ciphertext, |
| 83 | size_t arg9_ciphertext_size, |
| 84 | size_t *arg10_ciphertext_length) |
| 85 | { |
| 86 | 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); |
| 87 | return status; |
| 88 | } |
| 89 | |
| 90 | /* Wrapper for psa_asymmetric_decrypt */ |
| 91 | psa_status_t mbedtls_test_wrap_psa_asymmetric_decrypt( |
| 92 | mbedtls_svc_key_id_t arg0_key, |
| 93 | psa_algorithm_t arg1_alg, |
| 94 | const uint8_t *arg2_input, |
| 95 | size_t arg3_input_length, |
| 96 | const uint8_t *arg4_salt, |
| 97 | size_t arg5_salt_length, |
| 98 | uint8_t *arg6_output, |
| 99 | size_t arg7_output_size, |
| 100 | size_t *arg8_output_length) |
| 101 | { |
| 102 | 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); |
| 103 | return status; |
| 104 | } |
| 105 | |
| 106 | /* Wrapper for psa_asymmetric_encrypt */ |
| 107 | psa_status_t mbedtls_test_wrap_psa_asymmetric_encrypt( |
| 108 | mbedtls_svc_key_id_t arg0_key, |
| 109 | psa_algorithm_t arg1_alg, |
| 110 | const uint8_t *arg2_input, |
| 111 | size_t arg3_input_length, |
| 112 | const uint8_t *arg4_salt, |
| 113 | size_t arg5_salt_length, |
| 114 | uint8_t *arg6_output, |
| 115 | size_t arg7_output_size, |
| 116 | size_t *arg8_output_length) |
| 117 | { |
| 118 | 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); |
| 119 | return status; |
| 120 | } |
| 121 | |
| 122 | /* Wrapper for psa_cipher_abort */ |
| 123 | psa_status_t mbedtls_test_wrap_psa_cipher_abort( |
| 124 | psa_cipher_operation_t *arg0_operation) |
| 125 | { |
| 126 | psa_status_t status = (psa_cipher_abort)(arg0_operation); |
| 127 | return status; |
| 128 | } |
| 129 | |
| 130 | /* Wrapper for psa_cipher_decrypt */ |
| 131 | psa_status_t mbedtls_test_wrap_psa_cipher_decrypt( |
| 132 | mbedtls_svc_key_id_t arg0_key, |
| 133 | psa_algorithm_t arg1_alg, |
| 134 | const uint8_t *arg2_input, |
| 135 | size_t arg3_input_length, |
| 136 | uint8_t *arg4_output, |
| 137 | size_t arg5_output_size, |
| 138 | size_t *arg6_output_length) |
| 139 | { |
| 140 | psa_status_t status = (psa_cipher_decrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length); |
| 141 | return status; |
| 142 | } |
| 143 | |
| 144 | /* Wrapper for psa_cipher_decrypt_setup */ |
| 145 | psa_status_t mbedtls_test_wrap_psa_cipher_decrypt_setup( |
| 146 | psa_cipher_operation_t *arg0_operation, |
| 147 | mbedtls_svc_key_id_t arg1_key, |
| 148 | psa_algorithm_t arg2_alg) |
| 149 | { |
| 150 | psa_status_t status = (psa_cipher_decrypt_setup)(arg0_operation, arg1_key, arg2_alg); |
| 151 | return status; |
| 152 | } |
| 153 | |
| 154 | /* Wrapper for psa_cipher_encrypt */ |
| 155 | psa_status_t mbedtls_test_wrap_psa_cipher_encrypt( |
| 156 | mbedtls_svc_key_id_t arg0_key, |
| 157 | psa_algorithm_t arg1_alg, |
| 158 | const uint8_t *arg2_input, |
| 159 | size_t arg3_input_length, |
| 160 | uint8_t *arg4_output, |
| 161 | size_t arg5_output_size, |
| 162 | size_t *arg6_output_length) |
| 163 | { |
Gilles Peskine | 42fa8ea | 2024-01-04 16:59:28 +0100 | [diff] [blame^] | 164 | MBEDTLS_TEST_MEMORY_POISON(arg2_input, arg3_input_length); |
| 165 | MBEDTLS_TEST_MEMORY_POISON(arg4_output, arg5_output_size); |
Gilles Peskine | d5e5e6d | 2024-01-04 16:42:40 +0100 | [diff] [blame] | 166 | psa_status_t status = (psa_cipher_encrypt)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_output, arg5_output_size, arg6_output_length); |
Gilles Peskine | 42fa8ea | 2024-01-04 16:59:28 +0100 | [diff] [blame^] | 167 | MBEDTLS_TEST_MEMORY_UNPOISON(arg2_input, arg3_input_length); |
| 168 | MBEDTLS_TEST_MEMORY_UNPOISON(arg4_output, arg5_output_size); |
Gilles Peskine | d5e5e6d | 2024-01-04 16:42:40 +0100 | [diff] [blame] | 169 | return status; |
| 170 | } |
| 171 | |
| 172 | /* Wrapper for psa_cipher_encrypt_setup */ |
| 173 | psa_status_t mbedtls_test_wrap_psa_cipher_encrypt_setup( |
| 174 | psa_cipher_operation_t *arg0_operation, |
| 175 | mbedtls_svc_key_id_t arg1_key, |
| 176 | psa_algorithm_t arg2_alg) |
| 177 | { |
| 178 | psa_status_t status = (psa_cipher_encrypt_setup)(arg0_operation, arg1_key, arg2_alg); |
| 179 | return status; |
| 180 | } |
| 181 | |
| 182 | /* Wrapper for psa_cipher_finish */ |
| 183 | psa_status_t mbedtls_test_wrap_psa_cipher_finish( |
| 184 | psa_cipher_operation_t *arg0_operation, |
| 185 | uint8_t *arg1_output, |
| 186 | size_t arg2_output_size, |
| 187 | size_t *arg3_output_length) |
| 188 | { |
| 189 | psa_status_t status = (psa_cipher_finish)(arg0_operation, arg1_output, arg2_output_size, arg3_output_length); |
| 190 | return status; |
| 191 | } |
| 192 | |
| 193 | /* Wrapper for psa_cipher_generate_iv */ |
| 194 | psa_status_t mbedtls_test_wrap_psa_cipher_generate_iv( |
| 195 | psa_cipher_operation_t *arg0_operation, |
| 196 | uint8_t *arg1_iv, |
| 197 | size_t arg2_iv_size, |
| 198 | size_t *arg3_iv_length) |
| 199 | { |
| 200 | psa_status_t status = (psa_cipher_generate_iv)(arg0_operation, arg1_iv, arg2_iv_size, arg3_iv_length); |
| 201 | return status; |
| 202 | } |
| 203 | |
| 204 | /* Wrapper for psa_cipher_set_iv */ |
| 205 | psa_status_t mbedtls_test_wrap_psa_cipher_set_iv( |
| 206 | psa_cipher_operation_t *arg0_operation, |
| 207 | const uint8_t *arg1_iv, |
| 208 | size_t arg2_iv_length) |
| 209 | { |
| 210 | psa_status_t status = (psa_cipher_set_iv)(arg0_operation, arg1_iv, arg2_iv_length); |
| 211 | return status; |
| 212 | } |
| 213 | |
| 214 | /* Wrapper for psa_cipher_update */ |
| 215 | psa_status_t mbedtls_test_wrap_psa_cipher_update( |
| 216 | psa_cipher_operation_t *arg0_operation, |
| 217 | const uint8_t *arg1_input, |
| 218 | size_t arg2_input_length, |
| 219 | uint8_t *arg3_output, |
| 220 | size_t arg4_output_size, |
| 221 | size_t *arg5_output_length) |
| 222 | { |
| 223 | psa_status_t status = (psa_cipher_update)(arg0_operation, arg1_input, arg2_input_length, arg3_output, arg4_output_size, arg5_output_length); |
| 224 | return status; |
| 225 | } |
| 226 | |
| 227 | /* Wrapper for psa_copy_key */ |
| 228 | psa_status_t mbedtls_test_wrap_psa_copy_key( |
| 229 | mbedtls_svc_key_id_t arg0_source_key, |
| 230 | const psa_key_attributes_t *arg1_attributes, |
| 231 | mbedtls_svc_key_id_t *arg2_target_key) |
| 232 | { |
| 233 | psa_status_t status = (psa_copy_key)(arg0_source_key, arg1_attributes, arg2_target_key); |
| 234 | return status; |
| 235 | } |
| 236 | |
| 237 | /* Wrapper for psa_crypto_init */ |
| 238 | psa_status_t mbedtls_test_wrap_psa_crypto_init(void) |
| 239 | { |
| 240 | psa_status_t status = (psa_crypto_init)(); |
| 241 | return status; |
| 242 | } |
| 243 | |
| 244 | /* Wrapper for psa_destroy_key */ |
| 245 | psa_status_t mbedtls_test_wrap_psa_destroy_key( |
| 246 | mbedtls_svc_key_id_t arg0_key) |
| 247 | { |
| 248 | psa_status_t status = (psa_destroy_key)(arg0_key); |
| 249 | return status; |
| 250 | } |
| 251 | |
| 252 | /* Wrapper for psa_export_key */ |
| 253 | psa_status_t mbedtls_test_wrap_psa_export_key( |
| 254 | mbedtls_svc_key_id_t arg0_key, |
| 255 | uint8_t *arg1_data, |
| 256 | size_t arg2_data_size, |
| 257 | size_t *arg3_data_length) |
| 258 | { |
| 259 | psa_status_t status = (psa_export_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length); |
| 260 | return status; |
| 261 | } |
| 262 | |
| 263 | /* Wrapper for psa_export_public_key */ |
| 264 | psa_status_t mbedtls_test_wrap_psa_export_public_key( |
| 265 | mbedtls_svc_key_id_t arg0_key, |
| 266 | uint8_t *arg1_data, |
| 267 | size_t arg2_data_size, |
| 268 | size_t *arg3_data_length) |
| 269 | { |
| 270 | psa_status_t status = (psa_export_public_key)(arg0_key, arg1_data, arg2_data_size, arg3_data_length); |
| 271 | return status; |
| 272 | } |
| 273 | |
| 274 | /* Wrapper for psa_generate_key */ |
| 275 | psa_status_t mbedtls_test_wrap_psa_generate_key( |
| 276 | const psa_key_attributes_t *arg0_attributes, |
| 277 | mbedtls_svc_key_id_t *arg1_key) |
| 278 | { |
| 279 | psa_status_t status = (psa_generate_key)(arg0_attributes, arg1_key); |
| 280 | return status; |
| 281 | } |
| 282 | |
| 283 | /* Wrapper for psa_generate_random */ |
| 284 | psa_status_t mbedtls_test_wrap_psa_generate_random( |
| 285 | uint8_t *arg0_output, |
| 286 | size_t arg1_output_size) |
| 287 | { |
| 288 | psa_status_t status = (psa_generate_random)(arg0_output, arg1_output_size); |
| 289 | return status; |
| 290 | } |
| 291 | |
| 292 | /* Wrapper for psa_get_key_attributes */ |
| 293 | psa_status_t mbedtls_test_wrap_psa_get_key_attributes( |
| 294 | mbedtls_svc_key_id_t arg0_key, |
| 295 | psa_key_attributes_t *arg1_attributes) |
| 296 | { |
| 297 | psa_status_t status = (psa_get_key_attributes)(arg0_key, arg1_attributes); |
| 298 | return status; |
| 299 | } |
| 300 | |
| 301 | /* Wrapper for psa_hash_abort */ |
| 302 | psa_status_t mbedtls_test_wrap_psa_hash_abort( |
| 303 | psa_hash_operation_t *arg0_operation) |
| 304 | { |
| 305 | psa_status_t status = (psa_hash_abort)(arg0_operation); |
| 306 | return status; |
| 307 | } |
| 308 | |
| 309 | /* Wrapper for psa_hash_clone */ |
| 310 | psa_status_t mbedtls_test_wrap_psa_hash_clone( |
| 311 | const psa_hash_operation_t *arg0_source_operation, |
| 312 | psa_hash_operation_t *arg1_target_operation) |
| 313 | { |
| 314 | psa_status_t status = (psa_hash_clone)(arg0_source_operation, arg1_target_operation); |
| 315 | return status; |
| 316 | } |
| 317 | |
| 318 | /* Wrapper for psa_hash_compare */ |
| 319 | psa_status_t mbedtls_test_wrap_psa_hash_compare( |
| 320 | psa_algorithm_t arg0_alg, |
| 321 | const uint8_t *arg1_input, |
| 322 | size_t arg2_input_length, |
| 323 | const uint8_t *arg3_hash, |
| 324 | size_t arg4_hash_length) |
| 325 | { |
| 326 | psa_status_t status = (psa_hash_compare)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_length); |
| 327 | return status; |
| 328 | } |
| 329 | |
| 330 | /* Wrapper for psa_hash_compute */ |
| 331 | psa_status_t mbedtls_test_wrap_psa_hash_compute( |
| 332 | psa_algorithm_t arg0_alg, |
| 333 | const uint8_t *arg1_input, |
| 334 | size_t arg2_input_length, |
| 335 | uint8_t *arg3_hash, |
| 336 | size_t arg4_hash_size, |
| 337 | size_t *arg5_hash_length) |
| 338 | { |
| 339 | psa_status_t status = (psa_hash_compute)(arg0_alg, arg1_input, arg2_input_length, arg3_hash, arg4_hash_size, arg5_hash_length); |
| 340 | return status; |
| 341 | } |
| 342 | |
| 343 | /* Wrapper for psa_hash_finish */ |
| 344 | psa_status_t mbedtls_test_wrap_psa_hash_finish( |
| 345 | psa_hash_operation_t *arg0_operation, |
| 346 | uint8_t *arg1_hash, |
| 347 | size_t arg2_hash_size, |
| 348 | size_t *arg3_hash_length) |
| 349 | { |
| 350 | psa_status_t status = (psa_hash_finish)(arg0_operation, arg1_hash, arg2_hash_size, arg3_hash_length); |
| 351 | return status; |
| 352 | } |
| 353 | |
| 354 | /* Wrapper for psa_hash_setup */ |
| 355 | psa_status_t mbedtls_test_wrap_psa_hash_setup( |
| 356 | psa_hash_operation_t *arg0_operation, |
| 357 | psa_algorithm_t arg1_alg) |
| 358 | { |
| 359 | psa_status_t status = (psa_hash_setup)(arg0_operation, arg1_alg); |
| 360 | return status; |
| 361 | } |
| 362 | |
| 363 | /* Wrapper for psa_hash_update */ |
| 364 | psa_status_t mbedtls_test_wrap_psa_hash_update( |
| 365 | psa_hash_operation_t *arg0_operation, |
| 366 | const uint8_t *arg1_input, |
| 367 | size_t arg2_input_length) |
| 368 | { |
| 369 | psa_status_t status = (psa_hash_update)(arg0_operation, arg1_input, arg2_input_length); |
| 370 | return status; |
| 371 | } |
| 372 | |
| 373 | /* Wrapper for psa_hash_verify */ |
| 374 | psa_status_t mbedtls_test_wrap_psa_hash_verify( |
| 375 | psa_hash_operation_t *arg0_operation, |
| 376 | const uint8_t *arg1_hash, |
| 377 | size_t arg2_hash_length) |
| 378 | { |
| 379 | psa_status_t status = (psa_hash_verify)(arg0_operation, arg1_hash, arg2_hash_length); |
| 380 | return status; |
| 381 | } |
| 382 | |
| 383 | /* Wrapper for psa_import_key */ |
| 384 | psa_status_t mbedtls_test_wrap_psa_import_key( |
| 385 | const psa_key_attributes_t *arg0_attributes, |
| 386 | const uint8_t *arg1_data, |
| 387 | size_t arg2_data_length, |
| 388 | mbedtls_svc_key_id_t *arg3_key) |
| 389 | { |
| 390 | psa_status_t status = (psa_import_key)(arg0_attributes, arg1_data, arg2_data_length, arg3_key); |
| 391 | return status; |
| 392 | } |
| 393 | |
| 394 | /* Wrapper for psa_key_derivation_abort */ |
| 395 | psa_status_t mbedtls_test_wrap_psa_key_derivation_abort( |
| 396 | psa_key_derivation_operation_t *arg0_operation) |
| 397 | { |
| 398 | psa_status_t status = (psa_key_derivation_abort)(arg0_operation); |
| 399 | return status; |
| 400 | } |
| 401 | |
| 402 | /* Wrapper for psa_key_derivation_get_capacity */ |
| 403 | psa_status_t mbedtls_test_wrap_psa_key_derivation_get_capacity( |
| 404 | const psa_key_derivation_operation_t *arg0_operation, |
| 405 | size_t *arg1_capacity) |
| 406 | { |
| 407 | psa_status_t status = (psa_key_derivation_get_capacity)(arg0_operation, arg1_capacity); |
| 408 | return status; |
| 409 | } |
| 410 | |
| 411 | /* Wrapper for psa_key_derivation_input_bytes */ |
| 412 | psa_status_t mbedtls_test_wrap_psa_key_derivation_input_bytes( |
| 413 | psa_key_derivation_operation_t *arg0_operation, |
| 414 | psa_key_derivation_step_t arg1_step, |
| 415 | const uint8_t *arg2_data, |
| 416 | size_t arg3_data_length) |
| 417 | { |
| 418 | psa_status_t status = (psa_key_derivation_input_bytes)(arg0_operation, arg1_step, arg2_data, arg3_data_length); |
| 419 | return status; |
| 420 | } |
| 421 | |
| 422 | /* Wrapper for psa_key_derivation_input_key */ |
| 423 | psa_status_t mbedtls_test_wrap_psa_key_derivation_input_key( |
| 424 | psa_key_derivation_operation_t *arg0_operation, |
| 425 | psa_key_derivation_step_t arg1_step, |
| 426 | mbedtls_svc_key_id_t arg2_key) |
| 427 | { |
| 428 | psa_status_t status = (psa_key_derivation_input_key)(arg0_operation, arg1_step, arg2_key); |
| 429 | return status; |
| 430 | } |
| 431 | |
| 432 | /* Wrapper for psa_key_derivation_key_agreement */ |
| 433 | psa_status_t mbedtls_test_wrap_psa_key_derivation_key_agreement( |
| 434 | psa_key_derivation_operation_t *arg0_operation, |
| 435 | psa_key_derivation_step_t arg1_step, |
| 436 | mbedtls_svc_key_id_t arg2_private_key, |
| 437 | const uint8_t *arg3_peer_key, |
| 438 | size_t arg4_peer_key_length) |
| 439 | { |
| 440 | psa_status_t status = (psa_key_derivation_key_agreement)(arg0_operation, arg1_step, arg2_private_key, arg3_peer_key, arg4_peer_key_length); |
| 441 | return status; |
| 442 | } |
| 443 | |
| 444 | /* Wrapper for psa_key_derivation_output_bytes */ |
| 445 | psa_status_t mbedtls_test_wrap_psa_key_derivation_output_bytes( |
| 446 | psa_key_derivation_operation_t *arg0_operation, |
| 447 | uint8_t *arg1_output, |
| 448 | size_t arg2_output_length) |
| 449 | { |
| 450 | psa_status_t status = (psa_key_derivation_output_bytes)(arg0_operation, arg1_output, arg2_output_length); |
| 451 | return status; |
| 452 | } |
| 453 | |
| 454 | /* Wrapper for psa_key_derivation_output_key */ |
| 455 | psa_status_t mbedtls_test_wrap_psa_key_derivation_output_key( |
| 456 | const psa_key_attributes_t *arg0_attributes, |
| 457 | psa_key_derivation_operation_t *arg1_operation, |
| 458 | mbedtls_svc_key_id_t *arg2_key) |
| 459 | { |
| 460 | psa_status_t status = (psa_key_derivation_output_key)(arg0_attributes, arg1_operation, arg2_key); |
| 461 | return status; |
| 462 | } |
| 463 | |
| 464 | /* Wrapper for psa_key_derivation_set_capacity */ |
| 465 | psa_status_t mbedtls_test_wrap_psa_key_derivation_set_capacity( |
| 466 | psa_key_derivation_operation_t *arg0_operation, |
| 467 | size_t arg1_capacity) |
| 468 | { |
| 469 | psa_status_t status = (psa_key_derivation_set_capacity)(arg0_operation, arg1_capacity); |
| 470 | return status; |
| 471 | } |
| 472 | |
| 473 | /* Wrapper for psa_key_derivation_setup */ |
| 474 | psa_status_t mbedtls_test_wrap_psa_key_derivation_setup( |
| 475 | psa_key_derivation_operation_t *arg0_operation, |
| 476 | psa_algorithm_t arg1_alg) |
| 477 | { |
| 478 | psa_status_t status = (psa_key_derivation_setup)(arg0_operation, arg1_alg); |
| 479 | return status; |
| 480 | } |
| 481 | |
| 482 | /* Wrapper for psa_mac_abort */ |
| 483 | psa_status_t mbedtls_test_wrap_psa_mac_abort( |
| 484 | psa_mac_operation_t *arg0_operation) |
| 485 | { |
| 486 | psa_status_t status = (psa_mac_abort)(arg0_operation); |
| 487 | return status; |
| 488 | } |
| 489 | |
| 490 | /* Wrapper for psa_mac_compute */ |
| 491 | psa_status_t mbedtls_test_wrap_psa_mac_compute( |
| 492 | mbedtls_svc_key_id_t arg0_key, |
| 493 | psa_algorithm_t arg1_alg, |
| 494 | const uint8_t *arg2_input, |
| 495 | size_t arg3_input_length, |
| 496 | uint8_t *arg4_mac, |
| 497 | size_t arg5_mac_size, |
| 498 | size_t *arg6_mac_length) |
| 499 | { |
| 500 | psa_status_t status = (psa_mac_compute)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_size, arg6_mac_length); |
| 501 | return status; |
| 502 | } |
| 503 | |
| 504 | /* Wrapper for psa_mac_sign_finish */ |
| 505 | psa_status_t mbedtls_test_wrap_psa_mac_sign_finish( |
| 506 | psa_mac_operation_t *arg0_operation, |
| 507 | uint8_t *arg1_mac, |
| 508 | size_t arg2_mac_size, |
| 509 | size_t *arg3_mac_length) |
| 510 | { |
| 511 | psa_status_t status = (psa_mac_sign_finish)(arg0_operation, arg1_mac, arg2_mac_size, arg3_mac_length); |
| 512 | return status; |
| 513 | } |
| 514 | |
| 515 | /* Wrapper for psa_mac_sign_setup */ |
| 516 | psa_status_t mbedtls_test_wrap_psa_mac_sign_setup( |
| 517 | psa_mac_operation_t *arg0_operation, |
| 518 | mbedtls_svc_key_id_t arg1_key, |
| 519 | psa_algorithm_t arg2_alg) |
| 520 | { |
| 521 | psa_status_t status = (psa_mac_sign_setup)(arg0_operation, arg1_key, arg2_alg); |
| 522 | return status; |
| 523 | } |
| 524 | |
| 525 | /* Wrapper for psa_mac_update */ |
| 526 | psa_status_t mbedtls_test_wrap_psa_mac_update( |
| 527 | psa_mac_operation_t *arg0_operation, |
| 528 | const uint8_t *arg1_input, |
| 529 | size_t arg2_input_length) |
| 530 | { |
| 531 | psa_status_t status = (psa_mac_update)(arg0_operation, arg1_input, arg2_input_length); |
| 532 | return status; |
| 533 | } |
| 534 | |
| 535 | /* Wrapper for psa_mac_verify */ |
| 536 | psa_status_t mbedtls_test_wrap_psa_mac_verify( |
| 537 | mbedtls_svc_key_id_t arg0_key, |
| 538 | psa_algorithm_t arg1_alg, |
| 539 | const uint8_t *arg2_input, |
| 540 | size_t arg3_input_length, |
| 541 | const uint8_t *arg4_mac, |
| 542 | size_t arg5_mac_length) |
| 543 | { |
| 544 | psa_status_t status = (psa_mac_verify)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_mac, arg5_mac_length); |
| 545 | return status; |
| 546 | } |
| 547 | |
| 548 | /* Wrapper for psa_mac_verify_finish */ |
| 549 | psa_status_t mbedtls_test_wrap_psa_mac_verify_finish( |
| 550 | psa_mac_operation_t *arg0_operation, |
| 551 | const uint8_t *arg1_mac, |
| 552 | size_t arg2_mac_length) |
| 553 | { |
| 554 | psa_status_t status = (psa_mac_verify_finish)(arg0_operation, arg1_mac, arg2_mac_length); |
| 555 | return status; |
| 556 | } |
| 557 | |
| 558 | /* Wrapper for psa_mac_verify_setup */ |
| 559 | psa_status_t mbedtls_test_wrap_psa_mac_verify_setup( |
| 560 | psa_mac_operation_t *arg0_operation, |
| 561 | mbedtls_svc_key_id_t arg1_key, |
| 562 | psa_algorithm_t arg2_alg) |
| 563 | { |
| 564 | psa_status_t status = (psa_mac_verify_setup)(arg0_operation, arg1_key, arg2_alg); |
| 565 | return status; |
| 566 | } |
| 567 | |
| 568 | /* Wrapper for psa_purge_key */ |
| 569 | psa_status_t mbedtls_test_wrap_psa_purge_key( |
| 570 | mbedtls_svc_key_id_t arg0_key) |
| 571 | { |
| 572 | psa_status_t status = (psa_purge_key)(arg0_key); |
| 573 | return status; |
| 574 | } |
| 575 | |
| 576 | /* Wrapper for psa_raw_key_agreement */ |
| 577 | psa_status_t mbedtls_test_wrap_psa_raw_key_agreement( |
| 578 | psa_algorithm_t arg0_alg, |
| 579 | mbedtls_svc_key_id_t arg1_private_key, |
| 580 | const uint8_t *arg2_peer_key, |
| 581 | size_t arg3_peer_key_length, |
| 582 | uint8_t *arg4_output, |
| 583 | size_t arg5_output_size, |
| 584 | size_t *arg6_output_length) |
| 585 | { |
| 586 | 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); |
| 587 | return status; |
| 588 | } |
| 589 | |
| 590 | /* Wrapper for psa_sign_hash */ |
| 591 | psa_status_t mbedtls_test_wrap_psa_sign_hash( |
| 592 | mbedtls_svc_key_id_t arg0_key, |
| 593 | psa_algorithm_t arg1_alg, |
| 594 | const uint8_t *arg2_hash, |
| 595 | size_t arg3_hash_length, |
| 596 | uint8_t *arg4_signature, |
| 597 | size_t arg5_signature_size, |
| 598 | size_t *arg6_signature_length) |
| 599 | { |
| 600 | psa_status_t status = (psa_sign_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_size, arg6_signature_length); |
| 601 | return status; |
| 602 | } |
| 603 | |
| 604 | /* Wrapper for psa_sign_message */ |
| 605 | psa_status_t mbedtls_test_wrap_psa_sign_message( |
| 606 | mbedtls_svc_key_id_t arg0_key, |
| 607 | psa_algorithm_t arg1_alg, |
| 608 | const uint8_t *arg2_input, |
| 609 | size_t arg3_input_length, |
| 610 | uint8_t *arg4_signature, |
| 611 | size_t arg5_signature_size, |
| 612 | size_t *arg6_signature_length) |
| 613 | { |
| 614 | psa_status_t status = (psa_sign_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_size, arg6_signature_length); |
| 615 | return status; |
| 616 | } |
| 617 | |
| 618 | /* Wrapper for psa_verify_hash */ |
| 619 | psa_status_t mbedtls_test_wrap_psa_verify_hash( |
| 620 | mbedtls_svc_key_id_t arg0_key, |
| 621 | psa_algorithm_t arg1_alg, |
| 622 | const uint8_t *arg2_hash, |
| 623 | size_t arg3_hash_length, |
| 624 | const uint8_t *arg4_signature, |
| 625 | size_t arg5_signature_length) |
| 626 | { |
| 627 | psa_status_t status = (psa_verify_hash)(arg0_key, arg1_alg, arg2_hash, arg3_hash_length, arg4_signature, arg5_signature_length); |
| 628 | return status; |
| 629 | } |
| 630 | |
| 631 | /* Wrapper for psa_verify_message */ |
| 632 | psa_status_t mbedtls_test_wrap_psa_verify_message( |
| 633 | mbedtls_svc_key_id_t arg0_key, |
| 634 | psa_algorithm_t arg1_alg, |
| 635 | const uint8_t *arg2_input, |
| 636 | size_t arg3_input_length, |
| 637 | const uint8_t *arg4_signature, |
| 638 | size_t arg5_signature_length) |
| 639 | { |
| 640 | psa_status_t status = (psa_verify_message)(arg0_key, arg1_alg, arg2_input, arg3_input_length, arg4_signature, arg5_signature_length); |
| 641 | return status; |
| 642 | } |
| 643 | |
| 644 | #endif /* defined(MBEDTLS_PSA_CRYPTO_C) && defined(MBEDTLS_TEST_HOOKS) */ |
| 645 | |
| 646 | /* End of automatically generated file. */ |