Merge "[dice] Remove unneeded dependence ZVec for libdiced_open_dice"
diff --git a/diced/open_dice/Android.bp b/diced/open_dice/Android.bp
index b76a764..2505b42 100644
--- a/diced/open_dice/Android.bp
+++ b/diced/open_dice/Android.bp
@@ -40,13 +40,14 @@
rustlibs: [
"libopen_dice_bcc_bindgen",
"libopen_dice_cbor_bindgen",
- // For ZVec
- "libkeystore2_crypto_rust",
"libzeroize",
],
features: [
"std",
],
+ shared_libs: [
+ "libcrypto",
+ ],
whole_static_libs: [
"libopen_dice_bcc",
],
@@ -158,11 +159,6 @@
name: "libopen_dice_cbor_bindgen",
defaults: ["libopen_dice_cbor_bindgen.rust_defaults"],
whole_static_libs: ["libopen_dice_cbor"],
- // TODO(b/267575445): Remove the visibility to open_dice_cbor once everything
- // in open_dice_cbor is moved to open_dice
- visibility: [
- "//system/security/diced/open_dice_cbor",
- ],
}
rust_bindgen {
diff --git a/diced/open_dice/src/error.rs b/diced/open_dice/src/error.rs
index 7405c51..4c67335 100644
--- a/diced/open_dice/src/error.rs
+++ b/diced/open_dice/src/error.rs
@@ -29,16 +29,6 @@
BufferTooSmall,
/// Platform error.
PlatformError,
- /// The allocation of a ZVec failed.
- #[cfg(feature = "std")]
- ZVecError(keystore2_crypto::zvec::Error),
-}
-
-#[cfg(feature = "std")]
-impl From<keystore2_crypto::zvec::Error> for DiceError {
- fn from(e: keystore2_crypto::zvec::Error) -> Self {
- Self::ZVecError(e)
- }
}
/// This makes `DiceError` accepted by anyhow.
@@ -51,8 +41,6 @@
Self::InvalidInput => write!(f, "invalid input"),
Self::BufferTooSmall => write!(f, "buffer too small"),
Self::PlatformError => write!(f, "platform error"),
- #[cfg(feature = "std")]
- Self::ZVecError(e) => write!(f, "ZVec allocation failed {e}"),
}
}
}