Home
last modified time | relevance | path

Searched refs:Rc (Results 1 – 25 of 32) sorted by relevance

12

/system/authgraph/boringssl/src/
Dtests.rs18 use alloc::rc::Rc;
95 Rc::new(RefCell::new(crate::test_device::AgDevice::default())), in test_key_exchange_protocol()
102 Rc::new(RefCell::new(crate::test_device::AgDevice::default())), in test_key_exchange_protocol()
121 Rc::new(RefCell::new(source_device)), in test_ke_with_newer_source()
128 Rc::new(RefCell::new(sink_device)), in test_ke_with_newer_source()
146 Rc::new(RefCell::new(source_device)), in test_ke_with_newer_sink()
153 Rc::new(RefCell::new(sink_device)), in test_ke_with_newer_sink()
171 Rc::new(RefCell::new(source_device)), in test_ke_for_protocol_downgrade()
178 Rc::new(RefCell::new(sink_device)), in test_ke_for_protocol_downgrade()
190 Rc::new(RefCell::new(crate::test_device::AgDevice::default())), in test_ke_for_replay()
[all …]
/system/security/keystore2/src/
Derror.rs47 Rc(ResponseCode), enumerator
62 Error::Rc(ResponseCode::SYSTEM_ERROR) in sys()
67 Error::Rc(ResponseCode::PERMISSION_DENIED) in perm()
75 Error::Rc(ResponseCode::OUT_OF_KEYS_TRANSIENT_ERROR) in from()
92 Error::Rc(response_code) in from()
94 RkpdError::RetryableTimeout => Error::Rc(ResponseCode::OUT_OF_KEYS_TRANSIENT_ERROR), in from()
96 Error::Rc(ResponseCode::SYSTEM_ERROR) in from()
109 Error::Rc(ResponseCode::SYSTEM_ERROR) in wrapped_rkpd_error_to_ks_error()
169 Some(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in into_logged_binder()
213 Error::Rc(rcode) => SerializedError(rcode.0), in error_to_serialized_error()
[all …]
Dapc.rs48 Rc(ResponseCode), enumerator
57 Error::Rc(ResponseCode::SYSTEM_ERROR) in sys()
62 Error::Rc(ResponseCode::OPERATION_PENDING) in pending()
67 Error::Rc(ResponseCode::IGNORED) in ignored()
72 Error::Rc(ResponseCode::UNIMPLEMENTED) in unimplemented()
86 Some(Error::Rc(rcode)) => rcode.0, in into_logged_binder()
289 .map_err(|rc| Error::Rc(compat_2_response_code(rc))) in present_prompt()
Dauthorization.rs48 Rc(ResponseCode), enumerator
67 if let Some(KeystoreError::Rc(ks_rcode)) = root_cause.downcast_ref::<KeystoreError>() { in into_logged_binder()
85 Some(Error::Rc(rcode)) => rcode.0, in into_logged_binder()
214 return Err(Error::Rc(ResponseCode::INVALID_ARGUMENT)) in get_auth_tokens_for_credstore()
244 Err(Error::Rc(ResponseCode::NO_AUTH_TOKEN_FOUND)) in get_last_auth_time()
Dlegacy_importer.rs308 Some(&Error::Rc(ResponseCode::KEY_NOT_FOUND)) => {} in with_try_import()
321 return Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in with_try_import()
327 return Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in with_try_import()
343 Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)).context("Legacy database is empty.") in with_try_import()
468 Err(Error::Rc(ResponseCode::LOCKED)).context(ks_err!( in get_super_key_id_check_unlockable_or_delete()
475 Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)).context(ks_err!("Obsolete key.")) in get_super_key_id_check_unlockable_or_delete()
507 return Err(Error::Rc(ResponseCode::LOCKED)).context(ks_err!( in characteristics_file_to_cache()
621 Err(Error::Rc(ResponseCode::LOCKED)) in check_and_import()
655 return Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in check_and_import()
695 Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in check_and_import()
[all …]
Doperation.rs271 Err(_) => return Err(Error::Rc(ResponseCode::OPERATION_BUSY)), in prune()
285 return Err(Error::Rc(ResponseCode::OPERATION_BUSY)); in prune()
337 return Err(anyhow!(Error::Rc(ResponseCode::TOO_MUCH_DATA))); in check_input_length()
738 Err(Error::Rc(ResponseCode::OPERATION_BUSY)) => { in prune()
759 None => break Err(Error::Rc(ResponseCode::BACKEND_BUSY)), in prune()
814 Err(_) => Err(Error::Rc(ResponseCode::OPERATION_BUSY)) in with_locked_operation()
Dattestation_key_utils.rs117 .ok_or(Error::Rc(ResponseCode::INVALID_ARGUMENT)) in load_attest_key_blob_and_cert()
121 .ok_or(Error::Rc(ResponseCode::INVALID_ARGUMENT)) in load_attest_key_blob_and_cert()
Dservice.rs172 .ok_or(Error::Rc(ResponseCode::VALUE_CORRUPTED)) in get_key_entry()
202 Some(Error::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(None), in update_subcomponent()
222 return Err(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in update_subcomponent()
237 return Err(Error::Rc(ResponseCode::INVALID_ARGUMENT)) in update_subcomponent()
271 return Err(Error::Rc(ResponseCode::INVALID_ARGUMENT)).context(ks_err!( in get_key_descriptor_for_lookup()
Dmaintenance.rs91 return Err(Error::Rc(ResponseCode::LOCKED)).context(ks_err!("Device is locked.")); in on_user_password_changed()
233 return Err(Error::Rc(ResponseCode::INVALID_ARGUMENT)) in migrate_key_namespace()
241 return Err(Error::Rc(ResponseCode::INVALID_ARGUMENT)) in migrate_key_namespace()
Dsuper_key.rs213 .ok_or(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in decrypt()
428 .ok_or(Error::Rc(ResponseCode::LOCKED)) in unwrap_key_if_required()
448 (iv, tag) => Err(Error::Rc(ResponseCode::VALUE_CORRUPTED)).context(ks_err!( in unwrap_key_with_key()
462 Err(Error::Rc(ResponseCode::VALUE_CORRUPTED)).context(ks_err!( in unwrap_key_with_key()
548 return Err(Error::Rc(ResponseCode::VALUE_CORRUPTED)).context(ks_err!( in extract_super_key_from_key_entry()
567 Err(Error::Rc(ResponseCode::VALUE_CORRUPTED)).context(ks_err!("No key blob info.")) in extract_super_key_from_key_entry()
690 Err(Error::Rc(ResponseCode::LOCKED)).context(ks_err!("Device is locked.")) in handle_super_encryption_on_key_init()
692 UserState::Uninitialized => Err(Error::Rc(ResponseCode::UNINITIALIZED)) in handle_super_encryption_on_key_init()
717 .ok_or(Error::Rc(ResponseCode::LOCKED)) in handle_super_encryption_on_key_init()
Draw_device.rs167 Some(&Error::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(None), in not_found_is_none()
243 .ok_or(Error::Rc(ResponseCode::KEY_NOT_FOUND)) in lookup_or_generate_key()
Dlegacy_blob.rs382 return Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in new_from_stream()
459 Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in new_from_stream()
462 _ => Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)).context(ks_err!( in new_from_stream()
549 .ok_or(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in read_key_parameters()
560 .ok_or(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in read_key_parameters()
610 return Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in read_key_parameters()
710 return Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in read_characteristics_file()
1246 return Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in load_by_uid_alias()
1274 return Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in load_by_uid_alias()
1291 return Err(KsError::Rc(ResponseCode::VALUE_CORRUPTED)) in load_by_uid_alias()
[all …]
Ddatabase.rs137 return Err(&KsError::Rc(ResponseCode::BACKEND_BUSY)) in check_lock_timeout()
1304 Some(KsError::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(false), in key_exists()
1384 Some(KsError::Rc(ResponseCode::KEY_NOT_FOUND)) => Ok(None), in load_super_key()
1686 return Err(KsError::Rc(ResponseCode::INVALID_ARGUMENT)) in migrate_key_namespace()
1697 .ok_or(KsError::Rc(ResponseCode::INVALID_ARGUMENT)) in migrate_key_namespace()
1713 return Err(KsError::Rc(ResponseCode::INVALID_ARGUMENT)) in migrate_key_namespace()
1759 return Err(KsError::Rc(ResponseCode::INVALID_ARGUMENT)) in store_new_key()
1838 return Err(KsError::Rc(ResponseCode::INVALID_ARGUMENT)) in store_new_certificate()
1893 row.map_or_else(|| Err(KsError::Rc(ResponseCode::KEY_NOT_FOUND)), Ok)? in load_key_entry_id()
1953 row.map_or_else(|| Err(KsError::Rc(ResponseCode::KEY_NOT_FOUND)), Ok)?; in load_access_tuple()
[all …]
Denforcements.rs859 return Err(AuthzError::Rc(AuthzResponseCode::NO_AUTH_TOKEN_FOUND)) in get_auth_tokens()
863 return Err(AuthzError::Rc(AuthzResponseCode::NO_AUTH_TOKEN_FOUND)).context( in get_auth_tokens()
/system/security/keystore2/tests/
Dkeystore2_client_grant_key_tests.rs101 assert_eq!(Error::Rc(ResponseCode::SYSTEM_ERROR), result.unwrap_err()); in keystore2_grant_key_with_invalid_perm_expecting_syserror()
152 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_grant_key_with_perm_none()
238 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_grant_get_info_use_key_perm()
311 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_grant_delete_key_success()
381 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_grant_key_fails_with_permission_denied()
404 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_grant_key_fails_with_permission_denied()
430 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_grant_key_fails_with_grant_perm_expect_perm_denied()
455 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_grant_fails_with_non_existing_key_expect_key_not_found_err()
521 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_ungrant_key_success()
572 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_ungrant_fails_with_non_existing_key_expect_key_not_found_error()
[all …]
Dkeystore2_client_delete_key_tests.rs48 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_delete_key_success()
65 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_delete_key_fail()
88 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_delete_key_with_blob_domain_fail()
Dkeystore2_client_key_id_domain_tests.rs48 assert_eq!(Error::Rc(ResponseCode::SYSTEM_ERROR), result.unwrap_err()); in keystore2_generate_key_with_key_id_domain_expect_sys_error()
151 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_key_id_alias_rebind_verify_by_alias()
236 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_key_id_alias_rebind_verify_by_key_id()
Dkeystore2_client_list_entries_tests.rs175 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_list_entries_fails_perm_denied()
190 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_list_entries_fails_invalid_arg()
670 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_list_entries_batched_fails_perm_denied()
687 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_list_entries_batched_fails_invalid_arg()
709 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_get_number_of_entries_fails_perm_denied()
724 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_get_number_of_entries_fails_invalid_arg()
Dkeystore2_client_update_subcomponent_tests.rs80 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_update_subcomponent_fail()
102 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_update_subcomponent_no_key_entry_cert_fail()
232 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_update_subcomponent_fails_permission_denied()
Dkeystore2_client_operation_tests.rs75 assert_eq!(Error::Rc(ResponseCode::OPERATION_BUSY), e); in perform_op_busy_in_thread()
408 assert_eq!(Error::Rc(ResponseCode::PERMISSION_DENIED), result.unwrap_err()); in keystore2_forced_op_perm_denied_test()
Dkeystore2_client_ec_key_tests.rs218 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_get_key_entry_blob_fail()
240 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_generate_key_invalid_domain()
473 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in keystore2_key_owner_validation()
Dkeystore2_client_authorizations_tests.rs151 assert_eq!(Error::Rc(ResponseCode::KEY_NOT_FOUND), result.unwrap_err()); in generate_key_and_perform_op_with_max_usage_limit()
643 assert_eq!(Error::Rc(ResponseCode::INVALID_ARGUMENT), result.unwrap_err()); in keystore2_gen_key_auth_creation_date_time_test_fail_with_invalid_arg_error()
/system/secretkeeper/client/src/
Dlib.rs41 use std::rc::Rc;
73 let ag_dev = Rc::new(RefCell::new(AgDevice::new(dice, expected_sk_key)?)); in new()
202 ag_dev: Rc<RefCell<AgDevice>>, in authgraph_key_exchange()
/system/keymint/ta/src/
Dlib.rs20 use alloc::{boxed::Box, collections::BTreeMap, rc::Rc, string::ToString, vec::Vec};
138 attestation_id_info: RefCell<Option<Rc<AttestationIdInfo>>>,
146 dice_info: RefCell<Option<Rc<DiceInfo>>>,
617 *self.attestation_id_info.borrow_mut() = Some(Rc::new(ids)); in set_attestation_ids()
622 fn get_attestation_ids(&self) -> Option<Rc<AttestationIdInfo>> { in get_attestation_ids()
628 Ok(ids) => *self.attestation_id_info.borrow_mut() = Some(Rc::new(ids)), in get_attestation_ids()
637 fn get_dice_info(&self) -> Option<Rc<DiceInfo>> { in get_dice_info()
642 Ok(dice_info) => *self.dice_info.borrow_mut() = Some(Rc::new(dice_info)), in get_dice_info()
/system/authgraph/core/src/
Dkeyexchange.rs31 use alloc::rc::Rc;
66 device: Rc<RefCell<dyn Device>>,
115 device: Rc<RefCell<dyn Device>>, in new()

12