Merge "Updated to use shared library instead of static library." into main
diff --git a/keystore2/src/error.rs b/keystore2/src/error.rs
index 3ca3942..d6ae0ce 100644
--- a/keystore2/src/error.rs
+++ b/keystore2/src/error.rs
@@ -55,10 +55,6 @@
/// Wraps a Binder status code.
#[error("Binder transaction error {0:?}")]
BinderTransaction(StatusCode),
- /// Wraps a Remote Provisioning ErrorCode as defined by the IRemotelyProvisionedComponent
- /// AIDL interface spec.
- #[error("Error::Rp({0:?})")]
- Rp(ErrorCode),
}
impl Error {
@@ -103,16 +99,6 @@
})
}
-/// Helper function to map the binder status we get from calls into a RemotelyProvisionedComponent
-/// to a Keystore Error. We don't create an anyhow error here to make
-/// it easier to evaluate service specific errors.
-pub fn map_rem_prov_error<T>(r: BinderResult<T>) -> Result<T, Error> {
- r.map_err(|s| match s.exception_code() {
- ExceptionCode::SERVICE_SPECIFIC => Error::Rp(ErrorCode(s.service_specific_error())),
- e_code => Error::Binder(e_code, 0),
- })
-}
-
/// This function is similar to map_km_error only that we don't expect
/// any KeyMint error codes, we simply preserve the exception code and optional
/// service specific exception.
@@ -230,7 +216,6 @@
match root_cause.downcast_ref::<Error>() {
Some(Error::Rc(rcode)) => rcode.0,
Some(Error::Km(ec)) => ec.0,
- Some(Error::Rp(_)) => ResponseCode::SYSTEM_ERROR.0,
// If an Error::Binder reaches this stage we report a system error.
// The exception code and possible service specific error will be
// printed in the error log above.