Extra legacy messages for secure port
See aosp/2272566 and aosp/2272606 for C++ implementation.
Bug: 197891150
Bug: 259556277
Test: build
Change-Id: Ia7e9aa61d17c1452ce56cb592b7c91da06b277ee
diff --git a/ipc_manager.rs b/ipc_manager.rs
index 1685d83..96b1951 100644
--- a/ipc_manager.rs
+++ b/ipc_manager.rs
@@ -20,10 +20,10 @@
use kmr_common::{
crypto, km_err,
wire::legacy::{
- self, ConfigureBootPatchlevelResponse, GetAuthTokenKeyResponse, GetVersion2Response,
- GetVersionResponse, SetAttestationIdsResponse, SetAttestationKeyResponse,
- SetBootParamsResponse, TrustyMessageId, TrustyPerformOpReq, TrustyPerformOpRsp,
- TrustyPerformSecureOpReq, TrustyPerformSecureOpRsp,
+ self, ConfigureBootPatchlevelResponse, GetAuthTokenKeyResponse, GetDeviceInfoResponse,
+ GetVersion2Response, GetVersionResponse, SetAttestationIdsResponse,
+ SetAttestationKeyResponse, SetBootParamsResponse, TrustyMessageId, TrustyPerformOpReq,
+ TrustyPerformOpRsp, TrustyPerformSecureOpReq, TrustyPerformSecureOpRsp,
},
Error,
};
@@ -423,6 +423,24 @@
None => Err(km_err!(UnknownError, "hmac_key is not available")),
}
}
+ TrustyPerformSecureOpReq::GetDeviceInfo(_) => {
+ Ok(TrustyPerformSecureOpRsp::GetDeviceInfo(GetDeviceInfoResponse {
+ device_ids: self.km_ta.borrow().rpc_device_info()?,
+ }))
+ }
+ TrustyPerformSecureOpReq::SetAttestationIds(req) => {
+ secure_storage_manager::provision_attestation_id_file(
+ &req.brand,
+ &req.product,
+ &req.device,
+ &req.serial,
+ &req.imei,
+ &req.meid,
+ &req.manufacturer,
+ &req.model,
+ )?;
+ Ok(TrustyPerformSecureOpRsp::SetAttestationIds(SetAttestationIdsResponse {}))
+ }
}
}
}