Keystore 2.0: Fix convertStorageKeyToEphemenral
Version binding of storage keys was broken in that the old keyblob was
passed to the KM backed instead of the upgraded key blob when an upgrade
was required.
Ignore-AOSP-First: No mergepath from AOSP
Bug: 187304488
Bug: 194444841
Test: N/A
Merged-In: Iad3e9d4c0de2f8c7121147c81590e56663fe596f
Change-Id: Iad3e9d4c0de2f8c7121147c81590e56663fe596f
diff --git a/keystore2/src/security_level.rs b/keystore2/src/security_level.rs
index 365f8da..5cb3afc 100644
--- a/keystore2/src/security_level.rs
+++ b/keystore2/src/security_level.rs
@@ -914,7 +914,7 @@
"In convert_storage_key_to_ephemeral: calling convertStorageKeyToEphemeral (2)",
500,
);
- map_km_error(km_dev.convertStorageKeyToEphemeral(key_blob))
+ map_km_error(km_dev.convertStorageKeyToEphemeral(&upgraded_blob))
}
.context(concat!(
"In convert_storage_key_to_ephemeral: ",