#[cfg(not(feature = "authmgrfe_fake_dice_chain"))] mod dice_handover;
#[cfg(feature = "authmgrfe_fake_dice_chain")] mod fake_dice_handover; #[cfg(feature = "authmgrfe_fake_dice_chain")] use fake_dice_handover as dice_handover;
usecrate::authorization::{authenticate_pvm, get_authmgr_fe}; usecrate::error::AuthMgrFeTrustyError; use alloc::rc::Rc; use dice_handover::get_dice_handover; use hwbcc::srv::HwBccService; use pvmdice::{PvmDice, PvmDiceThreadSafe}; use rpcbinder::RpcServer; use service_manager::get_supported_vintf_services; use std::sync::{Arc, Mutex}; use tipc::{service_dispatcher, Manager, PortCfg}; use tipc::{ClientIdentifier, Uuid};
let handover = get_dice_handover();
log::info!( "Initializing hwbcc server with PvmDice using handover of size: {} bytes.",
handover.len()
);
let pvmdice = Arc::new(Mutex::new(PvmDice::try_new(&handover)?)); let pvmdice_service = HwBccService::new(Rc::new(PvmDiceThreadSafe::new(Arc::clone(&pvmdice))));
let pvmdice_port_cfg =
PortCfg::new(HWBCC_PORT)?.allow_ta_connect().allowed_uuids(get_pvmdice_allowed_uuids());
// We provide a buffer because this Manager is handling buffered and unbuffered services. // On construction, the Manager will check if the buffer is sufficient for the configured // services.
Ok(Manager::<_, _, PORT_COUNT, CONNECTION_COUNT>::new_with_dispatcher(dispatcher, [0u8; 4096])?
.run_event_loop()?)
}
#[cfg(any(
feature = "authmgrfe_accessor_devicestate",
feature = "authmgrfe_accessor_hwcrypto",
feature = "authmgrfe_accessor_devicestate"
))] #[cfg(test)] mod authgmgr_fe_tests { usesuper::*; use binder::IBinder; use service_manager::*; use test::*; #[cfg(feature = "authmgrfe_accessor_storage")] use android_hardware_security_see_storage::aidl::android::hardware::security::see::storage::ISecureStorage::ISecureStorage; #[cfg(feature = "authmgrfe_accessor_hwcrypto")] use android_hardware_security_see_hwcrypto::aidl::android::hardware::security::see::hwcrypto::IHwCryptoKey::IHwCryptoKey;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.