3 * @brief external API functions for DLP
8 #define LIBRARY_PATH "/lib/libprivacy-guard-client.so"
10 static int first_run = 1;
11 static void (*privacy_guard_dlp_init)(void) = 0;
12 static void (*privacy_guard_dlp_check_leak)(const char *, char * const, size_t) = 0;
15 * @fn void tizen_dlp_init(void)
16 * @brief Initialize the DLP creating the Load Rules and Logging threads
19 void tizen_dlp_init(void)
22 void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY);
24 privacy_guard_dlp_init = dlsym(handle, "privacy_guard_dlp_init");
25 privacy_guard_dlp_check_leak = dlsym(handle, "privacy_guard_dlp_check_leak");
30 if (privacy_guard_dlp_init)
31 privacy_guard_dlp_init();
35 * @fn void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
36 * @brief Checks for information leak on a given request string
38 * @param[in] hostname The hostname of the server to which the request will be sent
39 * @param[in] mem Text that we are going to validate for info leak
40 * @param[in] len Size of len in bytes
42 * @return either PRIV_GUARD_DLP_RESULT_ALLOW or PRIV_GUARD_DLP_RESULT_DENY
45 void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
48 * Send data to Tizen DLP verification
50 if(privacy_guard_dlp_check_leak)
51 privacy_guard_dlp_check_leak(hostname, mem, len);