Merge "Update globals to log security levels on fail" into main am: dae62efa2c am: fc14547a89

Original change: https://android-review.googlesource.com/c/platform/system/security/+/2983611

Change-Id: Ia85dee7be61250d15d048b472da98efe2a9e5f19
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Shaquille Johnson 2024-03-06 16:02:09 +00:00 committed by Automerger Merge Worker
commit e31e5a2f8d

View file

@ -247,7 +247,11 @@ fn connect_keymint(
} }
e => e, e => e,
}) })
.context(ks_err!("Trying to get Legacy wrapper."))?, .context(ks_err!(
"Trying to get Legacy wrapper. Attempt to get keystore \
compat service for security level {:?}",
*security_level
))?,
None, None,
) )
}; };
@ -394,7 +398,7 @@ fn connect_secureclock() -> Result<Strong<dyn ISecureClock>> {
} }
e => e, e => e,
}) })
.context(ks_err!("Trying to get Legacy wrapper.")) .context(ks_err!("Failed attempt to get legacy secure clock."))
}?; }?;
Ok(secureclock) Ok(secureclock)
@ -437,5 +441,5 @@ pub fn get_remotely_provisioned_component_name(security_level: &SecurityLevel) -
_ => None, _ => None,
} }
.ok_or(Error::Km(ErrorCode::HARDWARE_TYPE_UNAVAILABLE)) .ok_or(Error::Km(ErrorCode::HARDWARE_TYPE_UNAVAILABLE))
.context(ks_err!()) .context(ks_err!("Failed to get rpc for sec level {:?}", *security_level))
} }