diff --git a/headers/os/app/KeyStore.h b/headers/os/app/KeyStore.h index 625049549e..7af178fbf8 100644 --- a/headers/os/app/KeyStore.h +++ b/headers/os/app/KeyStore.h @@ -81,8 +81,13 @@ public: status_t GetNextApplication(const BKey& key, uint32& cookie, BString& signature) const; + status_t GetNextApplication(const char* keyring, + const BKey& key, uint32& cookie, + BString& signature) const; status_t RemoveApplication(const BKey& key, const char* signature); + status_t RemoveApplication(const char* keyring, + const BKey& key, const char* signature); // Service functions diff --git a/src/kits/app/KeyStore.cpp b/src/kits/app/KeyStore.cpp index 3278ba7e82..64cca00cf8 100644 --- a/src/kits/app/KeyStore.cpp +++ b/src/kits/app/KeyStore.cpp @@ -335,12 +335,21 @@ BKeyStore::RevokeMasterAccess() status_t BKeyStore::GetNextApplication(const BKey& key, uint32& cookie, BString& signature) const +{ + return GetNextApplication(NULL, key, cookie, signature); +} + + +status_t +BKeyStore::GetNextApplication(const char* keyring, const BKey& key, + 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); @@ -359,12 +368,21 @@ BKeyStore::GetNextApplication(const BKey& key, uint32& cookie, status_t BKeyStore::RemoveApplication(const BKey& key, const char* signature) +{ + return RemoveApplication(NULL, key, signature); +} + + +status_t +BKeyStore::RemoveApplication(const char* keyring, const BKey& key, + 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);