diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2018-04-18 16:52:58 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2018-04-20 15:49:45 +0900 |
commit | 1801dc6b594f69ad7f5432ea3f9137bc2d784831 (patch) | |
tree | a7b90ec103aebcd410c4a62c100c087e3949ee19 | |
parent | 04bbfd4531f94bdb07e8c8560d1a354f1be591bc (diff) | |
download | curl-1801dc6b594f69ad7f5432ea3f9137bc2d784831.tar.gz curl-1801dc6b594f69ad7f5432ea3f9137bc2d784831.tar.bz2 curl-1801dc6b594f69ad7f5432ea3f9137bc2d784831.zip |
Apply DLP feature
Change-Id: I5d53e6655bb57364d5008a1beab388b7ba53be66
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | lib/Makefile.inc | 9 | ||||
-rw-r--r-- | lib/easy.c | 10 | ||||
-rw-r--r-- | lib/sendf.c | 11 | ||||
-rw-r--r-- | packaging/curl.spec | 16 |
5 files changed, 46 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index bf6bfa987..28ef9ca9d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -168,6 +168,9 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ) \ bin_SCRIPTS = curl-config SUBDIRS = lib src +if USE_TIZEN_FEATURE_DLP +SUBDIRS += extensions +endif DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs pkgconfigdir = $(libdir)/pkgconfig diff --git a/lib/Makefile.inc b/lib/Makefile.inc index 69f9b403d..7cac9b30b 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -37,6 +37,11 @@ LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h \ vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h \ vtls/mbedtls.h +if USE_TIZEN_FEATURE_DLP +LIB_EXTENSIONS_CFILES = extensions/curl_extensions.c +LIB_EXTENSIONS_HFILES = extensions/curl_extensions.h +endif + LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \ ldap.c version.c getenv.c escape.c mprintf.c telnet.c netrc.c \ @@ -78,5 +83,5 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \ LIB_RCFILES = libcurl.rc -CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) -HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) +CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) $(LIB_EXTENSIONS_CFILES) +HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) $(LIB_EXTENSIONS_HFILES) diff --git a/lib/easy.c b/lib/easy.c index 64c647be2..576b7a796 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -80,6 +80,9 @@ #include "curl_printf.h" #include "curl_memory.h" #include "memdebug.h" +#ifdef USE_TIZEN_FEATURE_DLP +#include "extensions/curl_extensions.h" +#endif void Curl_version_init(void); @@ -206,6 +209,13 @@ static CURLcode global_init(long flags, bool memoryfuncs) if(initialized++) return CURLE_OK; +#ifdef USE_TIZEN_FEATURE_DLP + /** + * Initialize Tizen DLP + */ + curl_extensions_tizen_dlp_init(); +#endif + if(memoryfuncs) { /* Setup the default memory functions here (again) */ Curl_cmalloc = (curl_malloc_callback)malloc; diff --git a/lib/sendf.c b/lib/sendf.c index 27c0ccc73..05b2dadcd 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -32,6 +32,9 @@ #include <curl/curl.h> +#ifdef USE_TIZEN_FEATURE_DLP +#include "extensions/curl_extensions.h" +#endif #include "urldata.h" #include "sendf.h" #include "connect.h" @@ -334,6 +337,14 @@ CURLcode Curl_write(struct connectdata *conn, CURLcode result = CURLE_OK; int num = (sockfd == conn->sock[SECONDARYSOCKET]); +#ifdef USE_TIZEN_FEATURE_DLP + /** + * Send data to Tizen DLP verification + */ + curl_extensions_tizen_dlp_check_leak(conn->host.dispname, (char *const)mem, + len); +#endif + bytes_written = conn->send[num](conn, num, mem, len, &result); *written = bytes_written; diff --git a/packaging/curl.spec b/packaging/curl.spec index 627c279b4..2a11e0f7d 100644 --- a/packaging/curl.spec +++ b/packaging/curl.spec @@ -14,7 +14,6 @@ BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libcares) BuildRequires: pkgconfig(libnghttp2) - Provides: webclient @@ -50,6 +49,15 @@ Obsoletes: curl-devel < %{version}-%{release} libcurl is the core engine of curl; this packages contains all the libs, headers, and manual pages to develop applications using libcurl. +%package -n libcurl-extension-dlp +Summary: Extensions for Tizen OS +Provides: libcurl-extension-dlp = %{version}-%{release} +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + +%description -n libcurl-extension-dlp +libcurl extensions for Tinen OS. + %prep %setup -q cp %{SOURCE1001} . @@ -75,6 +83,7 @@ CFLAGS+=" -DTIZEN_TV_EXT" --disable-static \ --with-nghttp2 \ --without-zsh-functions-dir \ +--enable-dlp \ #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt @@ -122,3 +131,8 @@ rm -rf ${RPM_BUILD_ROOT}/usr/share/man %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %{_datadir}/aclocal/libcurl.m4 + +%files -n libcurl-extension-dlp +%manifest %{name}.manifest +%{_libdir}/libcurl_extension_dlp.so.* +%license COPYING |