Upgrade to 7.81.0 60/269260/1 accepted/tizen/base/20220121.001130 submit/tizen_base/20220119.043641
authorSeonah Moon <seonah1.moon@samsung.com>
Wed, 12 Jan 2022 06:46:47 +0000 (15:46 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Wed, 12 Jan 2022 06:47:45 +0000 (15:47 +0900)
Change-Id: I35149a0021e31cf82608541b37f3a4212c22747f

1  2 
Makefile.am
configure.ac
lib/Makefile.inc
lib/curl_config.h.in
lib/sendf.c
lib/url.c
lib/vtls/openssl.c
packaging/curl.spec

diff --cc Makefile.am
Simple merge
diff --cc configure.ac
index a5efb11,63e3202..7d030ee
mode 100755,100644..100644
@@@ -3635,40 -2531,6 +2654,39 @@@ if test "$want_idn" = "yes"; the
    fi
  fi
  
 +dnl Let's hope this split URL remains working:
 +dnl https://www15.software.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
 +dnl genprogc/thread_quick_ref.htm
 +
 +dnl **********************************************************************
 +dnl Check for strict SSL check
 +dnl **********************************************************************
 +AC_ARG_ENABLE([strict-ssl-check],
 +    AS_HELP_STRING([--enable-strict-ssl-check], [Enable strict SSL check usage]),
 +    [enable_strict_ssl_check=yes],
 +    [enable_strict_ssl_check=no])
 +
 +AS_IF([test "x$enable_strict_ssl_check" = "xyes"], [
 +    CPPFLAGS+=" -DUSE_TIZEN_FEATURE_STRICT_SSL_CHECK"
 +    SUPPORT_TIZEN_FEATURES="$SUPPORT_TIZEN_FEATURES strict-ssl-check"
 +])
 +
 +AM_CONDITIONAL(USE_TIZEN_FEATURE_STRICT_SSL_CHECK, test "x$enable_strict_ssl_check" = "xyes")
 +
 +dnl **********************************************************************
 +dnl Check for DLP
 +dnl **********************************************************************
 +
 +AC_ARG_ENABLE([dlp],
 +    AS_HELP_STRING([--enable-dlp], [Enable DLP usage]))
 +
 +AS_IF([test "x$enable_dlp" = "xyes"], [
 +    AC_DEFINE(HAVE_TIZEN_DLP, 1, [Enadle DLP])
 +    LIBS="-ldl $LIBS"
 +])
 +
 +AM_CONDITIONAL(HAVE_TIZEN_DLP, test "x$enable_dlp" = "xyes")
 +
  dnl **********************************************************************
  dnl Check for nghttp2
  dnl **********************************************************************
  #
  ###########################################################################
  
- LIB_VAUTH_CFILES = vauth/cleartext.c vauth/cram.c vauth/digest.c             \
-   vauth/digest_sspi.c vauth/krb5_gssapi.c vauth/krb5_sspi.c vauth/ntlm.c     \
-   vauth/ntlm_sspi.c vauth/oauth2.c vauth/spnego_gssapi.c vauth/spnego_sspi.c \
+ LIB_VAUTH_CFILES =      \
+   vauth/cleartext.c     \
+   vauth/cram.c          \
+   vauth/digest.c        \
+   vauth/digest_sspi.c   \
+   vauth/gsasl.c         \
+   vauth/krb5_gssapi.c   \
+   vauth/krb5_sspi.c     \
+   vauth/ntlm.c          \
+   vauth/ntlm_sspi.c     \
+   vauth/oauth2.c        \
+   vauth/spnego_gssapi.c \
+   vauth/spnego_sspi.c   \
    vauth/vauth.c
  
- LIB_VAUTH_HFILES = vauth/digest.h vauth/ntlm.h vauth/vauth.h
+ LIB_VAUTH_HFILES =      \
+   vauth/digest.h        \
+   vauth/ntlm.h          \
+   vauth/vauth.h
  
- LIB_VTLS_CFILES = vtls/bearssl.c vtls/gskit.c vtls/gtls.c vtls/keylog.c  \
-   vtls/mbedtls.c vtls/mbedtls_threadlock.c vtls/mesalink.c vtls/nss.c    \
-   vtls/openssl.c vtls/schannel.c vtls/schannel_verify.c vtls/sectransp.c \
-   vtls/vtls.c vtls/wolfssl.c
+ LIB_VTLS_CFILES =           \
+   vtls/bearssl.c            \
+   vtls/gskit.c              \
+   vtls/gtls.c               \
+   vtls/keylog.c             \
+   vtls/mbedtls.c            \
+   vtls/mbedtls_threadlock.c \
+   vtls/mesalink.c           \
+   vtls/nss.c                \
+   vtls/openssl.c            \
+   vtls/rustls.c             \
+   vtls/schannel.c           \
+   vtls/schannel_verify.c    \
+   vtls/sectransp.c          \
+   vtls/vtls.c               \
+   vtls/wolfssl.c
  
- LIB_VTLS_HFILES = vtls/bearssl.h vtls/gskit.h vtls/gtls.h vtls/keylog.h      \
-   vtls/mbedtls.h vtls/mbedtls_threadlock.h vtls/mesalink.h vtls/nssg.h       \
-   vtls/openssl.h vtls/schannel.h vtls/sectransp.h vtls/vtls.h vtls/wolfssl.h
+ LIB_VTLS_HFILES =           \
+   vtls/bearssl.h            \
+   vtls/gskit.h              \
+   vtls/gtls.h               \
+   vtls/keylog.h             \
+   vtls/mbedtls.h            \
+   vtls/mbedtls_threadlock.h \
+   vtls/mesalink.h           \
+   vtls/nssg.h               \
+   vtls/openssl.h            \
+   vtls/rustls.h             \
+   vtls/schannel.h           \
+   vtls/sectransp.h          \
+   vtls/vtls.h               \
+   vtls/wolfssl.h
  
- LIB_VQUIC_CFILES = vquic/ngtcp2.c vquic/quiche.c vquic/vquic.c
+ LIB_VQUIC_CFILES = \
+   vquic/ngtcp2.c   \
+   vquic/quiche.c   \
+   vquic/vquic.c
  
- LIB_VQUIC_HFILES = vquic/ngtcp2.h vquic/quiche.h vquic/vquic.h
+ LIB_VQUIC_HFILES = \
+   vquic/ngtcp2.h   \
+   vquic/quiche.h   \
+   vquic/vquic.h
  
- LIB_VSSH_CFILES = vssh/libssh.c vssh/libssh2.c vssh/wolfssh.c
+ LIB_VSSH_CFILES =  \
+   vssh/libssh.c    \
+   vssh/libssh2.c   \
+   vssh/wolfssh.c
  
- LIB_VSSH_HFILES = vssh/ssh.h
+ LIB_VSSH_HFILES =  \
+   vssh/ssh.h
  
- LIB_CFILES = altsvc.c amigaos.c asyn-ares.c asyn-thread.c base64.c            \
-   conncache.c connect.c content_encoding.c cookie.c curl_addrinfo.c           \
-   curl_ctype.c curl_des.c curl_endian.c curl_fnmatch.c curl_get_line.c        \
-   curl_gethostname.c curl_gssapi.c curl_memrchr.c curl_multibyte.c            \
-   curl_ntlm_core.c curl_ntlm_wb.c curl_path.c curl_range.c curl_rtmp.c        \
-   curl_sasl.c curl_sspi.c curl_threads.c dict.c dotdot.c easy.c escape.c      \
-   file.c fileinfo.c formdata.c ftp.c url.c ftplistparser.c getenv.c getinfo.c \
-   gopher.c hash.c hmac.c hostasyn.c hostcheck.c hostip.c hostip4.c hostip6.c  \
-   hostsyn.c http.c http2.c http_chunks.c http_digest.c http_negotiate.c       \
-   http_ntlm.c http_proxy.c idn_win32.c if2ip.c imap.c inet_ntop.c inet_pton.c \
-   krb5.c ldap.c llist.c md4.c md5.c memdebug.c mime.c mprintf.c mqtt.c        \
-   multi.c netrc.c non-ascii.c nonblock.c openldap.c parsedate.c pingpong.c    \
-   pop3.c progress.c psl.c doh.c rand.c rename.c rtsp.c select.c               \
-   sendf.c setopt.c sha256.c share.c slist.c smb.c smtp.c socketpair.c socks.c \
-   socks_gssapi.c socks_sspi.c speedcheck.c splay.c strcase.c strdup.c         \
-   strerror.c strtok.c strtoofft.c system_win32.c telnet.c tftp.c timeval.c    \
-   transfer.c urlapi.c version.c warnless.c wildcard.c x509asn1.c dynbuf.c     \
-   version_win32.c easyoptions.c easygetopt.c
 +if HAVE_TIZEN_DLP
 +LIB_EXTENSIONS_CFILES = extensions/curl_extensions.c
 +LIB_EXTENSIONS_HFILES = extensions/curl_extensions.h
 +endif
 +
+ LIB_CFILES =         \
+   altsvc.c           \
+   amigaos.c          \
+   asyn-ares.c        \
+   asyn-thread.c      \
+   base64.c           \
+   bufref.c           \
+   c-hyper.c          \
+   conncache.c        \
+   connect.c          \
+   content_encoding.c \
+   cookie.c           \
+   curl_addrinfo.c    \
+   curl_ctype.c       \
+   curl_des.c         \
+   curl_endian.c      \
+   curl_fnmatch.c     \
+   curl_get_line.c    \
+   curl_gethostname.c \
+   curl_gssapi.c      \
+   curl_memrchr.c     \
+   curl_multibyte.c   \
+   curl_ntlm_core.c   \
+   curl_ntlm_wb.c     \
+   curl_path.c        \
+   curl_range.c       \
+   curl_rtmp.c        \
+   curl_sasl.c        \
+   curl_sspi.c        \
+   curl_threads.c     \
+   dict.c             \
+   doh.c              \
+   dotdot.c           \
+   dynbuf.c           \
+   easy.c             \
+   easygetopt.c       \
+   easyoptions.c      \
+   escape.c           \
+   file.c             \
+   fileinfo.c         \
+   formdata.c         \
+   ftp.c              \
+   ftplistparser.c    \
+   getenv.c           \
+   getinfo.c          \
+   gopher.c           \
+   hash.c             \
+   hmac.c             \
+   hostasyn.c         \
+   hostcheck.c        \
+   hostip.c           \
+   hostip4.c          \
+   hostip6.c          \
+   hostsyn.c          \
+   hsts.c             \
+   http.c             \
+   http2.c            \
+   http_chunks.c      \
+   http_digest.c      \
+   http_negotiate.c   \
+   http_ntlm.c        \
+   http_proxy.c       \
+   http_aws_sigv4.c   \
+   idn_win32.c        \
+   if2ip.c            \
+   imap.c             \
+   inet_ntop.c        \
+   inet_pton.c        \
+   krb5.c             \
+   ldap.c             \
+   llist.c            \
+   md4.c              \
+   md5.c              \
+   memdebug.c         \
+   mime.c             \
+   mprintf.c          \
+   mqtt.c             \
+   multi.c            \
+   netrc.c            \
+   non-ascii.c        \
+   nonblock.c         \
+   openldap.c         \
+   parsedate.c        \
+   pingpong.c         \
+   pop3.c             \
+   progress.c         \
+   psl.c              \
+   rand.c             \
+   rename.c           \
+   rtsp.c             \
+   select.c           \
+   sendf.c            \
+   setopt.c           \
+   sha256.c           \
+   share.c            \
+   slist.c            \
+   smb.c              \
+   smtp.c             \
+   socketpair.c       \
+   socks.c            \
+   socks_gssapi.c     \
+   socks_sspi.c       \
+   speedcheck.c       \
+   splay.c            \
+   strcase.c          \
+   strdup.c           \
+   strerror.c         \
+   strtok.c           \
+   strtoofft.c        \
+   system_win32.c     \
+   telnet.c           \
+   tftp.c             \
+   timeval.c          \
+   transfer.c         \
+   url.c              \
+   urlapi.c           \
+   version.c          \
+   version_win32.c    \
+   warnless.c         \
+   wildcard.c         \
+   x509asn1.c
  
- LIB_HFILES = altsvc.h amigaos.h arpa_telnet.h asyn.h conncache.h connect.h    \
-   content_encoding.h cookie.h curl_addrinfo.h curl_base64.h curl_ctype.h      \
-   curl_des.h curl_endian.h curl_fnmatch.h curl_get_line.h curl_gethostname.h  \
-   curl_gssapi.h curl_hmac.h curl_ldap.h curl_md4.h curl_md5.h curl_memory.h   \
-   curl_memrchr.h curl_multibyte.h curl_ntlm_core.h curl_ntlm_wb.h curl_path.h \
-   curl_printf.h curl_range.h curl_rtmp.h curl_sasl.h curl_krb5.h curl_setup.h \
-   curl_setup_once.h curl_sha256.h curl_sspi.h curl_threads.h curlx.h dict.h   \
-   dotdot.h easyif.h escape.h file.h fileinfo.h formdata.h ftp.h url.h         \
-   ftplistparser.h getinfo.h gopher.h hash.h hostcheck.h hostip.h http.h       \
-   http2.h http_chunks.h http_digest.h http_negotiate.h http_ntlm.h            \
-   http_proxy.h if2ip.h imap.h inet_ntop.h inet_pton.h llist.h memdebug.h      \
-   mime.h mqtt.h multihandle.h multiif.h netrc.h non-ascii.h nonblock.h        \
-   parsedate.h pingpong.h pop3.h progress.h psl.h doh.h quic.h rand.h rename.h \
-   rtsp.h select.h sendf.h setopt.h setup-vms.h share.h sigpipe.h slist.h      \
-   smb.h smtp.h sockaddr.h socketpair.h socks.h speedcheck.h splay.h strcase.h \
-   strdup.h strerror.h strtok.h strtoofft.h system_win32.h telnet.h tftp.h     \
-   timeval.h transfer.h urlapi-int.h urldata.h warnless.h wildcard.h           \
-   x509asn1.h dynbuf.h version_win32.h easyoptions.h
+ LIB_HFILES =         \
+   altsvc.h           \
+   amigaos.h          \
+   arpa_telnet.h      \
+   asyn.h             \
+   bufref.h           \
+   c-hyper.h          \
+   conncache.h        \
+   connect.h          \
+   content_encoding.h \
+   cookie.h           \
+   curl_addrinfo.h    \
+   curl_base64.h      \
+   curl_ctype.h       \
+   curl_des.h         \
+   curl_endian.h      \
+   curl_fnmatch.h     \
+   curl_get_line.h    \
+   curl_gethostname.h \
+   curl_gssapi.h      \
+   curl_hmac.h        \
+   curl_krb5.h        \
+   curl_ldap.h        \
+   curl_md4.h         \
+   curl_md5.h         \
+   curl_memory.h      \
+   curl_memrchr.h     \
+   curl_multibyte.h   \
+   curl_ntlm_core.h   \
+   curl_ntlm_wb.h     \
+   curl_path.h        \
+   curl_printf.h      \
+   curl_range.h       \
+   curl_rtmp.h        \
+   curl_sasl.h        \
+   curl_setup.h       \
+   curl_setup_once.h  \
+   curl_sha256.h      \
+   curl_sspi.h        \
+   curl_threads.h     \
+   curlx.h            \
+   dict.h             \
+   doh.h              \
+   dotdot.h           \
+   dynbuf.h           \
+   easyif.h           \
+   easyoptions.h      \
+   escape.h           \
+   file.h             \
+   fileinfo.h         \
+   formdata.h         \
+   ftp.h              \
+   ftplistparser.h    \
+   getinfo.h          \
+   gopher.h           \
+   hash.h             \
+   hostcheck.h        \
+   hostip.h           \
+   hsts.h             \
+   http.h             \
+   http2.h            \
+   http_chunks.h      \
+   http_digest.h      \
+   http_negotiate.h   \
+   http_ntlm.h        \
+   http_proxy.h       \
+   http_aws_sigv4.h   \
+   if2ip.h            \
+   imap.h             \
+   inet_ntop.h        \
+   inet_pton.h        \
+   llist.h            \
+   memdebug.h         \
+   mime.h             \
+   mqtt.h             \
+   multihandle.h      \
+   multiif.h          \
+   netrc.h            \
+   non-ascii.h        \
+   nonblock.h         \
+   parsedate.h        \
+   pingpong.h         \
+   pop3.h             \
+   progress.h         \
+   psl.h              \
+   quic.h             \
+   rand.h             \
+   rename.h           \
+   rtsp.h             \
+   select.h           \
+   sendf.h            \
+   setopt.h           \
+   setup-vms.h        \
+   share.h            \
+   sigpipe.h          \
+   slist.h            \
+   smb.h              \
+   smtp.h             \
+   sockaddr.h         \
+   socketpair.h       \
+   socks.h            \
+   speedcheck.h       \
+   splay.h            \
+   strcase.h          \
+   strdup.h           \
+   strerror.h         \
+   strtok.h           \
+   strtoofft.h        \
+   system_win32.h     \
+   telnet.h           \
+   tftp.h             \
+   timeval.h          \
+   transfer.h         \
+   url.h              \
+   urlapi-int.h       \
+   urldata.h          \
+   version_win32.h    \
+   warnless.h         \
+   wildcard.h         \
+   x509asn1.h
  
  LIB_RCFILES = libcurl.rc
  
  /* if GnuTLS is enabled */
  #undef USE_GNUTLS
  
- /* if GnuTLS uses nettle as crypto backend */
- #undef USE_GNUTLS_NETTLE
+ /* GSASL support enabled */
+ #undef USE_GSASL
+ /* if hyper is in use */
+ #undef USE_HYPER
  
 +/* Define to 1 if you have the `icu-uc' library (-licu-uc). */
 +#undef USE_ICU_IDNA
 +
  /* PSL support enabled */
  #undef USE_LIBPSL
  
diff --cc lib/sendf.c
@@@ -305,27 -294,26 +298,44 @@@ CURLcode Curl_write(struct Curl_easy *d
  {
    ssize_t bytes_written;
    CURLcode result = CURLE_OK;
-   int num = (sockfd == conn->sock[SECONDARYSOCKET]);
+   struct connectdata *conn;
+   int num;
+   DEBUGASSERT(data);
+   DEBUGASSERT(data->conn);
+   conn = data->conn;
+   num = (sockfd == conn->sock[SECONDARYSOCKET]);
+ #ifdef CURLDEBUG
+   {
+     /* Allow debug builds to override this logic to force short sends
+     */
+     char *p = getenv("CURL_SMALLSENDS");
+     if(p) {
+       size_t altsize = (size_t)strtoul(p, NULL, 10);
+       if(altsize)
+         len = CURLMIN(len, altsize);
+     }
+   }
+ #endif
 +
 +#ifdef HAVE_TIZEN_DLP
 +  u_int32_t destination_ipv4 = 0;
 +  struct in_addr in;
-   if(Curl_inet_pton(AF_INET, conn->ip_addr_str, &in) == 1) {
++  if(Curl_inet_pton(AF_INET, conn->primary_ip, &in) == 1) {
 +    destination_ipv4 = in.s_addr;
 +  }
 +
 +  curl_extensions_dlp_check_leak(conn->host.dispname,
 +                                 conn->ssl[0].use ?
 +                                   PRIV_GUARD_DLP_PROTOCOL_CURL_HTTPS :
 +                                   PRIV_GUARD_DLP_PROTOCOL_CURL_HTTP,
-                                  conn->local_port,
++                                 conn->port,
 +                                 conn->remote_port,
 +                                 destination_ipv4,
 +                                 (const char *) mem,
 +                                 len);
 +#endif
-   bytes_written = conn->send[num](conn, num, mem, len, &result);
+   bytes_written = conn->send[num](data, num, mem, len, &result);
  
    *written = bytes_written;
    if(bytes_written >= 0)
diff --cc lib/url.c
+++ b/lib/url.c
@@@ -132,9 -137,14 +140,17 @@@ bool curl_win32_idn_to_ascii(const cha
  #include "curl_memory.h"
  #include "memdebug.h"
  
 +#if defined(USE_ICU_IDNA)
 +#define MAX_DOMAIN_NAME_LEN 256
 +#endif  /* USE_ICU_IDNA */
+ /* Count of the backend ssl objects to allocate */
+ #ifdef USE_SSL
+ #  ifndef CURL_DISABLE_PROXY
+ #    define SSL_BACKEND_CNT 4
+ #  else
+ #    define SSL_BACKEND_CNT 2
+ #  endif
+ #endif
  
  static void conn_free(struct connectdata *conn);
  
@@@ -1571,30 -1648,8 +1654,30 @@@ CURLcode Curl_idnconvert_hostname(struc
              Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer)));
        return CURLE_URL_MALFORMAT;
      }
 +#elif defined(USE_ICU_IDNA)
 +    char *ace_hostname = malloc(MAX_DOMAIN_NAME_LEN * sizeof(char));
 +    if(!ace_hostname)
 +      return CURLE_OUT_OF_MEMORY;
 +    UErrorCode errorCode = U_ZERO_ERROR;
 +    UIDNAInfo info = UIDNA_INFO_INITIALIZER;
 +    UIDNA *uts46 =
 +      uidna_openUTS46(UIDNA_USE_STD3_RULES|UIDNA_NONTRANSITIONAL_TO_UNICODE,
 +                      &errorCode);
 +    int32_t length = uidna_nameToASCII_UTF8(uts46,
 +      host->name, strlen(host->name),
 +      ace_hostname, MAX_DOMAIN_NAME_LEN, &info, &errorCode);
 +    uidna_close(uts46);
 +
 +    if(errorCode != U_ZERO_ERROR || info.errors || length < 1) {
 +      failf(data, "Failed to convert %s to ACE;\n", host->name);
 +      return CURLE_URL_MALFORMAT;
 +    }
 +    else {
 +      host->encalloc = ace_hostname;
 +      host->name = host->encalloc;
 +    }
  #else
-     infof(data, "IDN support not present, can't parse Unicode domains\n");
+     infof(data, "IDN support not present, can't parse Unicode domains");
  #endif
    }
    return CURLE_OK;
Simple merge
index 80e43cc,0000000..4918b36
mode 100644,000000..100644
--- /dev/null
@@@ -1,137 -1,0 +1,137 @@@
- Version:    7.73.0
- Release:    2
 +Name:       curl
 +Summary:    A utility for getting files from remote servers (FTP, HTTP, and others)
++Version:    7.81.0
++Release:    0
 +Group:      Applications/Internet
 +License:    MIT
 +URL:        http://curl.haxx.se/
 +#Source0:    http://curl.haxx.se/download/%{name}-%{version}.tar.bz2
 +Source0:    %{name}-%{version}.tar.gz
 +Source1001:     %{name}.manifest
 +BuildRequires:  pkgconfig(icu-uc)
 +BuildRequires:  pkgconfig(openssl1.1)
 +BuildRequires:  pkgconfig(zlib)
 +BuildRequires:  pkgconfig(libcares)
 +BuildRequires:        pkgconfig(libnghttp2)
 +Provides:   webclient
 +
 +
 +%description
 +curl is a client to get documents/files from servers, using any of the
 +supported protocols. The command is designed to work without user
 +interaction or any kind of interactivity.
 +
 +curl offers a busload of useful tricks like proxy support, user
 +authentication, ftp upload, HTTP post, file transfer resume and more.
 +
 +%package -n libcurl
 +Summary:    A library for getting files from web servers
 +Group:      System/Libraries
 +License:    MIT
 +Requires(post): /sbin/ldconfig
 +Requires(postun): /sbin/ldconfig
 +
 +%description -n libcurl
 +This package provides a way for applications to use FTP, HTTP, Gopher and
 +other servers for getting files.
 +
 +
 +%package -n libcurl-devel
 +Summary:    Files needed for building applications with libcurl
 +Group:      Development/Libraries
 +License:    MIT
 +Requires:   libcurl = %{version}-%{release}
 +Provides:   curl-devel = %{version}-%{release}
 +Obsoletes:   curl-devel < %{version}-%{release}
 +
 +%description -n libcurl-devel
 +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} .
 +
 +#%patch01 -p1
 +#%patch02 -p1
 +
 +%build
 +
 +export CPPFLAGS="-DHAVE_PK11_CREATEGENERICOBJECT -DHAVE_GETIFADDRS"
 +CFLAGS+=" -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE -pie"
 +CFLAGS+=" -DHAVE_GETIFADDRS"
 +%if "%{tizen_profile_name}" == "tv"
 +CFLAGS+=" -DTIZEN_TV_EXT"
 +%endif
 +%reconfigure --without-nss --without-gnutls --with-openssl --enable-ipv6 \
 +--with-ca-path==/etc/ssl/certs \
 +--with-ca-bundle=/etc/ssl/ca-bundle.pem \
 +--with-icu-uc \
 +--with-lber-lib=lber \
 +--enable-manual --enable-versioned-symbols --enable-ares --enable-debug --enable-curldebug \
 +--disable-static \
 +--with-nghttp2 \
 +--without-zsh-functions-dir \
 +--enable-dlp \
 +
 +#--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
 +
 +sed -i -e 's,-L/usr/lib ,,g;s,-L/usr/lib64 ,,g;s,-L/usr/lib$,,g;s,-L/usr/lib64$,,g' \
 +Makefile libcurl.pc
 +# Remove bogus rpath
 +sed -i \
 +-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
 +-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
 +
 +make %{?_smp_mflags}
 +
 +%install
 +rm -rf %{buildroot}
 +
 +rm -rf $RPM_BUILD_ROOT
 +
 +make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
 +
 +rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl{,_extension_dlp}.la
 +install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
 +install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
 +
 +
 +# don't need curl's copy of the certs; use openssl's
 +find ${RPM_BUILD_ROOT} -name ca-bundle.crt -exec rm -f '{}' \;
 +rm -rf ${RPM_BUILD_ROOT}/usr/share/man
 +
 +%post -n libcurl -p /sbin/ldconfig
 +
 +%postun -n libcurl -p /sbin/ldconfig
 +
 +%files
 +%{_bindir}/curl
 +%license COPYING
 +
 +%files -n libcurl
 +%manifest %{name}.manifest
 +%{_libdir}/libcurl.so.*
 +%license COPYING
 +
 +%files -n libcurl-devel
 +%{_bindir}/curl-config*
 +%{_includedir}/curl
 +%{_libdir}/*.so
 +%exclude %{_libdir}/libcurl_extension_dlp.so
 +%{_libdir}/pkgconfig/*.pc
 +%{_datadir}/aclocal/libcurl.m4
 +
 +%files -n libcurl-extension-dlp
 +%manifest %{name}.manifest
 +%{_libdir}/libcurl_extension_dlp.so.*
 +%license COPYING