Home
last modified time | relevance | path

Searched refs:e (Results 1 – 25 of 39) sorted by relevance

12

/trusty/user/app/sample/hwcryptohal/common/
Derr.rs52 fn from(e: kmr_wire::CborError) -> Self { in from()
53 HwCryptoError::CborError(e) in from()
58 fn from(e: TipcError) -> Self { in from()
59 hwcrypto_err!(GENERIC_ERROR, "tipc communication error: {:?}", e) in from()
64 fn from(e: kmr_common::Error) -> Self { in from()
65 HwCryptoError::KmError(e) in from()
70 fn from(e: CoseError) -> Self { in from()
71 hwcrypto_err!(SERIALIZATION_ERROR, "Deserialization error: {}", e) in from()
76 fn from(e: TryReserveError) -> Self { in from()
77 hwcrypto_err!(ALLOCATION_ERROR, "error allocating: {}", e) in from()
[all …]
/trusty/user/app/secretkeeper/
Dstore.rs44 { $e:expr, $($arg:tt)+ } => {
46 log::error!("{}: {:?}", format_args!($($arg)+), $e);
59 .map_err(|e| ss_err!(e, "Couldn't create storage session")) in create_session()
74 .map_err(|e| ss_err!(e, "Couldn't create file '{filename}'"))?; in store()
75 session.write_all(&mut file, val).map_err(|e| ss_err!(e, "Failed to write data"))?; in store()
85 Err(e) => return Err(ss_err!(e, "Failed to open file '{filename}'")), in get()
89 .map_err(|e| ss_err!(e, "Failed to get size for '{filename}'"))?; in get()
93 .map_err(|e| ss_err!(e, "Failed to read '{filename}'"))?; in get()
105 Err(e) => Err(ss_err!(e, "Failed to delete file '{filename}'")), in delete()
112 for entry in session.list_files().map_err(|e| ss_err!(e, "Failed to list files"))? { in delete_all()
[all …]
Dlib.rs236 .map_err(|e| { in add_service_port()
246 dispatcher.add_service(Rc::new(service), cfg).map_err(|e| { in add_service_port()
248 e in add_service_port()
277 let mut dispatcher = SkServiceDispatcher::<PORT_COUNT>::new().map_err(|e| { in inner_main()
279 e in inner_main()
292 .map_err(|e| { in inner_main()
294 e in inner_main()
/trusty/user/app/storage/test/storage-unittest-aidl/unittests/
Dhelpers.rs34 Err(e) in ensure_deleted()
35 if e.exception_code() == ExceptionCode::SERVICE_SPECIFIC in ensure_deleted()
36 && e.service_specific_error() == SecureStorage::ERR_NOT_FOUND => in ensure_deleted()
44 ss.commitChanges().map_err(|e| format!("commitChanges failed with: {}", e))?; in ensure_deleted()
47 Err(e) => { in ensure_deleted()
48 return Err(format!("deleteFile failed (for {}) with unexpected error: {}", fname, e)) in ensure_deleted()
51 ss.commitChanges().map_err(|e| format!("commitChanges failed with: {}", e))?; in ensure_deleted()
117 .map_err(|e| format!("Encountered error calling write (chunk {}): {}", i, e))?; in write_pattern()
141 .map_err(|e| format!("Encountered error calling read (chunk {}): {}", i, e))?; in read_pattern()
150 check_pattern32(chunk_offset, &*read).map_err(|e| format!("For chunk {}: {}", i, e))?; in read_pattern()
Dmod.rs39 Err(e) in create_delete()
40 if e.exception_code() == ExceptionCode::SERVICE_SPECIFIC in create_delete()
41 && e.service_specific_error() == SecureStorage::ERR_ALREADY_EXISTS => in create_delete()
45 Err(e) => fail!("openFile (on existing file) failed with: {}", e), in create_delete()
74 Err(e) in create_move_delete()
75 if e.exception_code() == ExceptionCode::SERVICE_SPECIFIC in create_move_delete()
76 && e.service_specific_error() == SecureStorage::ERR_ALREADY_EXISTS => in create_move_delete()
80 Err(e) => fail!("openFile failed with unexpected error: {}", e), in create_move_delete()
90 Err(e) in create_move_delete()
91 if e.exception_code() == ExceptionCode::SERVICE_SPECIFIC in create_move_delete()
[all …]
/trusty/user/app/keymint/
Dsecure_deletion_secret_manager.rs82 let session = Session::new(Port::TamperProof, wait_on_port).map_err(|e| { in get_secure_deletion_secret_file_session()
86 e in get_secure_deletion_secret_file_session()
99 Err(e) => Err(km_err!( in delete_secure_deletion_secret_file()
102 e in delete_secure_deletion_secret_file()
123 .map_err(|e| { in open_or_create()
127 e in open_or_create()
139 let data = self.transaction.read_at(&self.file, start, buffer).map_err(|e| { in read_block()
145 e in read_block()
172 Err(e) => { in find_empty_slot()
174 return Err(e); in find_empty_slot()
[all …]
Drpc.rs42 Hwkey::open().map_err(|e| rpc_err!(Failed, "failed to connect to Hwkey: {:?}", e))?; in derive_bytes_from_hbk()
49 .map_err(|e| rpc_err!(Failed, "failed to derive hardware backed key: {:?}", e))?; in derive_bytes_from_hbk()
57 .map_err(|e| rpc_err!(Failed, "failed to get DICE Info: {:?}", e))?; in get_dice_info()
108 .map_err(|e| rpc_err!(Failed, "failed to get signed data: {:?}", e))?; in sign_data_in_cose_sign1()
Dkeybox.rs47 .map_err(|e| km_err!(SecureHwCommunicationFailed, "send unwrap cmd failed: {:?}", e))?; in keybox_unwrap()
54 .map_err(|e| km_err!(SecureHwCommunicationFailed, "unwrap response error: {:?}", e))?; in keybox_unwrap()
60 let keybox = Keybox::new().map_err(|e| { in keybox_unwrap()
61 km_err!(SecureHwCommunicationFailed, "error opening keybox service: {:?}", e) in keybox_unwrap()
Dffi_bindings.rs114 let (cmd, bytes) = <u32>::deserialize(bytes).map_err(|e| { in deserialize()
115 error!("received error when deserializing cmd: {:?}", e); in deserialize()
123 let (status, bytes) = <u32>::deserialize(bytes).map_err(|e| { in deserialize()
124 error!("received error when deserializing status: {:?}", e); in deserialize()
132 let (unwrapped_keybox_len, bytes) = <u64>::deserialize(bytes).map_err(|e| { in deserialize()
133 error!("received error when deserializing status: {:?}", e); in deserialize()
145 let unwrapped_keybox = try_to_vec(bytes).map_err(|e| { in deserialize()
146 error!("received error when trying to copy unwrapped keybox into vector: {:?}", e); in deserialize()
Dipc_manager.rs145 let resp_vec = self.handle_message(&msg.0).map_err(|e| match e { in on_message()
165 let system_state_session = SystemState::try_connect().map_err(|e| { in get_system_state_provisioning_flag()
166 km_err!(SecureHwCommunicationFailed, "couldn't connect to system state provider: {:?}", e) in get_system_state_provisioning_flag()
169 system_state_session.get_flag(SystemStateFlag::ProvisioningAllowed).map_err(|e| { in get_system_state_provisioning_flag()
173 e in get_system_state_provisioning_flag()
176 ProvisioningAllowedFlagValues::try_from(flag).map_err(|e| { in get_system_state_provisioning_flag()
181 e in get_system_state_provisioning_flag()
249 if let Err(e) = self.km_ta.borrow_mut().set_boot_info(boot_info) { in maybe_set_boot_info()
250 error!("failed to set boot info: {:?}", e); in maybe_set_boot_info()
412 let req_msg = legacy::deserialize_trusty_req(&msg.0).map_err(|e| { in on_message()
[all …]
Dsecure_storage_manager.rs71 let mut session = Session::new(Port::TamperProof, true).map_err(|e| { in new()
72 km_err!(SecureHwCommunicationFailed, "couldn't create storage session: {:?}", e) in new()
74 let secure_file = session.open_file(file_name, OpenMode::Create).map_err(|e| { in new()
75 km_err!(SecureHwCommunicationFailed, "couldn't create file {}: {:?}", file_name, e) in new()
91 session.write_all(file, data).map_err(|e| { in write_all()
92 km_err!(SecureHwCommunicationFailed, "failed to write data; received error: {:?}", e) in write_all()
130 let serialized_buffer = attestation_key_data.write_to_bytes().map_err(|e| { in write_protobuf_to_attestation_key_file()
131 km_err!(SecureHwCommunicationFailed, "couldn't serialize attestationKey: {:?}", e) in write_protobuf_to_attestation_key_file()
134 file.write_all(&serialized_buffer).map_err(|e| { in write_protobuf_to_attestation_key_file()
135 km_err!(SecureHwCommunicationFailed, "failed to provision attestation key file: {:?}", e) in write_protobuf_to_attestation_key_file()
[all …]
Dkey_wrapper.rs38 .map_err(|e| km_err!(SecureHwCommunicationFailed, "failed to connect to hwwsk: {:?}", e)) in hwwsk_session()
58 let wrapped_key_buffer = hwwsk::export_key(&session, buf, key).map_err(|e| { in ephemeral_wrap()
59 km_err!(SecureHwCommunicationFailed, "hwwsk failed to wrap key: {:?}", e) in ephemeral_wrap()
119 result.map_err(|e| km_err!(UnknownError, "hwwsk failed to create key: {:?}", e))?; in create_storage_key()
Dkeys.rs231 let hwkey_session = Hwkey::open().map_err(|e| { in root_kek()
232 km_err!(SecureHwCommunicationFailed, "failed to connect to hwkey: {:?}", e) in root_kek()
246 .map_err(|e| { in root_kek()
247 km_err!(SecureHwCommunicationFailed, "failed to derive key: {:?}", e) in root_kek()
255 .map_err(|e| { in root_kek()
256 km_err!(SecureHwCommunicationFailed, "failed to derive legacy key: {:?}", e) in root_kek()
269 let hwkey_session = Hwkey::open().map_err(|e| { in kak()
270 km_err!(SecureHwCommunicationFailed, "failed to connect to HwKey: {:?}", e) in kak()
277 .map_err(|e| km_err!(SecureHwCommunicationFailed, "failed to retrieve kak: {:?}", e))?; in kak()
/trusty/user/app/sample/hwcryptohal/server/
Dhwcrypto_ipc_server.rs35 .map_err(|e| { in main_loop()
40 e in main_loop()
47 .map_err(|e| hwcrypto_err!(GENERIC_ERROR, "could not create service manager: {:?}", e))?; in main_loop()
51 .map_err(|e| hwcrypto_err!(GENERIC_ERROR, "service manager received error: {:?}", e)) in main_loop()
Dservice_encryption_key.rs130 .map_err(|e| hwcrypto_err!(INVALID_KEY, "failed to decrypt context: {:?}", e))?, in decrypt_content_service_encryption_key()
213 .map_err(|e| hwcrypto_err!(GENERIC_ERROR, "could not connect to hwkey service {:?}", e))?; in get_encryption_key()
220 .map_err(|e| hwcrypto_err!(GENERIC_ERROR, "could derive key {:?}", e))?; in get_encryption_key()
274 integer_value.try_into().map_err(|e| { in parse_cborium_u32()
275 hwcrypto_err!(SERIALIZATION_ERROR, "Error converting {} to u32: {}", value_name, e) in parse_cborium_u32()
Dhwcrypto_device_key.rs237 let hwkey_session = Hwkey::open().map_err(|e| { in derive_dice_policy_bound_key()
238 hwcrypto_err!(GENERIC_ERROR, "could not connect to hwkey service {:?}", e) in derive_dice_policy_bound_key()
251 .map_err(|e| hwcrypto_err!(GENERIC_ERROR, "failed to derive key {:?}", e))?; in derive_dice_policy_bound_key()
263 .map_err(|e| hwcrypto_err!(GENERIC_ERROR, "failed to create key {:?}", e))?; in derive_dice_policy_bound_key()
/trusty/user/base/interface/secure_fb/include/interface/secure_fb/
Dsecure_fb.h229 static inline int32_t hardware_error(int32_t e) { in hardware_error() argument
230 if (e < 0 && e > SECURE_FB_ERROR_HARDWARE_ERROR) { in hardware_error()
231 return SECURE_FB_ERROR_HARDWARE_ERROR + e; in hardware_error()
/trusty/user/base/lib/hwkey/rust/src/
Derr.rs56 fn from(e: TipcError) -> Self { in from()
57 Self::Tipc(e) in from()
62 fn from(e: Error) -> Self { in from()
63 Self::System(e) in from()
/trusty/user/app/sample/rust-hello-world/
Dlib.rs135 let inputmsg = std::str::from_utf8(&msg.message).map_err(|e| { in on_message()
136 error!("Failed to convert message to valid UTF-8: {:?}", e); in on_message()
147 length: outputmsg.len().try_into().map_err(|e| { in on_message()
148 error!("Length of message is too long!: {:?}", e); in on_message()
170 .map_err(|e| { in init_and_start_loop()
171 error!("Could not create port config: {:?}", e); in init_and_start_loop()
187 .map_err(|e| { in init_and_start_loop()
188 error!("Could not create Rust Hello World Service manager: {:?}", e); in init_and_start_loop()
/trusty/user/base/interface/arm_ffa/include/interface/arm_ffa/
Darm_ffa.h28 #define STATIC_ASSERT(e) _Static_assert(e, #e) argument
/trusty/host/common/scripts/metrics_atoms_protoc_plugin/
Dmetrics_atoms_protoc_plugin.py323 except IndexError as e:
325 f"the Atom message is missing from {proto_file.name}") from e
328 get_uri(e.name): VendorAtomEnum(name=e.name,
332 for ee in e.value
333 ]) for e in proto_file.enum_type
/trusty/user/base/lib/tipc/rust/src/
Derr.rs91 e => TipcError::SystemError(e), in from_uapi()
/trusty/user/base/lib/unittest-rust/src/
Dmacros.rs252 Err(e) => {
253 … $crate::asserts::assert_err(core::stringify!($result), &e, core::option::Option::None);
261 Err(e) => {
262 …$crate::asserts::assert_err(core::stringify!($result), &e, core::option::Option::Some(core::format…
/trusty/device/arm/generic-arm64/project/qemu/
Dqemu.py187 except IOError as e:
188 print("close error ignored", e)
227 except IOError as e:
228 print("qmp_command error ignored", e)
567 except IOError as e:
568 if e.errno != errno.EAGAIN:
739 except AdbFailure as e:
740 adb_exception = e
/trusty/user/base/lib/tipc/rust/src/service/
Dhandle_set.rs128 self.do_set_ctrl(sys::HSET_DEL as u32, 0, &connection).unwrap_or_else(|e| { in close()
129 error!("Failed to remove channel {:?} from handle set: {:?}", connection, e) in close()

12