2 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
18 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
20 * @brief Main header file for client library.
28 #include <ckm/ckm-error.h>
29 #include <ckm/ckm-type.h>
31 // Central Key Manager namespace
35 typedef std::shared_ptr<Control> ControlShPtr;
37 // used by login manager to unlock user data with global password
41 // decrypt user key with password
42 virtual int unlockUserKey(uid_t user, const Password &password) const = 0;
44 // remove user key from memory
45 virtual int lockUserKey(uid_t user) const = 0;
47 // remove user data from Store and erase key used for encryption
48 virtual int removeUserData(uid_t user) const = 0;
50 // change password for user
51 virtual int changeUserPassword(uid_t user, const Password &oldPassword, const Password &newPassword) const = 0;
53 // This is work around for security-server api - resetPassword that may be called without passing oldPassword.
54 // This api should not be supported on tizen 3.0
55 // User must be already logged in and his DKEK is already loaded into memory in plain text form.
56 // The service will use DKEK in plain text and encrypt it in encrypted form (using new password).
57 virtual int resetUserPassword(uid_t user, const Password &newPassword) const = 0;
61 static ControlShPtr create();