Keystore 2.0: Initialize all KeyMint instances.
Test: Strongbox CTS tests on Devices sporting Strongbox.
Bug: 173546020
Change-Id: Ief1983571c8a16979ed1e0ed7e4f636ab269ce8d
diff --git a/keystore2/src/utils.rs b/keystore2/src/utils.rs
index eab9b4d..86a86dd 100644
--- a/keystore2/src/utils.rs
+++ b/keystore2/src/utils.rs
@@ -117,6 +117,13 @@
}
}
+impl Clone for Asp {
+ fn clone(&self) -> Self {
+ let lock = self.0.lock().unwrap();
+ Self(Mutex::new((*lock).clone()))
+ }
+}
+
/// Converts a set of key characteristics as returned from KeyMint into the internal
/// representation of the keystore service.
/// The parameter `hw_security_level` indicates which security level shall be used for