Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3526efd0 authored by Shikha Panwar's avatar Shikha Panwar
Browse files

Secretkeeper: Use byte[64] as SecretId

SecretId is a parameter in deleteIds() method, which will be invoked by
host (Android). Restrict the size to 64 bytes to avoid unnecessarily
large bytes making it to HAL & TA.

Test: atest VtsSecretkeeperTargetTest
Bug: 317374882
Change-Id: Ieb34fee4efd11636bee133fe9132c1d739d08a1c
parent 3d33a135
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,5 +35,5 @@ package android.hardware.security.secretkeeper;
/* @hide */
@VintfStability
parcelable SecretId {
  byte[] id;
  byte[64] id;
}
+1 −1
Original line number Diff line number Diff line
@@ -25,5 +25,5 @@ parcelable SecretId {
    /**
     * 64-byte identifier for a secret.
     */
    byte[] id;
    byte[64] id;
}
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ impl SkClient {
    fn delete(&self, ids: &[&Id]) {
        let ids: Vec<SecretId> = ids
            .iter()
            .map(|id| SecretId { id: id.0.to_vec() })
            .map(|id| SecretId { id: id.0 })
            .collect();
        self.sk.deleteIds(&ids).unwrap();
    }