/trusty/user/app/secretkeeper/ |
D | store.rs | 76 Ok(()) in store() 83 Ok(f) => f, in get() 84 Err(storage::Error::Code(trusty_sys::Error::NotFound)) => return Ok(None), in get() 96 Ok(Some(buffer)) in get() 103 Ok(_) => Ok(()), in delete() 104 Err(storage::Error::Code(trusty_sys::Error::NotFound)) => Ok(()), in delete() 114 Ok((filename, _state)) if filename.starts_with(PREFIX_V1) => { in delete_all() 122 Ok((filename, _state)) => log::info!("Skipping unrelated file {filename}"), in delete_all() 129 Ok(()) in delete_all() 153 expect_eq!(store.get(KEY1), Ok(Some(SECRET1.to_vec()))); in test_secretkeeper_store() [all …]
|
D | lib.rs | 73 Ok(SkMessage(Vec::try_alloc_from(bytes)?)) in deserialize() 81 ) -> Result<S::Ok, S::Error> { in serialize() argument 91 Ok(()) in fragmented_send() 111 Ok(MessageResult::MaintainConnection) in fragmented_process() 131 Ok(ConnectResult::Accept(())) in on_connect() 165 Ok(ConnectResult::Accept(())) in on_connect() 198 Ok(ConnectResult::Accept(())) in on_connect() 211 Ok(MessageResult::MaintainConnection) in on_message()
|
/trusty/user/base/lib/tipc/rust/src/ |
D | serialization.rs | 15 type Ok; typedef 19 fn serialize_bytes(&mut self, bytes: &'s [u8]) -> Result<Self::Ok, Self::Error>; in serialize_bytes() argument 28 unsafe fn serialize_as_bytes<T: Sized>(&mut self, obj: &'s T) -> Result<Self::Ok, Self::Error> { in serialize_as_bytes() argument 41 fn serialize_handle(&mut self, handle: &'s Handle) -> Result<Self::Ok, Self::Error>; in serialize_handle() argument 52 ) -> Result<S::Ok, S::Error>; in serialize() argument 59 ) -> Result<S::Ok, S::Error> { in serialize() argument 105 Ok(()) in deserialize()
|
D | service.rs | 85 Ok(Self { in new() 127 Ok(Self { path: self.path.try_clone()?, ..*self }) in try_clone() 219 Ok(Rc::try_new(Self { in try_new_port() 227 Ok(Rc::try_new(Self { handle, ty: ChannelTy::Connection(data) })?) in try_new_connection() 262 Ok(Self::from_bytes(bytes)) in try_from_bytes() 298 Ok(()) in new_from_string() 339 Ok(Self::new(time_low, time_mid, time_hi_and_version, clock_seq_and_node)) in new_from_string() 356 Ok(()) in fmt() 799 Ok(Self { 815 Ok(()) [all …]
|
D | handle.rs | 112 Ok(Self(fd)) in from_raw() 189 Ok((rc.try_into()?, msg_info.num_handles.try_into()?)) in recv_vectored() 198 Ok((buf_len, handles_len)) in recv_vectored() 266 Ok(()) in send_vectored() 293 Ok(uevent) in wait() 361 Ok(UnsafeSharedBuf { buf: buf_ptr as *mut u8, len: size }) in mmap() 383 type Ok = (); typedef 386 fn serialize_bytes(&mut self, bytes: &'a [u8]) -> Result<Self::Ok, Self::Error> { in serialize_bytes() argument 390 fn serialize_handle(&mut self, handle: &'a Handle) -> Result<Self::Ok, Self::Error> { in serialize_handle() argument
|
/trusty/user/app/sample/hwcryptohal/server/ |
D | opaque_key.rs | 81 Ok(boot_unique_value.clone()) in get_boot_unique_value() 102 Ok(Self { in new() 116 Ok(KeyPolicy { in get_policy() 128 Ok(Self { in try_clone() 176 Ok(opaque_keybinder) in new_binder() 182 Ok(OpaqueKey { key_header, key_material }) in try_clone() 225 Ok(raw_key) in derive_raw_key_material() 250 KeyLifetime::EPHEMERAL => Ok(true), in derivation_allowed_lifetime() 254 Ok(false) in derivation_allowed_lifetime() 256 Ok(true) in derivation_allowed_lifetime() [all …]
|
D | service_encryption_key.rs | 58 Ok(Self::generate_with_version(header_version)) in generate() 98 Ok(ct) in encrypt_content_service_encryption_key() 102 Ok(cose_encrypt.to_vec()?) in encrypt_content_service_encryption_key() 132 Ok((encryption_header, pt_data)) in decrypt_content_service_encryption_key() 187 Ok(Self::new(key_derivation_context, header_version)) in try_from() 202 Ok(cose_header) in try_from() 221 Ok(key) in get_encryption_key() 234 Ok(key_material) in derive_key_hkdf() 262 Ok(value_bytes.as_slice().try_into().expect("Shouldn't fail, we checked size already")) 283 Ok(OsRollbackVersion::Version(n)) => Ok(n), in get_service_current_version()
|
D | helpers.rs | 40 $(x if x == $name::$field as i64 => Ok($name::$field)),+, 51 Ok(value.try_into().map_err(|_| coset::CoseError::EncodeFailed)?)
|
D | hwcrypto_device_key.rs | 90 Ok(VersionContext { uuid, version, header }) in new_current() 95 Ok(ctx.encrypt_context()?) in new_current_encrypted() 103 Ok(()) in check_version() 124 Ok(context.version >= current_version) in is_context_current() 137 Ok(version_context) in decrypt_context() 147 Ok(decrypted_context.to_cbor_value()?.to_vec()?) in get_stable_context() 191 Ok(VersionContext { uuid, version, header: None }) in from_cbor_value() 242 Ok(hwkey_session.derive_key_req().unique_key()) in derive_dice_policy_bound_key() 244 DeviceKeyId::BATCH_KEY => Ok(hwkey_session.derive_key_req().shared_key()), in derive_dice_policy_bound_key() 266 Ok(DiceBoundKeyResult { in derive_dice_policy_bound_key() [all …]
|
/trusty/user/base/lib/system_state/rust/src/ |
D | lib.rs | 60 Ok(SystemStateFlag::ProvisioningAllowed) in try_from() 63 Ok(SystemStateFlag::AppLoadingUnlocked) in try_from() 66 Ok(SystemStateFlag::AppLoadingVersionCheck) in try_from() 95 Ok(ProvisioningAllowedFlagValues::ProvisioningNotAllowed) in try_from() 98 Ok(ProvisioningAllowedFlagValues::ProvisioningAllowed) in try_from() 101 Ok(ProvisioningAllowedFlagValues::ProvisioningAllowedAtBoot) in try_from() 126 Ok(response.value) in get_flag() 156 ) -> Result<S::Ok, S::Error> { in serialize() argument 203 Ok(Self { flag: payload.flag.try_into()?, value: payload.value }) in deserialize()
|
/trusty/user/app/keymint/ |
D | secure_deletion_secret_manager.rs | 89 Ok(session) in get_secure_deletion_secret_file_session() 97 Ok(_) => Ok(()), in delete_secure_deletion_secret_file() 98 Err(storage_session::Error::Code(trusty_sys::Error::NotFound)) => Ok(()), in delete_secure_deletion_secret_file() 130 Ok(SecureDeletionSecretFile { transaction, file }) in open_or_create() 157 Ok(data) in read_block() 171 Ok(read_data) => read_data, in find_empty_slot() 196 return Ok(Some(key_slot)); in find_empty_slot() 200 Ok(None) in find_empty_slot() 240 Ok(()) in resize() 255 Ok(()) in zero_entries() [all …]
|
D | ipc_manager.rs | 77 Ok(KMMessage(Vec::try_alloc_from(bytes)?)) in deserialize() 85 ) -> Result<S::Ok, S::Error> { in serialize() argument 95 Algorithm::Rsa => Ok(SigningAlgorithm::Rsa), in keymaster_algorithm_to_signing_algorithm() 96 Algorithm::Ec => Ok(SigningAlgorithm::Ec), in keymaster_algorithm_to_signing_algorithm() 135 Ok(ConnectResult::Accept(Context { uuid: peer.clone() })) in on_connect() 159 Ok(MessageResult::MaintainConnection) in on_message() 188 Ok(matches!( in provisioning_allowed() 196 Ok(matches!( in provisioning_allowed_at_boot() 278 Ok(TrustyPerformOpRsp::GetVersion(GetVersionResponse { in handle_message() 289 Ok(TrustyPerformOpRsp::GetVersion2(GetVersion2Response { in handle_message() [all …]
|
D | keys.rs | 48 Ok(byte_array) => byte_array, in deserialize_u32() 51 Ok(u32::from_le_bytes(u32_bytes)) in deserialize_u32() 61 Ok(connection) => connection, in os_rollback_version_to_u32() 67 Ok(OsRollbackVersion::Version(n)) => Ok(n), in os_rollback_version_to_u32() 74 OsRollbackVersion::Version(n) => Ok(n), in os_rollback_version_to_u32() 134 Ok(TrustyKekContext::NonLegacyKey(NonLegacyKeyContext { in new() 148 Ok(TrustyKekContext::LegacyKey) in new() 174 0 => Ok(TrustyKekContext::LegacyKey), in from_raw() 186 Ok(TrustyKekContext::NonLegacyKey(NonLegacyKeyContext { in from_raw() 217 Ok(raw_vec) in to_raw() [all …]
|
D | secure_storage_manager.rs | 77 Ok(OpenSecureFile { session: Some(session), secure_file: Some(secure_file) }) in new() 137 Ok(()) in write_protobuf_to_attestation_key_file() 204 return Ok(()); in clear_attestation_cert_chain() 219 Ok(()) in clear_attestation_cert_chain() 278 Ok(()) in provision_attestation_id_file() 289 Ok(()) in delete_attestation_ids() 300 Ok(file) => file, in get_file_contents() 301 Err(storage::Error::Code(trusty_sys::Error::NotFound)) => return Ok(None), in get_file_contents() 320 Ok(Some(buffer)) in get_file_contents() 328 Ok(Some(file_contents)) => file_contents, in read_attestation_ids() [all …]
|
/trusty/user/base/lib/trusty-std/src/ffi/ |
D | c_str.rs | 139 Ok(v) in try_new() 147 Ok(v) in try_new() 154 None => Ok(unsafe { CString::try_from_vec_unchecked(bytes)? }), in try_new() 161 Ok(CString::from_vec_with_nul_unchecked(v)) in try_from_vec_unchecked() 173 Ok(unsafe { CString::from_vec_with_nul_unchecked(inner) }) in try_clone()
|
/trusty/user/base/lib/hwwsk/rust/src/ |
D | lib.rs | 70 ) -> Result<S::Ok, S::Error> { in serialize() argument 100 hwwsk_cmd_HWWSK_CMD_GENERATE_KEY => Ok(HwWskCmd::Generate( in deserialize() 104 Ok(HwWskCmd::Export(ExportKeyReq::deserialize(&bytes[header_size..], handles)?)) in deserialize() 112 Ok(Self { hdr: hwwsk_req_hdr { cmd: hdr.cmd, flags: hdr.flags }, req }) in deserialize() 128 ) -> Result<S::Ok, S::Error> { in serialize() argument 158 Ok(Self { in deserialize() 175 ) -> Result<S::Ok, S::Error> { in serialize() argument 185 Ok(Self { key_blob: Vec::try_alloc_from(bytes)? }) in deserialize() 203 ) -> Result<S::Ok, S::Error> { in serialize() argument 234 Ok(Self { status, cmd, payload: response_payload }) in deserialize() [all …]
|
/trusty/user/base/lib/storage/rust/src/ |
D | test.rs | 87 assert_eq!(Ok(&file_contents[3..8]), result); in read_at() 95 assert_eq!(Ok(&file_contents[10..]), result); in read_at() 115 assert_eq!(Ok(()), result); in write_at() 121 assert_eq!(Ok(expected), result, "Incorrect bytes read"); in write_at() 125 assert_eq!(Ok(()), transaction.write_at(&mut file, 7, b"C")); in write_at() 126 assert_eq!(Ok(()), transaction.commit()); in write_at() 130 assert_eq!(Ok(expected), result); in write_at() 135 assert_eq!(Ok(()), result, "Writing past end of file failed"); in write_at() 139 assert_eq!(Ok(expected), result); in write_at() 293 assert_eq!(Ok(()), result); in read_in_transaction() [all …]
|
D | lib.rs | 207 Ok(Self { raw: handle.try_into().unwrap() }) in new() 286 Ok(SecureFile { raw }) in open_file_impl() 391 Ok(&buf[..bytes_read]) in read_at() 479 Ok(()) in write_at_impl() 491 Ok(size as usize) in get_size() 720 Ok(()) in check_return_code() 751 Ok(code) in check_non_negative() 774 Ok(size as usize) in check_size() 923 Ok(DirIter { session: session.raw, raw: dir_ptr, finished: false }) in new() 961 sys::storage_file_list_flag_STORAGE_FILE_LIST_END => return Ok(None), in try_next() [all …]
|
/trusty/user/base/lib/trusty-std/src/ |
D | alloc.rs | 77 Ok(vec) in try_alloc_from() 86 Ok(vec) in try_alloc_from() 106 Ok(()) in try_push() 112 Ok(v) in try_with_capacity() 205 0 => Ok(NonNull::slice_from_raw_parts(layout.dangling(), 0)), in alloc_impl() 214 Ok(NonNull::slice_from_raw_parts(ptr, size)) in alloc_impl() 250 Ok(NonNull::slice_from_raw_parts(ptr, new_size)) in grow_impl() 262 Ok(new_ptr) in grow_impl() 328 Ok(NonNull::slice_from_raw_parts(new_layout.dangling(), 0)) in shrink() 338 Ok(NonNull::slice_from_raw_parts(ptr, new_size)) in shrink() [all …]
|
/trusty/user/app/storage/test/storage-unittest-aidl/unittests/ |
D | helpers.rs | 26 Ok(()) => { in ensure_deleted() 45 return Ok(()); in ensure_deleted() 80 Ok(()) in check_pattern32() 100 Ok(()) in check_valid_size() 126 Ok(()) in write_pattern() 153 Ok(()) in read_pattern()
|
/trusty/user/base/lib/hwbcc/rust/src/ |
D | lib.rs | 71 Ok(()) in validate_response() 85 ) -> Result<S::Ok, S::Error> { in serialize() argument 132 ) -> Result<S::Ok, S::Error> { in serialize() argument 192 Ok(Self { status: msg.status, cmd: msg.cmd, payload: response_payload }) in deserialize() 229 Ok(response) in recv_resp() 240 Ok(&buf[..payload_size]) in read_payload() 287 Ok(DiceArtifacts { artifacts }) in get_dice_artifacts() 317 Ok(()) in ns_deprivilege() 350 Ok(bcc) in get_bcc() 399 Ok(cose_sign1) in sign_data()
|
/trusty/user/app/sample/memref-test/rust/ |
D | memref_test.rs | 140 ) -> Result<S::Ok, S::Error> { in serialize() argument 165 Ok(MemrefResponse { handle }) in deserialize() 179 Ok(ReadResponse { value: bytes[0] }) in deserialize() 194 ) -> Result<S::Ok, S::Error> { in serialize() argument 210 Ok(WriteResponse) in deserialize()
|
/trusty/user/app/sample/hwwsk/ |
D | main.rs | 38 Ok(ConnectResult::Accept(())) in on_connect() 56 Ok(MessageResult::MaintainConnection) in on_message()
|
/trusty/user/base/lib/hwkey/rust/src/ |
D | lib.rs | 156 Ok(&keyslot_data[..response.payload.len()]) in get_keyslot_data() 247 Ok(DeriveResult { in derive() 325 OsRollbackVersion::Current => Ok(HWKEY_ROLLBACK_VERSION_CURRENT), in try_into() 326 OsRollbackVersion::Version(version) => Ok(version.try_into()?), in try_into() 336 HWKEY_ROLLBACK_VERSION_CURRENT => Ok(OsRollbackVersion::Current), in try_from() 337 n => Ok(OsRollbackVersion::Version(n.try_into()?)), in try_from() 523 ) -> Result<S::Ok, S::Error> { in serialize() argument 546 ) -> Result<S::Ok, S::Error> { in serialize() argument 599 Ok(Self { in deserialize() 645 Ok(Self { in deserialize()
|
/trusty/user/app/keymint/secure_storage_manager/ |
D | software.rs | 396 Ok(match key_type.algo_hint { in signing_key() 403 Ok(match key_type.algo_hint { in cert_chain() 444 Ok(result) in hex_decode()
|