#include <access-control.h>
#include <certificate-impl.h>
#include <sys/types.h>
+#include <generic-backend/gkey.h>
#include <platform/decider.h>
class CKMLogic {
public:
static const uid_t SYSTEM_DB_UID;
- class Exception
- {
- public:
- DECLARE_EXCEPTION_TYPE(CKM::Exception, Base)
- DECLARE_EXCEPTION_TYPE(Base, DatabaseLocked)
- };
CKMLogic();
CKMLogic(const CKMLogic &) = delete;
DataType dataType,
const PolicySerializable &policy);
+ int getKeyForService(const Credentials &cred,
+ const Name &name,
+ const Label &label,
+ const Password& pass,
+ Crypto::GKeyShPtr& key);
+
private:
// select private/system database depending on asking uid and owner label.
int resetUserPasswordHelper(uid_t user, const Password &newPassword);
+ int loadAppKey(UserData& handle, const Label& appLabel);
+
std::map<uid_t, UserData> m_userDataMap;
AccessControl m_accessControl;
Crypto::Decider m_decider;