| /optee_os/core/drivers/crypto/se050/adaptors/apis/ |
| H A D | user.c | 16 sss_status_t status = kStatus_SSS_Fail; in alloc_scp_key_to_auth() local 21 status = sss_host_key_object_init(k_object, k_store); in alloc_scp_key_to_auth() 22 if (status != kStatus_SSS_Success) in alloc_scp_key_to_auth() 23 return status; in alloc_scp_key_to_auth() 37 sss_status_t status = kStatus_SSS_Fail; in prepare_host_scp() local 52 status = alloc_scp_key_to_auth(&pStatic_ctx->Enc, k_store, oid++); in prepare_host_scp() 53 if (status != kStatus_SSS_Success) in prepare_host_scp() 54 return status; in prepare_host_scp() 57 status = sss_host_key_store_set_key(k_store, &pStatic_ctx->Enc, in prepare_host_scp() 59 if (status != kStatus_SSS_Success) in prepare_host_scp() [all …]
|
| H A D | sss.c | 56 sss_status_t status = kStatus_SSS_Fail; in se050_rotate_scp03_keys() local 67 status = se050_scp03_get_keys(&new_keys, SCP03_OFID); in se050_rotate_scp03_keys() 68 if (status != kStatus_SSS_Success) in se050_rotate_scp03_keys() 69 return status; in se050_rotate_scp03_keys() 72 status = se050_scp03_subkey_derive(&new_keys); in se050_rotate_scp03_keys() 73 if (status != kStatus_SSS_Success) in se050_rotate_scp03_keys() 74 return status; in se050_rotate_scp03_keys() 77 status = se050_scp03_get_current_keys(&cur_keys); in se050_rotate_scp03_keys() 78 if (status != kStatus_SSS_Success) in se050_rotate_scp03_keys() 79 return status; in se050_rotate_scp03_keys() [all …]
|
| H A D | apdu.c | 27 smStatus_t status = SM_OK; in se050_key_exists() local 32 status = Se05x_API_CheckObjectExists(ctx, key_id, &inuse); in se050_key_exists() 33 if (status != SM_OK) in se050_key_exists() 50 smStatus_t status = SM_OK; in set_rsa_public() local 66 status = Se05x_API_WriteRSAKey(s_ctx, policy, k_object->keyId, in set_rsa_public() 79 if (status != SM_OK) in set_rsa_public() 82 status = Se05x_API_WriteRSAKey(s_ctx, NULL, k_object->keyId, in set_rsa_public() 95 if (status != SM_OK) in set_rsa_public() 108 smStatus_t status = SM_OK; in set_rsa_private_rsa() local 113 status = Se05x_API_WriteRSAKey(s_ctx, policy, k_object->keyId, in set_rsa_private_rsa() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | psa_crypto.c | 199 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() 731 psa_status_t status = psa_allocate_buffer_to_slot(slot, in psa_copy_key_material_into_slot() local 733 if (status != PSA_SUCCESS) { in psa_copy_key_material_into_slot() 734 return status; in psa_copy_key_material_into_slot() [all …]
|
| H A D | psa_crypto_storage.c | 79 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 …]
|
| H A D | psa_crypto_ecp.c | 96 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 …]
|
| H A D | psa_crypto_rsa.c | 46 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 …]
|
| H A D | psa_crypto_aead.c | 33 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 …]
|
| H A D | psa_crypto_mac.c | 41 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 …]
|
| H A D | psa_crypto_slot_management.c | 386 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_get_and_lock_key_slot_in_memory() local 399 status = PSA_SUCCESS; in psa_get_and_lock_key_slot_in_memory() 401 status = PSA_ERROR_DOES_NOT_EXIST; in psa_get_and_lock_key_slot_in_memory() 416 status = (slot_idx < MBEDTLS_PSA_KEY_SLOT_COUNT) ? in psa_get_and_lock_key_slot_in_memory() 420 if (status == PSA_SUCCESS) { in psa_get_and_lock_key_slot_in_memory() 421 status = psa_register_read(slot); in psa_get_and_lock_key_slot_in_memory() 422 if (status == PSA_SUCCESS) { in psa_get_and_lock_key_slot_in_memory() 427 return status; in psa_get_and_lock_key_slot_in_memory() 537 psa_status_t status = psa_key_slot_state_transition(slot, in psa_allocate_volatile_key_slot() local 540 if (status != PSA_SUCCESS) { in psa_allocate_volatile_key_slot() [all …]
|
| H A D | psa_crypto_driver_wrappers.h | 74 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 …]
|
| H A D | ssl_cookie.c | 30 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 110 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_cookie_setup() local 130 if ((status = psa_generate_key(&attributes, in mbedtls_ssl_cookie_setup() 132 return PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_cookie_setup() 195 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in mbedtls_ssl_cookie_write() local 218 status = psa_mac_sign_setup(&operation, ctx->psa_hmac_key, in mbedtls_ssl_cookie_write() 220 if (status != PSA_SUCCESS) { in mbedtls_ssl_cookie_write() 221 ret = PSA_TO_MBEDTLS_ERR(status); in mbedtls_ssl_cookie_write() [all …]
|
| H A D | lmots.c | 38 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 …]
|
| H A D | psa_crypto_pake.c | 158 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 …]
|
| H A D | psa_crypto_se.c | 128 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 …]
|
| H A D | psa_crypto_cipher.c | 262 psa_status_t status; in mbedtls_cipher_info_from_psa() local 265 status = mbedtls_cipher_values_from_psa(alg, key_type, &key_bits, &mode, &cipher_id_tmp); in mbedtls_cipher_info_from_psa() 266 if (status != PSA_SUCCESS) { in mbedtls_cipher_info_from_psa() 423 psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; in psa_cipher_update_ecb() local 429 status = PSA_SUCCESS; in psa_cipher_update_ecb() 448 status = mbedtls_to_psa_error( in psa_cipher_update_ecb() 454 if (status != PSA_SUCCESS) { in psa_cipher_update_ecb() 466 status = mbedtls_to_psa_error( in psa_cipher_update_ecb() 471 if (status != PSA_SUCCESS) { in psa_cipher_update_ecb() 489 status = PSA_SUCCESS; in psa_cipher_update_ecb() [all …]
|
| H A D | pk_wrap.c | 73 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 …]
|
| H A D | psa_its_file.c | 110 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 …]
|
| /optee_os/core/drivers/crypto/caam/ |
| H A D | caam_key.c | 280 enum caam_status status = CAAM_FAILURE; in caam_key_operation_blob() local 338 status = caam_key_alloc(out_key); in caam_key_operation_blob() 339 if (status) { in caam_key_operation_blob() 389 status = caam_jr_enqueue(&jobctx, NULL); in caam_key_operation_blob() 391 if (status == CAAM_NO_ERROR) { in caam_key_operation_blob() 400 KEY_TRACE("CAAM Blob Status 0x%08" PRIx32 "", jobctx.status); in caam_key_operation_blob() 407 return status; in caam_key_operation_blob() 414 enum caam_status status = CAAM_FAILURE; in caam_key_deserialize_from_bin() local 440 status = caam_key_alloc(key); in caam_key_deserialize_from_bin() 441 if (status) { in caam_key_deserialize_from_bin() [all …]
|
| /optee_os/core/arch/arm/dts/ |
| H A D | stm32mp25xxai-pinctrl.dtsi | 9 status = "okay"; 15 status = "okay"; 21 status = "okay"; 27 status = "okay"; 33 status = "okay"; 39 status = "okay"; 45 status = "okay"; 51 status = "okay"; 57 status = "okay"; 63 status = "okay"; [all …]
|
| H A D | stm32mp15xxaa-pinctrl.dtsi | 11 status = "okay"; 17 status = "okay"; 23 status = "okay"; 29 status = "okay"; 35 status = "okay"; 41 status = "okay"; 47 status = "okay"; 53 status = "okay"; 59 status = "okay"; 65 status = "okay"; [all …]
|
| H A D | stm32mp15xxac-pinctrl.dtsi | 11 status = "okay"; 17 status = "okay"; 23 status = "okay"; 29 status = "okay"; 35 status = "okay"; 41 status = "okay"; 47 status = "okay"; 53 status = "okay"; 59 status = "okay"; 69 status = "okay";
|
| H A D | stm32mp25xxal-pinctrl.dtsi | 9 status = "okay"; 15 status = "okay"; 21 status = "okay"; 27 status = "okay"; 33 status = "okay"; 39 status = "okay"; 45 status = "okay"; 51 status = "okay"; 57 status = "okay"; 65 status = "okay";
|
| H A D | stm32mp25xxak-pinctrl.dtsi | 9 status = "okay"; 15 status = "okay"; 21 status = "okay"; 27 status = "okay"; 33 status = "okay"; 39 status = "okay"; 45 status = "okay"; 51 status = "okay"; 57 status = "okay"; 65 status = "okay";
|
| /optee_os/core/drivers/crypto/caam/hal/common/ |
| H A D | hal_sm.c | 32 uint32_t status = 0; in issue_cmd() local 46 status = io_caam_read32(jr_base + SM_SMCSR); in issue_cmd() 47 } while (SM_SMCSR_CERR(status) == SM_SMCSR_CERR_NOT_COMPLETED); in issue_cmd() 127 uint32_t status = 0; in caam_hal_sm_allocate_page() local 135 status = issue_cmd(jr_base, page, page_desc->partition, in caam_hal_sm_allocate_page() 137 if (SM_SMCSR_PO(status) != SM_SMCSR_PO_AVAILABLE) in caam_hal_sm_allocate_page() 144 status = issue_cmd(jr_base, page, page_desc->partition, in caam_hal_sm_allocate_page() 146 if (SM_SMCSR_AERR(status) != SM_SMCSR_AERR_NO_ERROR) in caam_hal_sm_allocate_page() 153 status = issue_cmd(jr_base, page, page_desc->partition, in caam_hal_sm_allocate_page() 155 if (SM_SMCSR_PO(status) != SM_SMCSR_PO_OWNED || in caam_hal_sm_allocate_page() [all …]
|