Integration w/ DLP feature from privacy-guard
[platform/upstream/curl.git] / extensions / tizen_dlp.c
1 /**
2  * @file        tizen_dlp.cpp
3  * @brief       external API functions for DLP
4  */
5
6 #include <privacy_guard/privacy_guard_dlp.h>
7
8 /**
9  * @fn void tizen_dlp_init(void)
10  * @brief Initialize the DLP creating the Load Rules and Logging threads
11  * @callgraph
12  */
13 void tizen_dlp_init(void)
14 {
15     privacy_guard_dlp_init();
16 }
17
18 /**
19  * @fn void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
20  * @brief Checks for information leak on a given request string
21  *
22  * @param[in] hostname                                  The hostname of the server to which the request will be sent
23  * @param[in] mem                                               Text that we are going to validate for info leak
24  * @param[in] len                                               Size of len in bytes
25  *
26  * @return  either PRIV_GUARD_DLP_RESULT_ALLOW or PRIV_GUARD_DLP_RESULT_DENY
27  * @callgraph
28  */
29 void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
30 {
31     /**
32     * Send data to Tizen DLP verification
33     */
34     privacy_guard_dlp_check_leak(hostname, mem, len);
35 }