summaryrefslogtreecommitdiff
path: root/srcs/key_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/key_handler.h')
-rw-r--r--srcs/key_handler.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/srcs/key_handler.h b/srcs/key_handler.h
index e64d81c..791e149 100644
--- a/srcs/key_handler.h
+++ b/srcs/key_handler.h
@@ -28,28 +28,30 @@ extern "C" {
#include <stdbool.h>
#include <stddef.h>
+#include <sys/types.h>
-#include "web_app_enc.h"
#include "types.h"
#define MAX_PATH_LEN 512
/* functions with "_" prefix are internal static functions but declared here for testing */
-void _remove_app_ce_from_cache(const char *pkg_id);
+char *_create_map_key(uid_t uid, const char *pkg_id);
+void _remove_app_ce_from_cache(const char *key);
int _get_random(raw_buffer_s *rb);
int _get_preloaded_app_dek_file_path(const char *pkg_id, size_t size, char *path);
int _read_encrypted_app_dek_from_file(const char *pkg_id, raw_buffer_s **pencrypted);
int _write_encrypted_app_dek_to_file(const char *pkg_id, const raw_buffer_s *encrypted);
/* functions for interface */
-int get_app_ce(const char *pkg_id, wae_app_type_e app_type, bool create_for_migrated_app,
- const crypto_element_s **pce);
-int create_app_ce(const char *pkg_id, wae_app_type_e app_type,
+int get_app_ce(uid_t uid, const char *pkg_id, wae_app_type_e app_type,
+ bool create_for_migrated_app, const crypto_element_s **pce);
+int create_app_ce(uid_t uid, const char *pkg_id, wae_app_type_e app_type,
const crypto_element_s **pce);
+int remove_app_ce(uid_t uid, const char *pkg_id, wae_app_type_e app_type);
+
int get_preloaded_app_ce(const char *pkg_id, const crypto_element_s **pce);
int create_preloaded_app_ce(const char *pkg_id, const crypto_element_s **pce);
int load_preloaded_app_deks(bool reload);
-int remove_app_ce(const char *pkg_id, wae_app_type_e app_type);
#ifdef __cplusplus
}