Remove the API part of the concept of apps per key.

The application access concept is on the keyring level only for now.
Generally it probably would get pretty complicated and therefore harder
to use when application access needs to be granted on a per key basis.
This commit is contained in:
Michael Lotz 2012-06-24 14:53:07 +02:00 committed by Ryan Leavengood
parent a5a5f4ca70
commit f8ccc32326
2 changed files with 12 additions and 26 deletions

View File

@ -79,15 +79,13 @@ public:
// Applications
status_t GetNextApplication(const BKey& key,
uint32& cookie, BString& signature) const;
status_t GetNextApplication(const char* keyring,
const BKey& key, uint32& cookie,
status_t GetNextApplication(uint32& cookie,
BString& signature) const;
status_t RemoveApplication(const BKey& key,
const char* signature);
status_t GetNextApplication(const char* keyring,
uint32& cookie, BString& signature) const;
status_t RemoveApplication(const char* signature);
status_t RemoveApplication(const char* keyring,
const BKey& key, const char* signature);
const char* signature);
// Service functions

View File

@ -333,24 +333,18 @@ BKeyStore::LockMasterKeyring()
status_t
BKeyStore::GetNextApplication(const BKey& key, uint32& cookie,
BString& signature) const
BKeyStore::GetNextApplication(uint32& cookie, BString& signature) const
{
return GetNextApplication(NULL, key, cookie, signature);
return GetNextApplication(NULL, cookie, signature);
}
status_t
BKeyStore::GetNextApplication(const char* keyring, const BKey& key,
uint32& cookie, BString& signature) const
BKeyStore::GetNextApplication(const char* keyring, uint32& cookie,
BString& signature) const
{
BMessage keyMessage;
if (key.Flatten(keyMessage) != B_OK)
return B_BAD_VALUE;
BMessage message(KEY_STORE_GET_NEXT_APPLICATION);
message.AddString("keyring", keyring);
message.AddMessage("key", &keyMessage);
message.AddUInt32("cookie", cookie);
BMessage reply;
@ -367,23 +361,17 @@ BKeyStore::GetNextApplication(const char* keyring, const BKey& key,
status_t
BKeyStore::RemoveApplication(const BKey& key, const char* signature)
BKeyStore::RemoveApplication(const char* signature)
{
return RemoveApplication(NULL, key, signature);
return RemoveApplication(NULL, signature);
}
status_t
BKeyStore::RemoveApplication(const char* keyring, const BKey& key,
const char* signature)
BKeyStore::RemoveApplication(const char* keyring, const char* signature)
{
BMessage keyMessage;
if (key.Flatten(keyMessage) != B_OK)
return B_BAD_VALUE;
BMessage message(KEY_STORE_REMOVE_APPLICATION);
message.AddString("keyring", keyring);
message.AddMessage("key", &keyMessage);
message.AddString("signature", signature);
return _SendKeyMessage(message, NULL);