Home
last modified time | relevance | path

Searched refs:status (Results 1 – 25 of 195) sorted by relevance

12345678

/openthread-latest/third_party/mbedtls/repo/library/
Dpsa_crypto_slot_management.c109 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_get_and_lock_key_slot_in_memory() local
121 status = PSA_SUCCESS; in psa_get_and_lock_key_slot_in_memory()
123 status = PSA_ERROR_DOES_NOT_EXIST; in psa_get_and_lock_key_slot_in_memory()
138 status = (slot_idx < MBEDTLS_PSA_KEY_SLOT_COUNT) ? in psa_get_and_lock_key_slot_in_memory()
142 if (status == PSA_SUCCESS) { in psa_get_and_lock_key_slot_in_memory()
143 status = psa_register_read(slot); in psa_get_and_lock_key_slot_in_memory()
144 if (status == PSA_SUCCESS) { in psa_get_and_lock_key_slot_in_memory()
149 return status; in psa_get_and_lock_key_slot_in_memory()
180 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_reserve_free_key_slot() local
185 status = PSA_ERROR_BAD_STATE; in psa_reserve_free_key_slot()
[all …]
Dpsa_crypto.c199 status = psa_crypto_local_input_alloc(input, length, \
201 if (status != PSA_SUCCESS) { \
241 status = psa_crypto_local_output_alloc(output, length, \
243 if (status != PSA_SUCCESS) { \
265 status = local_output_status; \
590 static void psa_wipe_tag_output_buffer(uint8_t *output_buffer, psa_status_t status, in psa_wipe_tag_output_buffer() argument
601 if (status == PSA_SUCCESS) { in psa_wipe_tag_output_buffer()
725 psa_status_t status = psa_allocate_buffer_to_slot(slot, in psa_copy_key_material_into_slot() local
727 if (status != PSA_SUCCESS) { in psa_copy_key_material_into_slot()
728 return status; in psa_copy_key_material_into_slot()
[all …]
Dpsa_crypto_ecp.c96 psa_status_t status; in mbedtls_psa_ecp_load_representation() local
140 status = check_ecc_parameters(PSA_KEY_TYPE_ECC_GET_FAMILY(type), &curve_bits); in mbedtls_psa_ecp_load_representation()
141 if (status != PSA_SUCCESS) { in mbedtls_psa_ecp_load_representation()
149 status = PSA_ERROR_NOT_SUPPORTED; in mbedtls_psa_ecp_load_representation()
153 status = mbedtls_to_psa_error( in mbedtls_psa_ecp_load_representation()
155 if (status != PSA_SUCCESS) { in mbedtls_psa_ecp_load_representation()
162 status = mbedtls_to_psa_error( in mbedtls_psa_ecp_load_representation()
166 if (status != PSA_SUCCESS) { in mbedtls_psa_ecp_load_representation()
171 status = mbedtls_to_psa_error( in mbedtls_psa_ecp_load_representation()
173 if (status != PSA_SUCCESS) { in mbedtls_psa_ecp_load_representation()
[all …]
Dpsa_crypto_rsa.c46 psa_status_t status; in psa_check_rsa_key_byte_aligned() local
48 status = mbedtls_to_psa_error( in psa_check_rsa_key_byte_aligned()
50 if (status == PSA_SUCCESS) { in psa_check_rsa_key_byte_aligned()
52 status = PSA_ERROR_NOT_SUPPORTED; in psa_check_rsa_key_byte_aligned()
56 return status; in psa_check_rsa_key_byte_aligned()
63 psa_status_t status; in mbedtls_psa_rsa_load_representation() local
74 status = mbedtls_to_psa_error(mbedtls_rsa_parse_key(*p_rsa, data, data_length)); in mbedtls_psa_rsa_load_representation()
76 status = mbedtls_to_psa_error(mbedtls_rsa_parse_pubkey(*p_rsa, data, data_length)); in mbedtls_psa_rsa_load_representation()
78 if (status != PSA_SUCCESS) { in mbedtls_psa_rsa_load_representation()
87 status = PSA_ERROR_NOT_SUPPORTED; in mbedtls_psa_rsa_load_representation()
[all …]
Dpsa_crypto_storage.c79 psa_status_t status; in psa_crypto_storage_load() local
84 status = psa_its_get_info(data_identifier, &data_identifier_info); in psa_crypto_storage_load()
85 if (status != PSA_SUCCESS) { in psa_crypto_storage_load()
86 return status; in psa_crypto_storage_load()
89 status = psa_its_get(data_identifier, 0, (uint32_t) data_size, data, &data_length); in psa_crypto_storage_load()
94 return status; in psa_crypto_storage_load()
132 psa_status_t status; in psa_crypto_storage_store() local
140 status = psa_its_set(data_identifier, (uint32_t) data_length, data, 0); in psa_crypto_storage_store()
141 if (status != PSA_SUCCESS) { in psa_crypto_storage_store()
145 status = psa_its_get_info(data_identifier, &data_identifier_info); in psa_crypto_storage_store()
[all …]
Dpsa_crypto_driver_wrappers.h74 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_driver_wrapper_init() local
77 status = psa_init_all_se_drivers( ); in psa_driver_wrapper_init()
78 if( status != PSA_SUCCESS ) in psa_driver_wrapper_init()
79 return( status ); in psa_driver_wrapper_init()
83 status = mbedtls_test_transparent_init( ); in psa_driver_wrapper_init()
84 if( status != PSA_SUCCESS ) in psa_driver_wrapper_init()
85 return( status ); in psa_driver_wrapper_init()
87 status = mbedtls_test_opaque_init( ); in psa_driver_wrapper_init()
88 if( status != PSA_SUCCESS ) in psa_driver_wrapper_init()
89 return( status ); in psa_driver_wrapper_init()
[all …]
Dpsa_crypto_aead.c33 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_aead_setup() local
39 status = mbedtls_cipher_values_from_psa(alg, attributes->type, in psa_aead_setup()
41 if (status != PSA_SUCCESS) { in psa_aead_setup()
42 return status; in psa_aead_setup()
57 status = mbedtls_to_psa_error( in psa_aead_setup()
60 if (status != PSA_SUCCESS) { in psa_aead_setup()
61 return status; in psa_aead_setup()
77 status = mbedtls_to_psa_error( in psa_aead_setup()
80 if (status != PSA_SUCCESS) { in psa_aead_setup()
81 return status; in psa_aead_setup()
[all …]
Dpsa_crypto_mac.c41 psa_status_t status; in psa_hmac_setup_internal() local
62 status = psa_hash_compute(hash_alg, key, key_length, in psa_hmac_setup_internal()
64 if (status != PSA_SUCCESS) { in psa_hmac_setup_internal()
90 status = psa_hash_setup(&hmac->hash_ctx, hash_alg); in psa_hmac_setup_internal()
91 if (status != PSA_SUCCESS) { in psa_hmac_setup_internal()
95 status = psa_hash_update(&hmac->hash_ctx, ipad, block_size); in psa_hmac_setup_internal()
100 return status; in psa_hmac_setup_internal()
120 psa_status_t status; in psa_hmac_finish_internal() local
122 status = psa_hash_finish(&hmac->hash_ctx, tmp, sizeof(tmp), &hash_size); in psa_hmac_finish_internal()
123 if (status != PSA_SUCCESS) { in psa_hmac_finish_internal()
[all …]
Dssl_cookie.c30 static int local_err_translation(psa_status_t status) in local_err_translation() argument
32 return psa_status_to_mbedtls(status, psa_to_ssl_errors, in local_err_translation()
36 #define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status) argument
106 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_cookie_setup() local
126 if ((status = psa_generate_key(&attributes, in mbedtls_ssl_cookie_setup()
128 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_cookie_setup()
191 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_cookie_write() local
214 status = psa_mac_sign_setup(&operation, ctx->psa_hmac_key, in mbedtls_ssl_cookie_write()
216 if (status != PSA_SUCCESS) { in mbedtls_ssl_cookie_write()
217 ret = PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_cookie_write()
[all …]
Dlmots.c38 static int local_err_translation(psa_status_t status) in local_err_translation() argument
40 return psa_status_to_mbedtls(status, psa_to_lms_errors, in local_err_translation()
44 #define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status) argument
126 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in create_digit_array_with_checksum() local
130 status = psa_hash_setup(&op, PSA_ALG_SHA_256); in create_digit_array_with_checksum()
131 if (status != PSA_SUCCESS) { in create_digit_array_with_checksum()
135 status = psa_hash_update(&op, params->I_key_identifier, in create_digit_array_with_checksum()
137 if (status != PSA_SUCCESS) { in create_digit_array_with_checksum()
141 status = psa_hash_update(&op, params->q_leaf_identifier, in create_digit_array_with_checksum()
143 if (status != PSA_SUCCESS) { in create_digit_array_with_checksum()
[all …]
Dpsa_crypto_pake.c158 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_psa_pake_setup() local
164 status = psa_crypto_driver_pake_get_password_len(inputs, &password_len); in mbedtls_psa_pake_setup()
165 if (status != PSA_SUCCESS) { in mbedtls_psa_pake_setup()
166 return status; in mbedtls_psa_pake_setup()
169 status = psa_crypto_driver_pake_get_user_len(inputs, &user_len); in mbedtls_psa_pake_setup()
170 if (status != PSA_SUCCESS) { in mbedtls_psa_pake_setup()
171 return status; in mbedtls_psa_pake_setup()
174 status = psa_crypto_driver_pake_get_peer_len(inputs, &peer_len); in mbedtls_psa_pake_setup()
175 if (status != PSA_SUCCESS) { in mbedtls_psa_pake_setup()
176 return status; in mbedtls_psa_pake_setup()
[all …]
Dpsa_crypto_se.c128 psa_status_t status; in psa_load_se_persistent_data() local
132 status = psa_get_se_driver_its_file_uid(driver, &uid); in psa_load_se_persistent_data()
133 if (status != PSA_SUCCESS) { in psa_load_se_persistent_data()
134 return status; in psa_load_se_persistent_data()
153 psa_status_t status; in psa_save_se_persistent_data() local
156 status = psa_get_se_driver_its_file_uid(driver, &uid); in psa_save_se_persistent_data()
157 if (status != PSA_SUCCESS) { in psa_save_se_persistent_data()
158 return status; in psa_save_se_persistent_data()
186 psa_status_t status; in psa_find_se_slot_for_key() local
210 status = p_validate_slot_number(&driver->u.context, in psa_find_se_slot_for_key()
[all …]
Dpsa_crypto_cipher.c265 psa_status_t status; in mbedtls_cipher_info_from_psa() local
268 status = mbedtls_cipher_values_from_psa(alg, key_type, &key_bits, &mode, &cipher_id_tmp); in mbedtls_cipher_info_from_psa()
269 if (status != PSA_SUCCESS) { in mbedtls_cipher_info_from_psa()
426 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_cipher_update_ecb() local
432 status = PSA_SUCCESS; in psa_cipher_update_ecb()
451 status = mbedtls_to_psa_error( in psa_cipher_update_ecb()
457 if (status != PSA_SUCCESS) { in psa_cipher_update_ecb()
469 status = mbedtls_to_psa_error( in psa_cipher_update_ecb()
474 if (status != PSA_SUCCESS) { in psa_cipher_update_ecb()
492 status = PSA_SUCCESS; in psa_cipher_update_ecb()
[all …]
Dpk_wrap.c73 psa_status_t status; in rsa_verify_wrap() local
105 status = psa_import_key(&attributes, in rsa_verify_wrap()
108 if (status != PSA_SUCCESS) { in rsa_verify_wrap()
109 ret = PSA_PK_TO_MBEDTLS_ERR(status); in rsa_verify_wrap()
113 status = psa_verify_hash(key_id, psa_alg_md, hash, hash_len, in rsa_verify_wrap()
115 if (status != PSA_SUCCESS) { in rsa_verify_wrap()
116 ret = PSA_PK_RSA_TO_MBEDTLS_ERR(status); in rsa_verify_wrap()
122 status = psa_destroy_key(key_id); in rsa_verify_wrap()
123 if (ret == 0 && status != PSA_SUCCESS) { in rsa_verify_wrap()
124 ret = PSA_PK_TO_MBEDTLS_ERR(status); in rsa_verify_wrap()
[all …]
Dpsa_its_file.c110 psa_status_t status; in psa_its_get_info() local
112 status = psa_its_read_file(uid, p_info, &stream); in psa_its_get_info()
116 return status; in psa_its_get_info()
125 psa_status_t status; in psa_its_get() local
130 status = psa_its_read_file(uid, &info, &stream); in psa_its_get()
131 if (status != PSA_SUCCESS) { in psa_its_get()
134 status = PSA_ERROR_INVALID_ARGUMENT; in psa_its_get()
147 status = PSA_ERROR_STORAGE_FAILURE; in psa_its_get()
163 status = PSA_SUCCESS; in psa_its_get()
172 return status; in psa_its_get()
[all …]
Dssl_tls13_keys.c29 static int local_err_translation(psa_status_t status) in local_err_translation() argument
31 return psa_status_to_mbedtls(status, psa_to_ssl_errors, in local_err_translation()
35 #define PSA_TO_MBEDTLS_ERR(status) local_err_translation(status) argument
149 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_tls13_hkdf_expand_label() local
181 status = psa_key_derivation_setup(&operation, PSA_ALG_HKDF_EXPAND(hash_alg)); in mbedtls_ssl_tls13_hkdf_expand_label()
183 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
187 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label()
192 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
196 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label()
201 if (status != PSA_SUCCESS) { in mbedtls_ssl_tls13_hkdf_expand_label()
[all …]
/openthread-latest/third_party/mbedtls/repo/programs/psa/
Dcrypto_examples.c57 psa_status_t status; in cipher_operation() local
66 status = psa_cipher_update(operation, input + bytes_written, in cipher_operation()
69 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_operation()
75 status = psa_cipher_finish(operation, output + *output_len, in cipher_operation()
77 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_operation()
81 return status; in cipher_operation()
95 psa_status_t status; in cipher_encrypt() local
100 status = psa_cipher_encrypt_setup(&operation, key, alg); in cipher_encrypt()
101 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_encrypt()
103 status = psa_cipher_generate_iv(&operation, iv, iv_size, &iv_len); in cipher_encrypt()
[all …]
Dpsa_hash.c61 psa_status_t status; in main() local
69 status = psa_crypto_init(); in main()
70 if (status != PSA_SUCCESS) { in main()
76 status = psa_hash_setup(&hash_operation, HASH_ALG); in main()
77 if (status == PSA_ERROR_NOT_SUPPORTED) { in main()
80 } else if (status != PSA_SUCCESS) { in main()
85 status = psa_hash_update(&hash_operation, sample_message, sample_message_length); in main()
86 if (status != PSA_SUCCESS) { in main()
91 status = psa_hash_clone(&hash_operation, &cloned_hash_operation); in main()
92 if (status != PSA_SUCCESS) { in main()
[all …]
Dkey_ladder_demo.c77 status = DEMO_ERROR; \
87 status = (expr); \
88 if (status != PSA_SUCCESS) \
91 (int) status, \
158 psa_status_t status = PSA_SUCCESS; in save_key() local
177 return status; in save_key()
187 psa_status_t status = PSA_SUCCESS; in generate() local
203 return status; in generate()
216 psa_status_t status = PSA_SUCCESS; in import_key_from_file() local
231 status = DEMO_ERROR; in import_key_from_file()
[all …]
Dhmac_demo.c77 status = (expr); \
78 if (status != PSA_SUCCESS) \
81 (int) status, \
95 psa_status_t status; in hmac_demo() local
110 status = psa_import_key(&attributes, in hmac_demo()
112 if (status != PSA_SUCCESS) { in hmac_demo()
113 return status; in hmac_demo()
139 return status; in hmac_demo()
144 psa_status_t status = PSA_SUCCESS; in main() local
156 return status == PSA_SUCCESS ? EXIT_SUCCESS : EXIT_FAILURE; in main()
/openthread-latest/third_party/mbedtls/repo/tests/src/
Dpsa_test_wrappers.c24 psa_status_t status = (mbedtls_psa_inject_entropy)(arg0_seed, arg1_seed_size); in mbedtls_test_wrap_mbedtls_psa_inject_entropy() local
25 return status; in mbedtls_test_wrap_mbedtls_psa_inject_entropy()
36 …psa_status_t status = (mbedtls_psa_platform_get_builtin_key)(arg0_key_id, arg1_lifetime, arg2_slot… in mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key() local
37 return status; in mbedtls_test_wrap_mbedtls_psa_platform_get_builtin_key()
46 psa_status_t status = (mbedtls_psa_register_se_key)(arg0_attributes); in mbedtls_test_wrap_mbedtls_psa_register_se_key() local
47 return status; in mbedtls_test_wrap_mbedtls_psa_register_se_key()
55 psa_status_t status = (psa_aead_abort)(arg0_operation); in mbedtls_test_wrap_psa_aead_abort() local
56 return status; in mbedtls_test_wrap_psa_aead_abort()
79 …psa_status_t status = (psa_aead_decrypt)(arg0_key, arg1_alg, arg2_nonce, arg3_nonce_length, arg4_a… in mbedtls_test_wrap_psa_aead_decrypt() local
86 return status; in mbedtls_test_wrap_psa_aead_decrypt()
[all …]
Dpsa_exercise_key.c50 psa_status_t status = psa_get_key_attributes(key, &attributes); in check_key_attributes_sanity() local
51 if (key_destroyable && status == PSA_ERROR_INVALID_HANDLE) { in check_key_attributes_sanity()
56 PSA_ASSERT(status); in check_key_attributes_sanity()
79 status = psa_get_key_slot_number(&attributes, &slot_number); in check_key_attributes_sanity()
84 TEST_EQUAL(status, 0); in check_key_attributes_sanity()
87 TEST_EQUAL(status, PSA_ERROR_INVALID_ARGUMENT); in check_key_attributes_sanity()
129 psa_status_t status = PSA_SUCCESS; in exercise_mac_key() local
136 status = psa_mac_sign_setup(&operation, key, alg); in exercise_mac_key()
137 if (key_destroyable && status == PSA_ERROR_INVALID_HANDLE) { in exercise_mac_key()
142 PSA_ASSERT(status); in exercise_mac_key()
[all …]
/openthread-latest/third_party/mbedtls/repo/scripts/data_files/driver_templates/
Dpsa_crypto_driver_wrappers.h.jinja75 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
78 status = psa_init_all_se_drivers( );
79 if( status != PSA_SUCCESS )
80 return( status );
84 status = mbedtls_test_transparent_init( );
85 if( status != PSA_SUCCESS )
86 return( status );
88 status = mbedtls_test_opaque_init( );
89 if( status != PSA_SUCCESS )
90 return( status );
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_psa_crypto_entropy.function43 psa_status_t status = psa_its_get_info(PSA_CRYPTO_ITS_RANDOM_SEED_UID,
47 TEST_EQUAL(status, PSA_ERROR_DOES_NOT_EXIST);
49 TEST_EQUAL(status, PSA_SUCCESS);
155 psa_status_t status;
171 status = remove_seed_file();
172 TEST_ASSERT((status == PSA_SUCCESS) ||
173 (status == PSA_ERROR_DOES_NOT_EXIST));
178 status = mbedtls_psa_inject_entropy(seed, seed_length_a);
179 TEST_EQUAL(status, expected_status_a);
185 status = mbedtls_psa_inject_entropy(seed, seed_length_b);
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/src/drivers/
Dtest_driver_key_management.c57 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_test_transparent_init() local
60 status = libtestdriver1_psa_crypto_init(); in mbedtls_test_transparent_init()
61 if (status != PSA_SUCCESS) { in mbedtls_test_transparent_init()
62 return status; in mbedtls_test_transparent_init()
66 (void) status; in mbedtls_test_transparent_init()
355 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_test_opaque_import_key() local
376 status = psa_validate_unstructured_key_bit_size(type, in mbedtls_test_opaque_import_key()
378 if (status != PSA_SUCCESS) { in mbedtls_test_opaque_import_key()
393 status = libtestdriver1_mbedtls_psa_ecp_import_key( in mbedtls_test_opaque_import_key()
400 status = mbedtls_psa_ecp_import_key( in mbedtls_test_opaque_import_key()
[all …]

12345678