Add Support for metadata key with rollback
This adds the ability to upgrade a key and retain the
old one for rollback purposes. We delete the old key
if we boot successfully and delete the new key if we
do not.
Test: Enable checkpointing and test rolling back
between two versions
Bug: 111020314
Change-Id: I19f31a1ac06a811c0644fc956e61b5ca84e7241a
diff --git a/KeyUtil.h b/KeyUtil.h
index b4115f4..7ee6725 100644
--- a/KeyUtil.h
+++ b/KeyUtil.h
@@ -33,7 +33,7 @@
const std::string& key_path, const std::string& tmp_path,
std::string* key_ref);
bool retrieveKey(bool create_if_absent, const std::string& key_path, const std::string& tmp_path,
- KeyBuffer* key);
+ KeyBuffer* key, bool keepOld = true);
} // namespace vold
} // namespace android