Fixing interface name for secureclock
Keystore2 was not appending the instance name to the ISecureClock
interface when attempting to form a binder connection.
Fixes: 184571115
Test: atest CtsIdentityTestCases
Change-Id: I0e2bd5abeeda06e364a3bc58f7b5fd3a96d33875
diff --git a/keystore2/src/globals.rs b/keystore2/src/globals.rs
index 54f7dc7..58142a4 100644
--- a/keystore2/src/globals.rs
+++ b/keystore2/src/globals.rs
@@ -278,8 +278,10 @@
let secure_clock_available =
secureclock_instances.as_vec()?.iter().any(|instance| *instance == "default");
+ let default_time_stamp_service_name = format!("{}/default", TIME_STAMP_SERVICE_NAME);
+
let secureclock = if secure_clock_available {
- map_binder_status_code(binder::get_interface(TIME_STAMP_SERVICE_NAME))
+ map_binder_status_code(binder::get_interface(&default_time_stamp_service_name))
.context("In connect_secureclock: Trying to connect to genuine secure clock service.")
} else {
// This is a no-op if it was called before.