From f8ccc323268f9ad9f2925d06ac5bf281395ca26a Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 24 Jun 2012 14:53:07 +0200 Subject: [PATCH] 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. --- headers/os/app/KeyStore.h | 12 +++++------- src/kits/app/KeyStore.cpp | 26 +++++++------------------- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/headers/os/app/KeyStore.h b/headers/os/app/KeyStore.h index aae65f111f..0d30390d4b 100644 --- a/headers/os/app/KeyStore.h +++ b/headers/os/app/KeyStore.h @@ -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 diff --git a/src/kits/app/KeyStore.cpp b/src/kits/app/KeyStore.cpp index f0f7de71c7..9b616bb305 100644 --- a/src/kits/app/KeyStore.cpp +++ b/src/kits/app/KeyStore.cpp @@ -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);