Go to the documentation of this file.
10 #include "../sefile/SEfile.h"
11 #include "../sqlite/sqlite3.h"
14 #define AES256KEYLEN 32
18 #define UPDATE_RECORD_HEADER_LEN 11
21 enum update_record_type {
63 #define NUMBER_RESERVED_KEY_IDS 100
64 #define NUMBER_MASTER_SLAVE_KEY_IDS 100000
65 #define KEY_ID_RESERVED_RANGE_BEGIN 1
66 #define KEY_ID_RESERVED_RANGE_END NUMBER_RESERVED_KEY_IDS
67 #define KEY_ID_SEKEY_BEGIN (KEY_ID_RESERVED_RANGE_END + 1)
68 #define KEY_ID_SEKEY_END (UINT32_MAX - NUMBER_MASTER_SLAVE_KEY_IDS)
69 #define KEY_ID_MASTER_SLAVE_BEGIN (KEY_ID_SEKEY_END + 1)
70 #define KEY_ID_MASTER_SLAVE_END UINT32_MAX
72 #define wildcard_key_ID 2
75 enum class se_key_status {
90 private_signature = 101,
91 public_signature_verification = 102,
92 symmetric_authentication = 103,
93 private_authentication = 104,
94 public_authentication = 105,
95 symmetric_data_encryption = 106,
96 symmetric_key_wrapping = 107,
98 symmetric_key_derivation = 109,
99 private_key_transport = 110,
100 public_key_transport = 111,
101 symmetric_key_agreement = 112,
102 private_static_key_agreement = 113,
103 public_static_key_agreement = 114,
104 private_ephemeral_key_agreement = 115,
105 public_ephemeral_key_agreement = 116,
106 symmetric_authorization = 117,
107 private_authorization = 118,
108 public_authorization = 119,
143 std::string username;
144 std::string device_sn;
165 se_user(std::string& user_id, std::string& user_name, std::string& serialnumber, std::string& userpin, std::string& adminpin, uint32_t
k1, uint32_t
k2, uint32_t algo, uint32_t init_flag, int64_t cnt);
166 void set_id(std::string& new_id);
168 void set_name(std::string& new_name);
171 std::string& get_sn(){
return this->
sn;};
185 group_policy(uint32_t maxkeys, uint32_t algo, uint32_t cryptoperiod);
187 uint32_t get_max_keys();
188 uint32_t get_algorithm();
189 uint32_t get_default_cryptoperiod();
190 void set_max_keys(uint32_t maxkeys);
191 void set_default_cryptoperiod(uint32_t cryptoperiod);
192 void set_algorithm(uint32_t algo);
222 se_key(std::string& key_id, uint32_t algo, uint32_t key_length, time_t act, time_t exp);
223 se_key(std::string& key_id, std::string& key_name, std::string& key_owner,
se_key_status key_status, uint32_t key_algo, uint32_t key_length, time_t gen, time_t act,
224 time_t exp, time_t crypto, time_t
deactivation,
se_key_type key_type, time_t compr, time_t destr, time_t susp);
226 std::string& get_id();
229 void print_key_details(std::ofstream& sekey_log);
246 std::string& get_id();
247 void set_id(std::string& new_id);
248 std::string& get_name();
249 void set_name(std::string& new_name);
250 uint32_t get_users_counter();
251 void set_users_counter(uint32_t cnt);
252 uint32_t get_keys_counter();
253 void set_keys_counter(uint32_t cnt);
254 uint32_t get_keys_maxnumber();
255 void set_keys_maxnumber(uint32_t max);
256 uint32_t get_keys_algorithm();
257 void set_keys_algorithm(uint32_t algo);
258 uint32_t get_keys_cryptoperiod();
259 void set_keys_cryptoperiod(uint32_t cryptoperiod);
260 void print_group_details(std::ofstream& sekey_log);
272 ~statement(){ sqlite3_finalize(this->stmt); this->stmt =
nullptr; };
276 sqlite3_stmt **
getstmtref(){ sqlite3_finalize(this->stmt);
return &(this->
stmt); };
292 int sekey_admin_init(L1& l1, std::vector<std::string>& pin, std::string& userpin, std::string& adminpin);
293 int sekey_init_user_SEcube(std::string& uid, std::string& userpin, std::string& adminpin, std::vector<std::string>& pin);
308 int sekey_add_key(std::string& key_id, std::string& key_name, std::string& key_owner, uint32_t cryptoperiod,
se_key_type keytype);
316 int sekey_find_key_v3(std::string& chosen_key, std::string& source_user_id, std::vector<std::string>& dest_user_id,
se_key_type keytype);
339 std::string
algomap(uint32_t algorithm);
340 uint32_t
algolen(uint32_t algorithm);
354 int sekey_user_init(std::string& user_id, std::string& username, std::string& sn);
358 void req_delete_user(std::string& user_id, std::string& uid,
bool erase);
359 void req_delete_user(std::string& user_id, uint32_t algo, uint32_t key_id, std::string& sn,
bool erase,
int mode);
364 void send_key_update(std::string& user_id, uint32_t kid, uint32_t key_len,
bool erase);
371 void send_sql_update(std::string& user_id, std::string& query,
bool erase);
379 void key_update_iterator(std::vector<std::string>& users, uint32_t kid, uint32_t key_len,
bool erase);
383 int sql_fill_vector(std::string *bind, std::string& query, std::vector<std::string> *container);
384 uint32_t
get_u32(sqlite3_stmt *stmt,
int index);
393 int algocmp(uint32_t algo1, uint32_t algo2);
time_t generation
Definition: SEkey.h:211
uint32_t algorithm
Definition: SEkey.h:181
uint32_t users_counter
Definition: SEkey.h:238
time_t deactivation
Definition: SEkey.h:214
int file_exists(std::string &filename)
Check if a SEfile file exists. Automatically translate the plaintext filename to the encrypted filena...
int sekey_user_change_name(std::string &userID, std::string &newname)
Change the name of a user. Available only for the administrator.
void req_delete_user_from_group(std::string &user_id, std::string &uid, std::string &group_id, bool erase)
Function to write in the update file of a user the request to delete a user from a group....
int sekey_start(L0 &l0, L1 *l1ptr)
API to start the SEkey KMS.
Definition: SEkey.cpp:282
uint32_t klen
Definition: SEkey.h:130
time_t suspension
Definition: SEkey.h:217
int sekey_recovery()
Iterate over the recovery table of SEkey processing all the recovery requests. Available only for the...
Definition: SEkey.cpp:977
int sekey_add_group(std::string &groupID, std::string &group_name, group_policy policy)
API to add a group to SEkey. Available only for the administrator.
#define UPDATE_RECORD_HEADER_LEN
Length of header of each update record in the update, init or recovery file. 1 byte for the type,...
Definition: SEkey.h:18
~statement()
Definition: SEkey.h:272
int is_user_present(std::string &user_id)
Check if a user is already stored in the SEkey KMS.
std::string id
Definition: SEkey.h:236
string keytypemap(se_key_type t)
Convert a key type to the corresponding string.
Definition: SEkey.cpp:4983
int sql_fill_vector(std::string *bind, std::string &query, std::vector< std::string > *container)
Executes a SQLite query (with one parameter to bind) and stores the results in a vector of strings.
time_t activation
Definition: SEkey.h:212
std::string query
Definition: SEkey.h:131
uint16_t secure_init(L1 *l1ptr, uint32_t keyID, uint16_t crypto)
This function is used to initialize the security context of a SEfile object.
Definition: SEfile.cpp:197
int fill_recovery(std::vector< std::string > &users)
Add one or more users of SEkey to the list of users who need recovery.
L1 * SEcube
Definition: SEkey.cpp:22
std::unique_ptr< uint8_t[]> wcard_key
Definition: SEkey.h:134
int sekey_check_expired_keys()
Check for expired keys inside SEkey. Expired keys which are still flagged as active will be deactivat...
Definition: SEkey.cpp:2923
int64_t update_cnt
Definition: SEkey.h:160
int sekey_activate_key(std::string &key_id)
Activate a key. Available only for the administrator.
uint32_t algolen(uint32_t algorithm)
Return the length (in byte) of the key, given the algorithm. Return 0 if algorithm is unknown.
Definition: SEkey.cpp:4937
#define SEkey_ID
The key ID 1 is reserved for the database internally used by SEkey.
Definition: SEkey.h:71
int sekey_add_key(std::string &key_id, std::string &key_name, std::string &key_owner, uint32_t cryptoperiod, se_key_type keytype)
Add a key to SEkey. Available only for the administrator.
std::string name
Definition: SEkey.h:152
uint16_t crypto_filename(char *path, char *enc_name, uint16_t *encoded_length)
This function computes the encrypted name of the file specified as path.
Definition: SEfile.cpp:1410
void sql_update_iterator(std::vector< std::string > &users, std::string &query, bool erase)
Wrapper to execute send_sql_update() for all users inside a list.
void get_filename(char *path, char *file_name)
Extract the name of a file from its path.
Definition: SEfile.cpp:1602
se_key_type
Possible key types. Notice that only symmetric_data_encryption is supported, other types are listed h...
Definition: SEkey.h:88
Handy RAII wrapper for sqlite3_stmt which requires call to sqlite3_finalize to avoid resource leakage...
Definition: SEkey.h:265
The policy class is used to model a security policy adopted by a group. A policy for a group has 3 fe...
Definition: SEkey.h:178
int sekey_stop()
API to stop the SEkey KMS.
Definition: SEkey.cpp:441
#define SEFILE_BEGIN
Definition: SEfile_C_interface.h:92
se_key_status
Possible status assumed by a key. There are specific rules for status transition, see check_key_trans...
Definition: SEkey.h:75
sqlite3_stmt ** getstmtref()
Definition: SEkey.h:276
std::vector< se_user > users_list
Definition: SEkey.h:241
std::string owner
Definition: SEkey.h:206
#define KEY_ID_MASTER_SLAVE_END
Maximum range value of master-slave key identifiers.
Definition: SEkey.h:70
int sekey_delete_user_group(std::string &user_id, std::string &group_id)
Delete a user from a group. All keys of that group will be deleted from the SEcube of the user....
uint32_t k1
Definition: SEkey.h:157
int send_user_init_update(std::string &user_id, std::string &query)
Send to a new SEkey user the update containing basic info to initialize his SEkey database.
int sekey_add_user(std::string &user_id, std::string &username)
Add a new user to SEkey. Available only for the administrator.
Simlpe struct used to store the details about the SEkey user which is using the application....
Definition: SEkey.h:141
std::string & get_id()
Definition: SEkey.cpp:133
uint32_t init
Definition: SEkey.h:159
void print_user_details(std::ofstream &sekey_log)
Definition: SEkey.cpp:145
statement()
Definition: SEkey.h:270
bool check_input(std::string &in, uint8_t sel)
Checks if an ID matches the corresponding regular expression.
uint32_t max_keys
Definition: SEkey.h:180
int sekey_group_change_default_cryptoperiod(std::string &groupID, uint32_t cryptoperiod)
Change the default cryptoperiod of a specific group. Available only for the administrator.
int sekey_user_get_info_all(std::vector< se_user > *users)
Retrieve the details about all users of SEkey.
bool isvalid()
Definition: SEkey.cpp:269
std::string sn
Definition: SEkey.h:153
#define KEY_ID_RESERVED_RANGE_END
Maximum range value of reserved key identifiers (100).
Definition: SEkey.h:66
string cryptoperiod_to_days(uint32_t n)
Convert an integer to number of days, hours, minutes and seconds into a readable string.
Definition: SEkey.cpp:5078
int open_update_file(SEfile &updatefile, std::string &sn, bool overwrite, bool create, int mode)
Open an update file of a specific user.
std::vector< std::string > groups
Definition: SEkey.h:161
uint16_t secure_seek(int32_t offset, int32_t *position, uint8_t whence)
This function is used to move the file pointer of a file managed by a SEfile object.
Definition: SEfile.cpp:639
int usr_delete_group(char *buffer)
Function executed only when SEkey is running in user mode. This performs the actions requested by req...
Definition: SEkey.cpp:3675
int rollback_transaction()
Rollback a SQLite transaction.
Definition: SEkey.cpp:4448
void delete_user_from_group_iterator(std::vector< std::string > &users, std::string &user_id, std::string &group_id, bool erase)
Wrapper around req_delete_user_from_group() to invoke the function for each user in the users vector ...
uint32_t algo
Definition: SEkey.h:129
#define SEFILE_OPEN
Definition: SEfile_C_interface.h:72
std::string id
Definition: SEkey.h:151
int sekey_group_change_max_keys(std::string &groupID, uint32_t maxkeys)
Change the maximum number of keys that a group can be associated to. Available only for the administr...
uint16_t secure_open(char *path, int32_t mode, int32_t creation)
This function opens or creates a secure file managed with SEfile.
Definition: SEfile.cpp:240
The key class is used to model a key object. A key has several properties which are kept private (id,...
Definition: SEkey.h:202
int sekey_key_get_info(std::string &key_id, se_key *key)
Retrieve the details about a single key.
int usr_store_key(char *buffer)
Function executed only when SEkey is running in user mode. Execute operations requested by send_key_u...
Definition: SEkey.cpp:3640
int sekey_find_key_v3(std::string &chosen_key, std::string &source_user_id, std::vector< std::string > &dest_user_id, se_key_type keytype)
Find a suitable key to encrypt data given a sender and multiple recipients.
The user class is used to model a user object. User's attributes are private but methods are availabl...
Definition: SEkey.h:149
struct userdata_ userdata
Structure used to enclose all elements required by the APIs to initialize a user device inside SEkey.
uint16_t secure_close()
This function releases the resources related to the underlying SEfile object (i.e....
Definition: SEfile.cpp:809
This file includes everything about SEkey.
std::string uname
Definition: SEkey.h:126
int sekey_recovery_request(std::string &user_id, std::string &serial_number)
Explicitly request to SEkey to execute the recovery procedure for a specific user,...
int sekey_init_user_SEcube(std::string &uid, std::string &userpin, std::string &adminpin, std::vector< std::string > &pin)
API to initialize the SEcube device of a SEkey user. Admin only.
void finalize()
Definition: SEkey.h:278
uint32_t k2
Definition: SEkey.h:128
#define wildcard_key_ID
The key ID 2 is reserved for internal purposes of SEkey.
Definition: SEkey.h:72
int sekey_key_get_info_all(std::vector< se_key > *keys)
Retrieve the details about all keys of SEkey.
time_t expiration
Definition: SEkey.h:213
void delete_group_iterator(std::vector< std::string > &users, std::string &group_id, bool erase)
Wrapper around req_delete_group() to invoke the function for each user in the users vector passed as ...
int sekey_write_recovery(std::string &user_id, std::string &serial_number)
Generate the recovery file for a specific user. Available only for the administrator.
uint32_t keys_counter
Definition: SEkey.h:239
int usr_delete_user(char *buffer)
Function executed only when SEkey is running in user mode. This performs the actions requested by req...
Definition: SEkey.cpp:3554
uint32_t k2
Definition: SEkey.h:158
sqlite3_stmt * stmt
Definition: SEkey.h:267
void set_name(std::string &new_name)
Definition: SEkey.cpp:137
filetype
Used to identify the different types of files used by the update mechanism of SEkey....
Definition: SEkey.h:116
int process_update_file()
Process updates for the current user.
Definition: SEkey.cpp:3812
int sekey_add_user_group(std::string &userID, std::string &groupID)
Add an existing user to an existing group. Available only for the administrator.
int usr_delete_user_from_group(char *buffer)
Function executed only when SEkey is running in user mode. This performs the actions requested by req...
Definition: SEkey.cpp:3445
int sekey_admin_init(L1 &l1, std::vector< std::string > &pin, std::string &userpin, std::string &adminpin)
Initialize the SEcube of the administrator of SEkey.
std::string user_pin
Definition: SEkey.h:154
int sekey_user_get_info(std::string &userid, se_user *user)
Retrieve the details about a single user.
se_key_type type
Definition: SEkey.h:208
std::string name
Definition: SEkey.h:237
#define KEY_ID_MASTER_SLAVE_BEGIN
Minimum range value of master-slave key identifiers.
Definition: SEkey.h:69
#define NAMELEN
This is the maximum length accepted for a name or label (i.e. the username, the label of a group or t...
Definition: SEkey.h:16
void req_delete_group(std::string &user_id, std::string &gid, bool erase)
Function to write in the update file of a user the request to delete a group from SEkey.
int sekey_group_get_info_all(std::vector< se_group > *groups)
Retrieve the details about all groups of SEkey (keys and users excluded).
uint32_t length
Definition: SEkey.h:210
int sekey_delete_user(std::string &userID)
Delete a user from SEkey; the user will not be able to use the key management system anymore....
bool algovalid(uint32_t algorithm)
Check if the algorithm is valid. In order to be valid, the algorithm should be included in L1Algorith...
Definition: SEkey.cpp:4949
int sekey_delete_group(std::string &groupID)
API to delete a group from SEkey. Available only for the administrator.
void send_key_update(std::string &user_id, uint32_t kid, uint32_t key_len, bool erase)
Function to write in a secure way a key of SEkey to the update file of a user. Available only for the...
std::unique_ptr< uint8_t[]> k1_data
Definition: SEkey.h:132
uint32_t get_u32(sqlite3_stmt *stmt, int index)
Wrapper around sqlite3_column_int64() to retrieve the corresponding 32 bit unsigned value.
Definition: SEkey.cpp:4647
int usr_sql_exec(char *buffer, uint32_t bufsize)
Function executed only when SEkey is running in user mode. This function will execute a SQL query wri...
int sekey_key_change_status(std::string &key_id, se_key_status status)
Change the status of a key. Available only for the administrator.
std::vector< se_key > keys_list
Definition: SEkey.h:242
time_t sekey_gettime()
SEkey interface to retrieve the timestamp to be set for any KMS need. This API should be customized i...
Definition: SEkey.cpp:3438
#define MAX_PATHNAME
Definition: SEfile_C_interface.h:165
std::vector< std::unique_ptr< SEfile > > databases
Definition: SEcureDB.cpp:5
bool user_allowed()
Check if SEkey in user mode is updated to latest version. If not block every operation.
Definition: SEkey.cpp:4608
#define SEFILE_READ
Definition: SEfile_C_interface.h:51
#define SEFILE_NEWFILE
Definition: SEfile_C_interface.h:71
void send_sql_update(std::string &user_id, std::string &query, bool erase)
Write a SQL query to the update file of a specific user.
int is_group_present(std::string &group_id)
Same as is_user_present(), simply written for groups. May throw.
time_t destruction
Definition: SEkey.h:216
int sekey_update_userdata()
Synchronize the data of SEkey stored on the SEcube of the user with the data stored on the SEcube of ...
Definition: SEkey.cpp:549
#define KEY_ID_RESERVED_RANGE_BEGIN
Minimum value of reserved key identifiers (notice that 1 and 2 are already used by SEkey).
Definition: SEkey.h:65
void req_delete_user(std::string &user_id, std::string &uid, bool erase)
Function to write in the update file of a user the request to delete entirely another user from SEkey...
#define SEFILE_WRITE
Definition: SEfile_C_interface.h:52
uint32_t algorithm
Definition: SEkey.h:209
int sekey_group_get_info(std::string &groupID, se_group *group)
Retrieve the details about a single group (keys and users excluded).
uint16_t secure_read(uint8_t *dataOut, uint32_t dataOut_len, uint32_t *bytesRead)
This function reads dataOut_len bytes into dataOut from the file descriptor managed by the underlying...
Definition: SEfile.cpp:552
std::string uid
Definition: SEkey.h:125
uint32_t k1
Definition: SEkey.h:127
int commit_transaction()
Commit a SQLite transaction.
Definition: SEkey.cpp:4467
std::string name
Definition: SEkey.h:205
time_t cryptoperiod
Definition: SEkey.h:218
std::string admin_pin
Definition: SEkey.h:155
bool SEkey_running
Definition: SEkey.cpp:21
int sekey_find_key_v2(std::string &chosen_key, std::string &source_user_id, std::string &group_id, se_key_type keytype)
Find a suitable key to encrypt data to be delivered from a single user to an entire group.
void key_update_iterator(std::vector< std::string > &users, uint32_t kid, uint32_t key_len, bool erase)
Wrapper around send_key_update() to invoke the function for each user in the users vector passed as a...
uint16_t secure_write(uint8_t *dataIn, uint32_t dataIn_len)
This function writes the bytes stored at dataIn to the encrypted file managed by the SEfile object on...
Definition: SEfile.cpp:432
std::string id
Definition: SEkey.h:204
int algocmp(uint32_t algo1, uint32_t algo2)
Check if algo1 is stronger than algo2. Return 1 if stronger, return -1 if weaker, 0 if equal.
Definition: SEkey.cpp:4621
string algomap(uint32_t algo)
Map an algorithm (expressed as integer) to the corresponding algorithm expressed as string.
Definition: SEkey.cpp:5055
#define IDLEN
Maximum length expected (in bytes) for a generic ID (could be a key, a user or a group)....
Definition: SEkey.h:15
void add_group(std::string &group)
Definition: SEkey.cpp:141
uint32_t default_cryptoperiod
Definition: SEkey.h:182
uint32_t stoul_wrap(std::string &s)
Wrapper around stoul() function.
int reset_user_recovery(std::string &user_id, std::string &sn)
Remove a user from list of users who need a complete recovery of the SEkey database....
string sqlite3_column_text_wrapper(sqlite3_stmt *stmt, int col)
Safe wrapper around the sqlite3_column_text() API of SQLite.
Definition: SEkey.cpp:4676
Implement the concept of group inside SEkey. Class members are kept private and suitable getter/sette...
Definition: SEkey.h:234
int sekey_user_init(std::string &user_id, std::string &username, std::string &sn)
Function to add a user to SEkey, embedded by sekey_add_user(). Must not be called explicitly,...
int is_key_present(std::string &key_id)
Same as is_user_present(), simply written for keys. May throw.
uint16_t secure_getfilesize(char *path, uint32_t *position, L1 *SEcubeptr)
This function is used to get the total logic size of an encrypted file pointed by path....
Definition: SEfile.cpp:1452
int sqlite3_expanded_sql_wrapper(sqlite3_stmt *stmt, std::string &s)
Wrapper around the sqlite3_expanded_sql() function from SQLite.
#define PINLEN
Length (bytes) of the PIN used to login as user or admin to the SEcube.
Definition: SEkey.h:13
sqlite3_stmt * getstmt()
Definition: SEkey.h:274
void se3_flash_maintenance_routine()
Retrieves the ID of all the keys stored inside the flash of the SEcube. If the ID is not found inside...
Definition: SEkey.cpp:4486
A SEfile object is used to manage a file encrypted with SEfile.
Definition: SEfile.h:117
string statusmap(se_key_status s)
Convert a key status to the corresponding string. May throw exceptions.
Definition: SEkey.cpp:4957
bool safer(se_key &chosen)
Definition: SEkey.cpp:89
int sekey_key_change_name(std::string &key_id, std::string &key_name)
Change the name of a key. Available only for the administrator.
Structure used to enclose all elements required by the APIs to initialize a user device inside SEkey.
Definition: SEkey.h:123
time_t compromise
Definition: SEkey.h:215
int check_key_transition_validity(se_key_status current_status, se_key_status new_status)
Check if a key status transition is allowed or not.
Definition: SEkey.cpp:4837
se_key_status status
Definition: SEkey.h:207
int generate_serial_number(char *sn)
Generate a 32 byte serial number for a SEcube device.
Definition: SEkey.cpp:4696
#define KEY_ID_SEKEY_BEGIN
Minimum range value of standard SEkey key identifiers (101).
Definition: SEkey.h:67
int sekey_group_change_name(std::string &groupID, std::string &newname)
Change the name of a group. Available only for the administrator.
#define TRY_LIMIT
Maximum number of attempts updating SEkey in user mode. If the limit is reached and the update failed...
Definition: SEkey.h:17
void set_id(std::string &new_id)
Definition: SEkey.cpp:129
sekey_error
Error codes returned by functions of SEkey.
Definition: SEkey.h:30
int execute_update(std::string &filepath)
Read an update file (of any type) and process its content.
#define SEFILE_END
Definition: SEfile_C_interface.h:94
void sekey_printlog(std::string &msg)
Insert the string passed as parameter in the SEkey logfile of the current user or of the administrato...
std::unique_ptr< uint8_t[]> k2_data
Definition: SEkey.h:133
#define AES256KEYLEN
Length of an AES-256 key expressed in bytes.
Definition: SEkey.h:14
int sekey_find_key_v1(std::string &chosen_key, std::string &source_user_id, std::string &dest_user_id, se_key_type keytype)
Find a suitable key to encrypt data given a couple of users source-destination.
void delete_user_iterator(std::vector< std::string > &users, std::string &user_id, bool erase)
Wrapper around req_delete_user() to invoke the function for each user in the users vector passed as a...
std::string algorithm
Definition: SEkey.h:156
bool deletefile(SEfile *fileptr, std::string &filepath)
Delete a file encrypted with SEfile. This embeds plaintext filepath translation to encrypted filepath...
Definition: SEkey.cpp:3800
int sekey_readlog(std::string *sn, std::string &output)
Retrieve the content of the logfile associated to a specific SEcube.
std::string sn
Definition: SEkey.h:124
#define KEY_ID_SEKEY_END
Maximum range value of standard SEkey key identifiers (2^32 -1 -100000).
Definition: SEkey.h:68
group_policy policy
Definition: SEkey.h:240
struct userinfo_ userinfo
Simlpe struct used to store the details about the SEkey user which is using the application....
string epoch_to_localtime(time_t t)
Convert an integer (epoch time) to the local time as readable string.
Definition: SEkey.cpp:5089