commit | aec1459ec24afe2caaa9481b9f53cddba68c373d | [log] [tgz] |
---|---|---|
author | Janis Danisevskis <jdanis@google.com> | Thu Nov 12 09:41:49 2020 -0800 |
committer | Janis Danisevskis <jdanis@google.com> | Tue Nov 17 12:20:51 2020 -0800 |
tree | ea5386e4d0f10e4d0d1821ec4485c4baf2968d6a | |
parent | a53c9cf7980fa3bcc924a3f5ce53df194c421084 [diff] |
Keystore 2.0: Make key blob upgrade atomic. This patch adds a key id lock. load_key_entry now returns a key id guard, and database operations, that manipulate key entries require a valid guard. This is mainly used to make upgrading the key blob atomic. This patch also adds key upgrade to wrapped key import and adds a helper function, that hides the upgrade-required-retry logic. Test: keystore2_test Change-Id: I3f816817c731b89acb651b7d9a5fcacdd46c567f