Add generic unlock key setting and removal.

* Replace {Set|Remove}MasterKey() by generic {Set|Remove}UnlockKey()
  that works on a keyring.
* Implement {Set|Remove}MasterUnlockKey() on top of that.
* Rename the commands and constants accrodingly.
* Implement setting and removing keyring unlock keys.
This commit is contained in:
Michael Lotz
2013-03-05 11:04:57 -05:00
committed by Ryan Leavengood
parent a82011ff96
commit 4a0460a9bc
4 changed files with 72 additions and 23 deletions
+7 -3
View File
@@ -57,10 +57,14 @@ public:
status_t GetNextKeyring(uint32& cookie,
BString& keyring);
// Master key
status_t SetUnlockKey(const char* keyring,
const BKey& key);
status_t RemoveUnlockKey(const char* keyring);
status_t SetMasterKey(const BKey& key);
status_t RemoveMasterKey();
// Master keyring
status_t SetMasterUnlockKey(const BKey& key);
status_t RemoveMasterUnlockKey();
status_t AddKeyringToMaster(const char* keyring);
status_t RemoveKeyringFromMaster(const char* keyring);