[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 125/125: Merge branch 'master' of https://github.co
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 125/125: Merge branch 'master' of https://github.com/curl/curl |
Date: |
Sun, 21 Jan 2018 23:43:00 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit cc5f34a99383aa99937d545f25eb1eb8cabe2ca1
Merge: 851483824 9d82cde7b
Author: ng0 <address@hidden>
AuthorDate: Sun Jan 21 22:37:57 2018 +0000
Merge branch 'master' of https://github.com/curl/curl
.mailmap | 11 +
.travis.yml | 38 +-
CMakeLists.txt | 1 -
COPYING | 2 +-
Makefile.am | 39 +-
RELEASE-NOTES | 290 +--
configure.ac | 471 +++-
docs/BINDINGS.md | 2 +-
docs/RESOURCES | 18 +-
docs/THANKS | 16 +-
docs/TODO | 29 +
docs/cmdline-opts/gen.pl | 2 +-
docs/cmdline-opts/limit-rate.d | 2 +-
docs/cmdline-opts/mail-rcpt.d | 2 +-
docs/cmdline-opts/max-filesize.d | 4 +
docs/cmdline-opts/page-footer | 8 +
docs/examples/Makefile.inc | 11 +-
docs/examples/adddocsref.pl | 2 +-
docs/examples/cacertinmem.c | 143 +-
docs/examples/rtsp.c | 4 +-
docs/examples/smtp-mail.c | 36 +-
docs/examples/threaded-shared-conn.c | 156 ++
docs/examples/url2file.c | 4 +-
docs/examples/xmlstream.c | 4 +-
docs/gnurl-config.1 | 6 +-
docs/libcurl/Makefile.inc | 6 +-
docs/libcurl/gnurl_mime_data_cb.3 | 11 +-
docs/libcurl/gnurl_mime_filedata.3 | 7 +-
docs/libcurl/gnurl_share_setopt.3 | 11 +-
docs/libcurl/gnurl_version_info.3 | 4 +-
docs/libcurl/libgnurl-env.3 | 89 +
docs/libcurl/mksymbolsmanpage.pl | 2 +-
docs/libcurl/opts/GNURLOPT_DNS_CACHE_TIMEOUT.3 | 1 +
docs/libcurl/opts/GNURLOPT_DNS_LOCAL_IP4.3 | 2 +-
docs/libcurl/opts/GNURLOPT_PRIVATE.3 | 2 +-
docs/libcurl/opts/GNURLOPT_PROXY_SSLVERSION.3 | 12 +-
docs/libcurl/opts/GNURLOPT_READFUNCTION.3 | 4 +-
docs/libcurl/opts/GNURLOPT_SSLVERSION.3 | 14 +-
docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3 | 74 +-
docs/libcurl/opts/GNURLOPT_TCP_NODELAY.3 | 2 +-
docs/libcurl/symbols-in-versions | 3 +
docs/libcurl/symbols.pl | 2 +-
gnurl-config.in | 6 +-
include/gnurl/curl.h | 7 +-
include/gnurl/curlver.h | 6 +-
include/gnurl/system.h | 6 +-
lib/Makefile.am | 2 +
lib/Makefile.inc | 7 +-
lib/Makefile.netware | 1 -
lib/asyn-ares.c | 2 -
lib/checksrc.pl | 2 +-
lib/config-dos.h | 1 -
lib/config-symbian.h | 3 -
lib/config-tpf.h | 3 -
lib/config-vxworks.h | 3 -
lib/config-win32.h | 3 -
lib/config-win32ce.h | 3 -
lib/conncache.c | 224 +-
lib/conncache.h | 26 +-
lib/content_encoding.c | 165 +-
lib/curl_addrinfo.c | 3 +
lib/curl_config.h.cmake | 3 -
lib/curl_fnmatch.c | 16 +-
lib/curl_path.c | 195 ++
lib/{setopt.h => curl_path.h} | 25 +-
lib/curl_setup.h | 10 +-
lib/easy.c | 37 +-
lib/hostcheck.c | 3 +
lib/hostip.c | 8 +-
lib/http.c | 42 +-
lib/http2.c | 4 +-
lib/http_proxy.c | 12 +-
lib/imap.c | 35 +-
lib/krb5.c | 3 +-
lib/mime.c | 81 +-
lib/mime.h | 3 +-
lib/mk-ca-bundle.pl | 3 +-
lib/multi.c | 60 +-
lib/openldap.c | 28 +
lib/parsedate.c | 2 -
lib/pop3.c | 37 +-
lib/progress.c | 20 +-
lib/rand.c | 6 +
lib/security.c | 2 -
lib/sendf.c | 4 +
lib/setopt.c | 64 +-
lib/setopt.h | 4 +-
lib/smb.c | 29 +-
lib/smb.h | 33 +-
lib/smtp.c | 37 +-
lib/ssh-libssh.c | 2733 +++++++++++++++++++++
lib/ssh.c | 210 +-
lib/ssh.h | 69 +-
lib/strtoofft.h | 10 +-
lib/url.c | 266 +-
lib/url.h | 6 +-
lib/urldata.h | 21 +-
lib/version.c | 17 +-
lib/vtls/cyassl.c | 2 -
lib/vtls/darwinssl.c | 2 -
lib/vtls/gskit.c | 4 +-
lib/vtls/openssl.c | 61 +-
lib/vtls/vtls.c | 5 +-
packages/OS400/README.OS400 | 1 +
packages/OS400/ccsidcurl.c | 8 +-
packages/OS400/curl.inc.in | 8 +-
projects/README | 2 +-
projects/Windows/VC15/.gitignore | 5 +
projects/Windows/VC15/curl-all.sln | 298 +++
projects/Windows/VC15/lib/.gitignore | 6 +
projects/Windows/VC15/lib/libcurl.sln | 181 ++
projects/Windows/VC15/lib/libcurl.tmpl | 2397 ++++++++++++++++++
projects/Windows/VC15/lib/libcurl.vcxproj.filters | 17 +
projects/Windows/VC15/src/.gitignore | 6 +
projects/Windows/VC15/src/curl.sln | 181 ++
projects/Windows/VC15/src/curl.tmpl | 2699 ++++++++++++++++++++
projects/Windows/VC15/src/curl.vcxproj.filters | 17 +
projects/build-openssl.bat | 16 +-
projects/build-wolfssl.bat | 19 +-
projects/generate.bat | 25 +-
scripts/contrithanks.sh | 1 +
scripts/log2changes.pl | 2 +-
scripts/updatemanpages.pl | 2 +-
scripts/zsh.pl | 2 +-
src/tool_cb_prg.c | 53 +-
src/tool_getparam.c | 99 +-
src/tool_help.c | 2 +-
src/tool_msgs.c | 8 +-
tests/FILEFORMAT | 2 +
tests/data/Makefile.inc | 13 +-
tests/data/test1452 | 0
tests/data/test1554 | 10 +-
tests/data/test178 | 9 +-
tests/data/test2055 | 0
tests/data/test2073 | 68 +
tests/data/test232 | 202 ++
tests/data/test316 | 198 ++
tests/data/{test178 => test393} | 22 +-
tests/data/{test178 => test394} | 21 +-
tests/data/{test178 => test395} | 17 +-
tests/data/test506 | 100 +-
tests/data/test558 | 1 +
tests/data/test605 | 2 +-
tests/data/test623 | 2 +-
tests/data/test654 | 109 +
tests/data/test713 | 0
tests/data/test714 | 0
tests/data/test715 | 0
tests/data/test891 | 47 +
tests/ftpserver.pl | 16 +-
tests/libtest/.gitignore | 2 +-
tests/libtest/Makefile.inc | 5 +-
tests/libtest/lib1502.c | 2 -
tests/libtest/lib1554.c | 12 +-
tests/libtest/lib518.c | 2 -
tests/libtest/lib537.c | 2 -
tests/libtest/lib540.c | 2 -
tests/libtest/lib557.c | 2 -
tests/libtest/lib582.c | 1 +
tests/libtest/lib591.c | 2 -
tests/libtest/lib597.c | 2 -
tests/libtest/lib654.c | 174 ++
tests/libtest/libntlmconnect.c | 2 -
tests/libtest/mk-lib1521.pl | 0
tests/manpage-scan.pl | 0
tests/mem-include-scan.pl | 0
tests/nroff-scan.pl | 0
tests/server/base64.pl | 2 +-
tests/server/rtspd.c | 3 +
tests/server/sockfilt.c | 3 +
tests/server/sws.c | 3 +
tests/symbol-scan.pl | 0
tests/unit/unit1307.c | 31 +-
winbuild/BUILD.WINDOWS.txt | 2 +-
winbuild/Makefile.vc | 24 +-
winbuild/MakefileBuild.vc | 4 +-
176 files changed, 12105 insertions(+), 1303 deletions(-)
diff --cc Makefile.am
index aa4f44f80,bf6bfa987..32043817c
--- a/Makefile.am
+++ b/Makefile.am
@@@ -151,9 -163,9 +163,9 @@@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP
$(VC71_LIBVCPROJ) $(VC71_SRCVCPROJ) $(VC8_LIBVCPROJ) $(VC8_SRCVCPROJ)
\
$(VC9_LIBVCPROJ) $(VC9_SRCVCPROJ) $(VC10_LIBVCXPROJ) $(VC10_SRCVCXPROJ)
\
$(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ)
\
- $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ)
+ $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ)
-bin_SCRIPTS = curl-config
+bin_SCRIPTS = gnurl-config
SUBDIRS = lib src
DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs
diff --cc configure.ac
index eae012514,c223a0436..34777f229
--- a/configure.ac
+++ b/configure.ac
@@@ -122,8 -121,15 +121,15 @@@ AC_SUBST([AR]
AC_SUBST(libext)
dnl figure out the libcurl version
-CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p'
${srcdir}/include/curl/curlver.h`
+CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p'
${srcdir}/include/gnurl/curlver.h`
XC_CHECK_PROG_CC
+
+ dnl Check if gcc is being used before adding AX_CODE_COVERAGE
+ AS_IF([ test "$GCC" = "yes" ], [AX_CODE_COVERAGE],
+ # not using GCC so pass a test below - CODE_COVERAGE_ENABLED_TRUE is not
zero length
+ CODE_COVERAGE_ENABLED_TRUE='#'
+ )
+
XC_AUTOMAKE
AC_MSG_CHECKING([curl version])
AC_MSG_RESULT($CURLVERSION)
@@@ -1465,8 -1534,296 +1474,298 @@@ dnl Default to compiler & linker defaul
OPT_SSL=off
dnl Default to no CA bundle
ca="no"
-AC_ARG_WITH(ssl,dnl
-AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points to
the SSL installation (default: /usr/local/ssl); when possible, set the
PKG_CONFIG_PATH environment variable instead of using this option])
-AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
- OPT_SSL=$withval)
-
-if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
- test X"$OPT_SSL" != Xno; then
- ssl_msg=
-
- dnl backup the pre-ssl variables
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- dnl This is for Msys/Mingw
- case $host in
- *-*-msys* | *-*-mingw*)
- AC_MSG_CHECKING([for gdi32])
- my_ac_save_LIBS=$LIBS
- LIBS="-lgdi32 $LIBS"
- AC_TRY_LINK([#include <windef.h>
- #include <wingdi.h>],
- [GdiFlush();],
- [ dnl worked!
- AC_MSG_RESULT([yes])],
- [ dnl failed, restore LIBS
- LIBS=$my_ac_save_LIBS
- AC_MSG_RESULT(no)]
- )
- ;;
- esac
-
- case "$OPT_SSL" in
- yes)
- dnl --with-ssl (without path) used
- if test x$cross_compiling != xyes; then
- dnl only do pkg-config magic when not cross-compiling
- PKGTEST="yes"
- fi
- PREFIX_OPENSSL=/usr/local/ssl
- LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
- ;;
- off)
- dnl no --with-ssl option given, just check default places
- if test x$cross_compiling != xyes; then
- dnl only do pkg-config magic when not cross-compiling
- PKGTEST="yes"
- fi
- PREFIX_OPENSSL=
- ;;
- *)
- dnl check the given --with-ssl spot
- PKGTEST="no"
- PREFIX_OPENSSL=$OPT_SSL
-
- dnl Try pkg-config even when cross-compiling. Since we
- dnl specify PKG_CONFIG_LIBDIR we're only looking where
- dnl the user told us to look
- OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
- AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
- if test -f "$OPENSSL_PCDIR/openssl.pc"; then
- PKGTEST="yes"
- fi
-
- dnl in case pkg-config comes up empty, use what we got
- dnl via --with-ssl
- LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
- if test "$PREFIX_OPENSSL" != "/usr" ; then
- SSL_LDFLAGS="-L$LIB_OPENSSL"
- SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
- fi
- SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
- ;;
- esac
-
- if test "$PKGTEST" = "yes"; then
-
- CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
-
- if test "$PKGCONFIG" != "no" ; then
- SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
- $PKGCONFIG --libs-only-l openssl 2>/dev/null`
-
- SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
- $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
- SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
- $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
-
- AC_SUBST(SSL_LIBS)
- AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
- AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
- AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
-
- LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
-
- dnl use the values pkg-config reported. This is here
- dnl instead of below with CPPFLAGS and LDFLAGS because we only
- dnl learn about this via pkg-config. If we only have
- dnl the argument to --with-ssl we don't know what
- dnl additional libs may be necessary. Hope that we
- dnl don't need any.
- LIBS="$SSL_LIBS $LIBS"
- fi
- fi
-
- dnl finally, set flags to use SSL
- CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
- LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
-
- AC_CHECK_LIB(crypto, HMAC_Update,[
- HAVECRYPTO="yes"
- LIBS="-lcrypto $LIBS"
- ],[
- LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
- CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl
-I$PREFIX_OPENSSL/include"
- AC_CHECK_LIB(crypto, HMAC_Init_ex,[
- HAVECRYPTO="yes"
- LIBS="-lcrypto $LIBS"], [
-
- dnl still no, but what about with -ldl?
- AC_MSG_CHECKING([OpenSSL linking with -ldl])
- LIBS="$LIBS -ldl"
- AC_TRY_LINK(
- [
- #include <openssl/err.h>
- ],
- [
- ERR_clear_error();
- ],
- [
- AC_MSG_RESULT(yes)
- HAVECRYPTO="yes"
- ],
- [
- AC_MSG_RESULT(no)
- dnl ok, so what about bouth -ldl and -lpthread?
-
- AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
- LIBS="$LIBS -lpthread"
- AC_TRY_LINK(
- [
- #include <openssl/err.h>
- ],
- [
- ERR_clear_error();
- ],
- [
- AC_MSG_RESULT(yes)
- HAVECRYPTO="yes"
- ],
- [
- AC_MSG_RESULT(no)
- LDFLAGS="$CLEANLDFLAGS"
- CPPFLAGS="$CLEANCPPFLAGS"
- LIBS="$CLEANLIBS"
-
- ])
-
- ])
-
- ])
- ])
-
- if test X"$HAVECRYPTO" = X"yes"; then
- dnl This is only reasonable to do if crypto actually is there: check for
- dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
-
- AC_CHECK_LIB(ssl, SSL_connect)
-
- if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
- dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
- AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
- OLIBS=$LIBS
- LIBS="-lRSAglue -lrsaref $LIBS"
- AC_CHECK_LIB(ssl, SSL_connect)
- if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
- dnl still no SSL_connect
- AC_MSG_RESULT(no)
- LIBS=$OLIBS
- else
- AC_MSG_RESULT(yes)
- fi
-
- else
-
- dnl Have the libraries--check for OpenSSL headers
- AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
- openssl/pem.h openssl/ssl.h openssl/err.h,
- ssl_msg="OpenSSL"
- test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
- OPENSSL_ENABLED=1
- AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
-
- if test $ac_cv_header_openssl_x509_h = no; then
- dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
- dnl since 'err.h' might in fact find a krb4 header with the same
- dnl name
- AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
-
- if test $ac_cv_header_x509_h = yes &&
- test $ac_cv_header_crypto_h = yes &&
- test $ac_cv_header_ssl_h = yes; then
- dnl three matches
- ssl_msg="OpenSSL"
- OPENSSL_ENABLED=1
- fi
- fi
- fi
-
- if test X"$OPENSSL_ENABLED" != X"1"; then
- LIBS="$CLEANLIBS"
- fi
-
- if test X"$OPT_SSL" != Xoff &&
- test "$OPENSSL_ENABLED" != "1"; then
- AC_MSG_ERROR([OpenSSL libs and/or directories were not found where
specified!])
- fi
- fi
-
- if test X"$OPENSSL_ENABLED" = X"1"; then
- dnl If the ENGINE library seems to be around, check for the OpenSSL engine
- dnl stuff, it is kind of "separated" from the main SSL check
- AC_CHECK_FUNC(ENGINE_init,
- [
- AC_CHECK_HEADERS(openssl/engine.h)
- AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
- ])
-
- dnl These can only exist if OpenSSL exists
- dnl Older versions of Cyassl (some time before 2.9.4) don't have
- dnl SSL_get_shutdown (but this check won't actually detect it there
- dnl as it's a macro that needs the header files be included)
-
- AC_CHECK_FUNCS( RAND_egd \
- ENGINE_cleanup \
- SSL_get_shutdown \
- SSLv2_client_method )
-
- AC_MSG_CHECKING([for BoringSSL])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- #include <openssl/base.h>
- ]],[[
- #ifndef OPENSSL_IS_BORINGSSL
- #error not boringssl
- #endif
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
- [Define to 1 if using BoringSSL.])
- ssl_msg="BoringSSL"
- ],[
- AC_MSG_RESULT([no])
- ])
-
- AC_MSG_CHECKING([for libressl])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#include <openssl/opensslv.h>
- ]],[[
- int dummy = LIBRESSL_VERSION_NUMBER;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
- [Define to 1 if using libressl.])
- ssl_msg="libressl"
- ],[
- AC_MSG_RESULT([no])
- ])
- fi
-
- if test "$OPENSSL_ENABLED" = "1"; then
- if test -n "$LIB_OPENSSL"; then
- dnl when the ssl shared libs were found in a path that the run-time
- dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
- dnl to prevent further configure tests to fail due to this
- if test "x$cross_compiling" != "xyes"; then
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
- fi
- fi
- CURL_CHECK_OPENSSL_API
- fi
-
- test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends,
}$ssl_msg"
-fi
+dnl Set Default to 0:
+dnl OPENSSL_ENABLED="0"
++dnl AC_ARG_WITH(ssl,dnl
++dnl AC_HELP_STRING([--with-ssl=PATH],[Where to look for OpenSSL, PATH points
to the SSL installation (default: /usr/local/ssl); when possible, set the
PKG_CONFIG_PATH environment variable instead of using this option])
++dnl AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
++dnl OPT_SSL=$withval)
++
++dnl if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
++dnl test X"$OPT_SSL" != Xno; then
++dnl ssl_msg=
++
++dnl dnl backup the pre-ssl variables
++dnl CLEANLDFLAGS="$LDFLAGS"
++dnl CLEANCPPFLAGS="$CPPFLAGS"
++dnl CLEANLIBS="$LIBS"
++
++dnl dnl This is for Msys/Mingw
++dnl case $host in
++dnl *-*-msys* | *-*-mingw*)
++dnl AC_MSG_CHECKING([for gdi32])
++dnl my_ac_save_LIBS=$LIBS
++dnl LIBS="-lgdi32 $LIBS"
++dnl AC_TRY_LINK([#include <windef.h>
++dnl #include <wingdi.h>],
++dnl [GdiFlush();],
++dnl [ dnl worked!
++dnl AC_MSG_RESULT([yes])],
++dnl [ dnl failed, restore LIBS
++dnl LIBS=$my_ac_save_LIBS
++dnl AC_MSG_RESULT(no)]
++dnl )
++dnl ;;
++dnl esac
++
++dnl case "$OPT_SSL" in
++dnl yes)
++dnl dnl --with-ssl (without path) used
++dnl if test x$cross_compiling != xyes; then
++dnl dnl only do pkg-config magic when not cross-compiling
++dnl PKGTEST="yes"
++dnl fi
++dnl PREFIX_OPENSSL=/usr/local/ssl
++dnl LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
++dnl ;;
++dnl off)
++dnl dnl no --with-ssl option given, just check default places
++dnl if test x$cross_compiling != xyes; then
++dnl dnl only do pkg-config magic when not cross-compiling
++dnl PKGTEST="yes"
++dnl fi
++dnl PREFIX_OPENSSL=
++dnl ;;
++dnl *)
++dnl dnl check the given --with-ssl spot
++dnl PKGTEST="no"
++dnl PREFIX_OPENSSL=$OPT_SSL
++
++dnl dnl Try pkg-config even when cross-compiling. Since we
++dnl dnl specify PKG_CONFIG_LIBDIR we're only looking where
++dnl dnl the user told us to look
++dnl OPENSSL_PCDIR="$OPT_SSL/lib/pkgconfig"
++dnl AC_MSG_NOTICE([PKG_CONFIG_LIBDIR will be set to "$OPENSSL_PCDIR"])
++dnl if test -f "$OPENSSL_PCDIR/openssl.pc"; then
++dnl PKGTEST="yes"
++dnl fi
++
++dnl dnl in case pkg-config comes up empty, use what we got
++dnl dnl via --with-ssl
++dnl LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
++dnl if test "$PREFIX_OPENSSL" != "/usr" ; then
++dnl SSL_LDFLAGS="-L$LIB_OPENSSL"
++dnl SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
++dnl fi
++dnl SSL_CPPFLAGS="$SSL_CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
++dnl ;;
++dnl esac
++
++dnl if test "$PKGTEST" = "yes"; then
++
++dnl CURL_CHECK_PKGCONFIG(openssl, [$OPENSSL_PCDIR])
++
++dnl if test "$PKGCONFIG" != "no" ; then
++dnl SSL_LIBS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
++dnl $PKGCONFIG --libs-only-l openssl 2>/dev/null`
++
++dnl SSL_LDFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
++dnl $PKGCONFIG --libs-only-L openssl 2>/dev/null`
++
++dnl SSL_CPPFLAGS=`CURL_EXPORT_PCDIR([$OPENSSL_PCDIR]) dnl
++dnl $PKGCONFIG --cflags-only-I openssl 2>/dev/null`
++
++dnl AC_SUBST(SSL_LIBS)
++dnl AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
++dnl AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
++dnl AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])
++
++dnl LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'`
++
++dnl dnl use the values pkg-config reported. This is here
++dnl dnl instead of below with CPPFLAGS and LDFLAGS because we only
++dnl dnl learn about this via pkg-config. If we only have
++dnl dnl the argument to --with-ssl we don't know what
++dnl dnl additional libs may be necessary. Hope that we
++dnl dnl don't need any.
++dnl LIBS="$SSL_LIBS $LIBS"
++dnl fi
++dnl fi
++
++dnl dnl finally, set flags to use SSL
++dnl CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
++dnl LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
++
++dnl AC_CHECK_LIB(crypto, HMAC_Update,[
++dnl HAVECRYPTO="yes"
++dnl LIBS="-lcrypto $LIBS"
++dnl ],[
++dnl LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
++dnl CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl
-I$PREFIX_OPENSSL/include"
++dnl AC_CHECK_LIB(crypto, HMAC_Init_ex,[
++dnl HAVECRYPTO="yes"
++dnl LIBS="-lcrypto $LIBS"], [
++
++dnl dnl still no, but what about with -ldl?
++dnl AC_MSG_CHECKING([OpenSSL linking with -ldl])
++dnl LIBS="$LIBS -ldl"
++dnl AC_TRY_LINK(
++dnl [
++dnl #include <openssl/err.h>
++dnl ],
++dnl [
++dnl ERR_clear_error();
++dnl ],
++dnl [
++dnl AC_MSG_RESULT(yes)
++dnl HAVECRYPTO="yes"
++dnl ],
++dnl [
++dnl AC_MSG_RESULT(no)
++dnl dnl ok, so what about bouth -ldl and -lpthread?
++
++dnl AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
++dnl LIBS="$LIBS -lpthread"
++dnl AC_TRY_LINK(
++dnl [
++dnl #include <openssl/err.h>
++dnl ],
++dnl [
++dnl ERR_clear_error();
++dnl ],
++dnl [
++dnl AC_MSG_RESULT(yes)
++dnl HAVECRYPTO="yes"
++dnl ],
++dnl [
++dnl AC_MSG_RESULT(no)
++dnl LDFLAGS="$CLEANLDFLAGS"
++dnl CPPFLAGS="$CLEANCPPFLAGS"
++dnl LIBS="$CLEANLIBS"
++
++dnl ])
++
++dnl ])
++
++dnl ])
++dnl ])
++
++dnl if test X"$HAVECRYPTO" = X"yes"; then
++dnl dnl This is only reasonable to do if crypto actually is there: check
for
++dnl dnl SSL libs NOTE: it is important to do this AFTER the crypto lib
++
++dnl AC_CHECK_LIB(ssl, SSL_connect)
++
++dnl if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
++dnl dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff
++dnl AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use);
++dnl OLIBS=$LIBS
++dnl LIBS="-lRSAglue -lrsaref $LIBS"
++dnl AC_CHECK_LIB(ssl, SSL_connect)
++dnl if test "$ac_cv_lib_ssl_SSL_connect" != yes; then
++dnl dnl still no SSL_connect
++dnl AC_MSG_RESULT(no)
++dnl LIBS=$OLIBS
++dnl else
++dnl AC_MSG_RESULT(yes)
++dnl fi
++
++dnl else
++
++dnl dnl Have the libraries--check for OpenSSL headers
++dnl AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
++dnl openssl/pem.h openssl/ssl.h openssl/err.h,
++dnl ssl_msg="OpenSSL"
++dnl test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
++dnl OPENSSL_ENABLED=1
++dnl AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
++
++dnl if test $ac_cv_header_openssl_x509_h = no; then
++dnl dnl we don't use the "action" part of the AC_CHECK_HEADERS macro
++dnl dnl since 'err.h' might in fact find a krb4 header with the same
++dnl dnl name
++dnl AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h)
++
++dnl if test $ac_cv_header_x509_h = yes &&
++dnl test $ac_cv_header_crypto_h = yes &&
++dnl test $ac_cv_header_ssl_h = yes; then
++dnl dnl three matches
++dnl ssl_msg="OpenSSL"
++dnl OPENSSL_ENABLED=1
++dnl fi
++dnl fi
++dnl fi
++
++dnl if test X"$OPENSSL_ENABLED" != X"1"; then
++dnl LIBS="$CLEANLIBS"
++dnl fi
++
++dnl if test X"$OPT_SSL" != Xoff &&
++dnl test "$OPENSSL_ENABLED" != "1"; then
++dnl AC_MSG_ERROR([OpenSSL libs and/or directories were not found where
specified!])
++dnl fi
++dnl fi
++
++dnl if test X"$OPENSSL_ENABLED" = X"1"; then
++dnl dnl If the ENGINE library seems to be around, check for the OpenSSL
engine
++dnl dnl stuff, it is kind of "separated" from the main SSL check
++dnl AC_CHECK_FUNC(ENGINE_init,
++dnl [
++dnl AC_CHECK_HEADERS(openssl/engine.h)
++dnl AC_CHECK_FUNCS( ENGINE_load_builtin_engines )
++dnl ])
++
++dnl dnl These can only exist if OpenSSL exists
++dnl dnl Older versions of Cyassl (some time before 2.9.4) don't have
++dnl dnl SSL_get_shutdown (but this check won't actually detect it there
++dnl dnl as it's a macro that needs the header files be included)
++
++dnl AC_CHECK_FUNCS( RAND_egd \
++dnl ENGINE_cleanup \
++dnl SSL_get_shutdown \
++dnl SSLv2_client_method )
++
++dnl AC_MSG_CHECKING([for BoringSSL])
++dnl AC_COMPILE_IFELSE([
++dnl AC_LANG_PROGRAM([[
++dnl #include <openssl/base.h>
++dnl ]],[[
++dnl #ifndef OPENSSL_IS_BORINGSSL
++dnl #error not boringssl
++dnl #endif
++dnl ]])
++dnl ],[
++dnl AC_MSG_RESULT([yes])
++dnl AC_DEFINE_UNQUOTED(HAVE_BORINGSSL, 1,
++dnl [Define to 1 if using BoringSSL.])
++dnl ssl_msg="BoringSSL"
++dnl ],[
++dnl AC_MSG_RESULT([no])
++dnl ])
++
++dnl AC_MSG_CHECKING([for libressl])
++dnl AC_COMPILE_IFELSE([
++dnl AC_LANG_PROGRAM([[
++dnl #include <openssl/opensslv.h>
++dnl ]],[[
++dnl int dummy = LIBRESSL_VERSION_NUMBER;
++dnl ]])
++dnl ],[
++dnl AC_MSG_RESULT([yes])
++dnl AC_DEFINE_UNQUOTED(HAVE_LIBRESSL, 1,
++dnl [Define to 1 if using libressl.])
++dnl ssl_msg="libressl"
++dnl ],[
++dnl AC_MSG_RESULT([no])
++dnl ])
++dnl fi
++
++dnl if test "$OPENSSL_ENABLED" = "1"; then
++dnl if test -n "$LIB_OPENSSL"; then
++dnl dnl when the ssl shared libs were found in a path that the run-time
++dnl dnl linker doesn't search through, we need to add it to
LD_LIBRARY_PATH
++dnl dnl to prevent further configure tests to fail due to this
++dnl if test "x$cross_compiling" != "xyes"; then
++dnl LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL"
++dnl export LD_LIBRARY_PATH
++dnl AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH])
++dnl fi
++dnl fi
++dnl CURL_CHECK_OPENSSL_API
++dnl fi
++
++dnl test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends,
}$ssl_msg"
++dnl fi
dnl **********************************************************************
dnl Check for the random seed preferences
@@@ -1866,10 -2725,163 +2165,164 @@@ dnl Default to compiler & linker defaul
OPT_LIBSSH2=off
AC_ARG_WITH(libssh2,dnl
AC_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points
to the LIBSSH2 installation; when possible, set the PKG_CONFIG_PATH environment
variable instead of using this option])
- AC_HELP_STRING([--without-libssh2], [disable LIBSSH2]),
- OPT_LIBSSH2=$withval)
+ AC_HELP_STRING([--with-libssh2], [enable LIBSSH2]),
+ OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
+
+
+ OPT_LIBSSH=off
+ AC_ARG_WITH(libssh,dnl
+ AC_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to
the LIBSSH installation; when possible, set the PKG_CONFIG_PATH environment
variable instead of using this option])
+ AC_HELP_STRING([--with-libssh], [enable LIBSSH]),
+ OPT_LIBSSH=$withval, OPT_LIBSSH=no)
-if test X"$OPT_LIBSSH2" != Xno; then
- dnl backup the pre-libssh2 variables
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- case "$OPT_LIBSSH2" in
- yes)
- dnl --with-libssh2 (without path) used
- CURL_CHECK_PKGCONFIG(libssh2)
-
- if test "$PKGCONFIG" != "no" ; then
- LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
- LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
- CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
- version=`$PKGCONFIG --modversion libssh2`
- DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
- fi
-
- ;;
- off)
- dnl no --with-libssh2 option given, just check default places
- ;;
- *)
- dnl use the given --with-libssh2 spot
- PREFIX_SSH2=$OPT_LIBSSH2
- ;;
- esac
-
- dnl if given with a prefix, we set -L and -I based on that
- if test -n "$PREFIX_SSH2"; then
- LIB_SSH2="-lssh2"
- LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
- CPP_SSH2=-I${PREFIX_SSH2}/include
- DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
- fi
-
- LDFLAGS="$LDFLAGS $LD_SSH2"
- CPPFLAGS="$CPPFLAGS $CPP_SSH2"
- LIBS="$LIB_SSH2 $LIBS"
-
- AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
-
- AC_CHECK_HEADERS(libssh2.h,
- curl_ssh_msg="enabled (libSSH2)"
- LIBSSH2_ENABLED=1
- AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
- AC_SUBST(USE_LIBSSH2, [1])
- )
-
- if test X"$OPT_LIBSSH2" != Xoff &&
- test "$LIBSSH2_ENABLED" != "1"; then
- AC_MSG_ERROR([libSSH2 libs and/or directories were not found where
specified!])
- fi
-
- if test "$LIBSSH2_ENABLED" = "1"; then
- if test -n "$DIR_SSH2"; then
- dnl when the libssh2 shared libs were found in a path that the run-time
- dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
- dnl to prevent further configure tests to fail due to this
-
- if test "x$cross_compiling" != "xyes"; then
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
- fi
- fi
- else
- dnl no libssh2, revert back to clean variables
- LDFLAGS=$CLEANLDFLAGS
- CPPFLAGS=$CLEANCPPFLAGS
- LIBS=$CLEANLIBS
- fi
-elif test X"$OPT_LIBSSH" != Xno; then
- dnl backup the pre-libssh variables
- CLEANLDFLAGS="$LDFLAGS"
- CLEANCPPFLAGS="$CPPFLAGS"
- CLEANLIBS="$LIBS"
-
- case "$OPT_LIBSSH" in
- yes)
- dnl --with-libssh (without path) used
- CURL_CHECK_PKGCONFIG(libssh)
-
- if test "$PKGCONFIG" != "no" ; then
- LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
- LD_SSH=`$PKGCONFIG --libs-only-L libssh`
- CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
- version=`$PKGCONFIG --modversion libssh`
- DIR_SSH=`echo $LD_SSH | $SED -e 's/-L//'`
- fi
-
- ;;
- off)
- dnl no --with-libssh option given, just check default places
- ;;
- *)
- dnl use the given --with-libssh spot
- PREFIX_SSH=$OPT_LIBSSH
- ;;
- esac
-
- dnl if given with a prefix, we set -L and -I based on that
- if test -n "$PREFIX_SSH"; then
- LIB_SSH="-lssh"
- LD_SSH=-L${PREFIX_SSH}/lib$libsuff
- CPP_SSH=-I${PREFIX_SSH}/include
- DIR_SSH=${PREFIX_SSH}/lib$libsuff
- fi
-
- LDFLAGS="$LDFLAGS $LD_SSH"
- CPPFLAGS="$CPPFLAGS $CPP_SSH"
- LIBS="$LIB_SSH $LIBS"
-
- AC_CHECK_LIB(ssh, ssh_new)
-
- AC_CHECK_HEADERS(libssh/libssh.h,
- curl_ssh_msg="enabled (libSSH)"
- LIBSSH_ENABLED=1
- AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
- AC_SUBST(USE_LIBSSH, [1])
- )
-
- if test X"$OPT_LIBSSH" != Xoff &&
- test "$LIBSSH_ENABLED" != "1"; then
- AC_MSG_ERROR([libSSH libs and/or directories were not found where
specified!])
- fi
-
- if test "$LIBSSH_ENABLED" = "1"; then
- if test -n "$DIR_SSH"; then
- dnl when the libssh shared libs were found in a path that the run-time
- dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH
- dnl to prevent further configure tests to fail due to this
-
- if test "x$cross_compiling" != "xyes"; then
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $DIR_SSH to LD_LIBRARY_PATH])
- fi
- fi
- else
- dnl no libssh, revert back to clean variables
- LDFLAGS=$CLEANLDFLAGS
- CPPFLAGS=$CLEANCPPFLAGS
- LIBS=$CLEANLIBS
- fi
-fi
+LIBSSH2_ENABLED="0"
++dnl if test X"$OPT_LIBSSH2" != Xno; then
++dnl dnl backup the pre-libssh2 variables
++dnl CLEANLDFLAGS="$LDFLAGS"
++dnl CLEANCPPFLAGS="$CPPFLAGS"
++dnl CLEANLIBS="$LIBS"
++
++dnl case "$OPT_LIBSSH2" in
++dnl yes)
++dnl dnl --with-libssh2 (without path) used
++dnl CURL_CHECK_PKGCONFIG(libssh2)
++
++dnl if test "$PKGCONFIG" != "no" ; then
++dnl LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
++dnl LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
++dnl CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
++dnl version=`$PKGCONFIG --modversion libssh2`
++dnl DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
++dnl fi
++
++dnl ;;
++dnl off)
++dnl dnl no --with-libssh2 option given, just check default places
++dnl ;;
++dnl *)
++dnl dnl use the given --with-libssh2 spot
++dnl PREFIX_SSH2=$OPT_LIBSSH2
++dnl ;;
++dnl esac
++
++dnl dnl if given with a prefix, we set -L and -I based on that
++dnl if test -n "$PREFIX_SSH2"; then
++dnl LIB_SSH2="-lssh2"
++dnl LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
++dnl CPP_SSH2=-I${PREFIX_SSH2}/include
++dnl DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
++dnl fi
++
++dnl LDFLAGS="$LDFLAGS $LD_SSH2"
++dnl CPPFLAGS="$CPPFLAGS $CPP_SSH2"
++dnl LIBS="$LIB_SSH2 $LIBS"
++
++dnl AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
++
++dnl AC_CHECK_HEADERS(libssh2.h,
++dnl curl_ssh_msg="enabled (libSSH2)"
++dnl LIBSSH2_ENABLED=1
++dnl AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
++dnl AC_SUBST(USE_LIBSSH2, [1])
++dnl )
++
++dnl if test X"$OPT_LIBSSH2" != Xoff &&
++dnl test "$LIBSSH2_ENABLED" != "1"; then
++dnl AC_MSG_ERROR([libSSH2 libs and/or directories were not found where
specified!])
++dnl fi
++
++dnl if test "$LIBSSH2_ENABLED" = "1"; then
++dnl if test -n "$DIR_SSH2"; then
++dnl dnl when the libssh2 shared libs were found in a path that the
run-time
++dnl dnl linker doesn't search through, we need to add it to
LD_LIBRARY_PATH
++dnl dnl to prevent further configure tests to fail due to this
++
++dnl if test "x$cross_compiling" != "xyes"; then
++dnl LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
++dnl export LD_LIBRARY_PATH
++dnl AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
++dnl fi
++dnl fi
++dnl else
++dnl dnl no libssh2, revert back to clean variables
++dnl LDFLAGS=$CLEANLDFLAGS
++dnl CPPFLAGS=$CLEANCPPFLAGS
++dnl LIBS=$CLEANLIBS
++dnl fi
++dnl elif test X"$OPT_LIBSSH" != Xno; then
++dnl dnl backup the pre-libssh variables
++dnl CLEANLDFLAGS="$LDFLAGS"
++dnl CLEANCPPFLAGS="$CPPFLAGS"
++dnl CLEANLIBS="$LIBS"
++
++dnl case "$OPT_LIBSSH" in
++dnl yes)
++dnl dnl --with-libssh (without path) used
++dnl CURL_CHECK_PKGCONFIG(libssh)
++
++dnl if test "$PKGCONFIG" != "no" ; then
++dnl LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
++dnl LD_SSH=`$PKGCONFIG --libs-only-L libssh`
++dnl CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
++dnl version=`$PKGCONFIG --modversion libssh`
++dnl DIR_SSH=`echo $LD_SSH | $SED -e 's/-L//'`
++dnl fi
++
++dnl ;;
++dnl off)
++dnl dnl no --with-libssh option given, just check default places
++dnl ;;
++dnl *)
++dnl dnl use the given --with-libssh spot
++dnl PREFIX_SSH=$OPT_LIBSSH
++dnl ;;
++dnl esac
++
++dnl dnl if given with a prefix, we set -L and -I based on that
++dnl if test -n "$PREFIX_SSH"; then
++dnl LIB_SSH="-lssh"
++dnl LD_SSH=-L${PREFIX_SSH}/lib$libsuff
++dnl CPP_SSH=-I${PREFIX_SSH}/include
++dnl DIR_SSH=${PREFIX_SSH}/lib$libsuff
++dnl fi
++
++dnl LDFLAGS="$LDFLAGS $LD_SSH"
++dnl CPPFLAGS="$CPPFLAGS $CPP_SSH"
++dnl LIBS="$LIB_SSH $LIBS"
++
++dnl AC_CHECK_LIB(ssh, ssh_new)
++
++dnl AC_CHECK_HEADERS(libssh/libssh.h,
++dnl curl_ssh_msg="enabled (libSSH)"
++dnl LIBSSH_ENABLED=1
++dnl AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
++dnl AC_SUBST(USE_LIBSSH, [1])
++dnl )
++
++dnl if test X"$OPT_LIBSSH" != Xoff &&
++dnl test "$LIBSSH_ENABLED" != "1"; then
++dnl AC_MSG_ERROR([libSSH libs and/or directories were not found where
specified!])
++dnl fi
++
++dnl if test "$LIBSSH_ENABLED" = "1"; then
++dnl if test -n "$DIR_SSH"; then
++dnl dnl when the libssh shared libs were found in a path that the
run-time
++dnl dnl linker doesn't search through, we need to add it to
LD_LIBRARY_PATH
++dnl dnl to prevent further configure tests to fail due to this
++
++dnl if test "x$cross_compiling" != "xyes"; then
++dnl LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH"
++dnl export LD_LIBRARY_PATH
++dnl AC_MSG_NOTICE([Added $DIR_SSH to LD_LIBRARY_PATH])
++dnl fi
++dnl fi
++dnl else
++dnl dnl no libssh, revert back to clean variables
++dnl LDFLAGS=$CLEANLDFLAGS
++dnl CPPFLAGS=$CLEANCPPFLAGS
++dnl LIBS=$CLEANLIBS
++dnl fi
++dnl fi
dnl **********************************************************************
dnl Check for the presence of LIBRTMP libraries and headers
diff --cc docs/examples/cacertinmem.c
index 4bbec4663,cf7c76e14..ffac53e1c
--- a/docs/examples/cacertinmem.c
+++ b/docs/examples/cacertinmem.c
@@@ -24,8 -24,9 +24,9 @@@
* </DESC>
*/
+ #include <openssl/err.h>
#include <openssl/ssl.h>
-#include <curl/curl.h>
+#include <gnurl/curl.h>
#include <stdio.h>
size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
diff --cc docs/examples/smtp-mail.c
index 6d209e64b,3285b3184..89a9fd5cd
--- a/docs/examples/smtp-mail.c
+++ b/docs/examples/smtp-mail.c
@@@ -27,18 -27,22 +27,22 @@@
#include <stdio.h>
#include <string.h>
-#include <curl/curl.h>
+#include <gnurl/curl.h>
- /* This is a simple example showing how to send mail using libcurl's SMTP
- * capabilities. For an example of using the multi interface please see
- * smtp-multi.c.
- *
- * Note that this example requires libcurl 7.20.0 or above.
+ /*
+ * For an SMTP example using the multi interface please see smtp-multi.c.
+ */
+
+ /* The libcurl options want plain addresses, the viewable headers in the mail
+ * can very well get a full name as well.
*/
+ #define FROM_ADDR "<address@hidden>"
+ #define TO_ADDR "<address@hidden>"
+ #define CC_ADDR "<address@hidden>"
- #define FROM "<address@hidden>"
- #define TO "<address@hidden>"
- #define CC "<address@hidden>"
+ #define FROM_MAIL "Sender Person " FROM_ADDR
+ #define TO_MAIL "A Receiver " TO_ADDR
+ #define CC_MAIL "John CC Smith " CC_ADDR
static const char *payload_text[] = {
"Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n",
diff --cc docs/libcurl/Makefile.inc
index fc7a7472b,3ac5036ec..7d45ffa67
--- a/docs/libcurl/Makefile.inc
+++ b/docs/libcurl/Makefile.inc
@@@ -1,24 -1,24 +1,24 @@@
# Shared between Makefile.am and CMakeLists.txt
-man_MANS = curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 \
- curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 \
- curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 \
- curl_slist_append.3 curl_slist_free_all.3 curl_version.3 \
- curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 \
- curl_strequal.3 curl_strnequal.3 curl_mprintf.3 curl_global_init.3 \
- curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 \
- curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 \
- curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 \
- curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 \
- libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 \
- curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 \
- libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 \
- curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 \
- curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 \
- curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 \
- curl_multi_socket_action.3 curl_multi_wait.3 libcurl-symbols.3 \
- libcurl-thread.3 curl_multi_socket_all.3 curl_global_sslset.3 \
- curl_mime_init.3 curl_mime_free.3 curl_mime_addpart.3 curl_mime_name.3 \
- curl_mime_data.3 curl_mime_data_cb.3 curl_mime_filedata.3 \
- curl_mime_filename.3 curl_mime_subparts.3 \
- curl_mime_type.3 curl_mime_headers.3 curl_mime_encoder.3 libcurl-env.3
+man_MANS = gnurl_easy_cleanup.3 gnurl_easy_getinfo.3 gnurl_easy_init.3 \
+ gnurl_easy_perform.3 gnurl_easy_setopt.3 gnurl_easy_duphandle.3 \
+ gnurl_formadd.3 gnurl_formfree.3 gnurl_getdate.3 gnurl_getenv.3 \
+ gnurl_slist_append.3 gnurl_slist_free_all.3 gnurl_version.3 \
+ gnurl_version_info.3 gnurl_escape.3 gnurl_unescape.3 gnurl_free.3 \
- gnurl_strequal.3 gnurl_strnequal.3 gnurl_mprintf.3 gnurl_global_init.3 \
++ gnurl_strequal.3 gnurl_strnequal.3 gnurl_mprintf.3 gnurl_global_init.3 \
+ gnurl_global_cleanup.3 gnurl_multi_add_handle.3 gnurl_multi_cleanup.3 \
+ gnurl_multi_fdset.3 gnurl_multi_info_read.3 gnurl_multi_init.3 \
+ gnurl_multi_perform.3 gnurl_multi_remove_handle.3 gnurl_share_cleanup.3 \
+ gnurl_share_init.3 gnurl_share_setopt.3 libgnurl.3 libgnurl-easy.3 \
+ libgnurl-multi.3 libgnurl-share.3 libgnurl-errors.3 gnurl_easy_strerror.3 \
+ gnurl_multi_strerror.3 gnurl_share_strerror.3 gnurl_global_init_mem.3 \
+ libgnurl-tutorial.3 gnurl_easy_reset.3 gnurl_easy_escape.3 \
+ gnurl_easy_unescape.3 gnurl_multi_setopt.3 gnurl_multi_socket.3 \
+ gnurl_multi_timeout.3 gnurl_formget.3 gnurl_multi_assign.3 \
+ gnurl_easy_pause.3 gnurl_easy_recv.3 gnurl_easy_send.3 \
+ gnurl_multi_socket_action.3 gnurl_multi_wait.3 libgnurl-symbols.3 \
- libgnurl-thread.3 gnurl_multi_socket_all.3 gnurl_global_sslset.3 \
++ libgnurl-thread.3 gnurl_multi_socket_all.3 gnurl_global_sslset.3 \
+ gnurl_mime_init.3 gnurl_mime_free.3 gnurl_mime_addpart.3 gnurl_mime_name.3 \
+ gnurl_mime_data.3 gnurl_mime_data_cb.3 gnurl_mime_filedata.3 \
+ gnurl_mime_filename.3 gnurl_mime_subparts.3 \
- gnurl_mime_type.3 gnurl_mime_headers.3 gnurl_mime_encoder.3
++ gnurl_mime_type.3 gnurl_mime_headers.3 gnurl_mime_encoder.3 libgnurl-env.3
diff --cc docs/libcurl/gnurl_share_setopt.3
index 57fb7d9e5,000000000..c9966214e
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_share_setopt.3
+++ b/docs/libcurl/gnurl_share_setopt.3
@@@ -1,93 -1,0 +1,100 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
+.SH NAME
+curl_share_setopt - Set options for a shared object
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
+CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
+.ad
+.SH DESCRIPTION
+Set the \fIoption\fP to \fIparameter\fP for the given \fIshare\fP.
+.SH OPTIONS
+.IP CURLSHOPT_LOCKFUNC
+The \fIparameter\fP must be a pointer to a function matching the following
+prototype:
+
+void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access,
+void *userptr);
+
+\fIdata\fP defines what data libcurl wants to lock, and you must make sure
that
+only one lock is given at any time for each kind of data.
+
+\fIaccess\fP defines what access type libcurl wants, shared or single.
+
+\fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP.
+.IP CURLSHOPT_UNLOCKFUNC
+The \fIparameter\fP must be a pointer to a function matching the following
+prototype:
+
+void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
+
+\fIdata\fP defines what data libcurl wants to unlock, and you must make sure
+that only one lock is given at any time for each kind of data.
+
+\fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP.
+.IP CURLSHOPT_SHARE
+The \fIparameter\fP specifies a type of data that should be shared. This may
+be set to one of the values described below.
+.RS
+.IP CURL_LOCK_DATA_COOKIE
+Cookie data will be shared across the easy handles using this shared object.
+.IP CURL_LOCK_DATA_DNS
+Cached DNS hosts will be shared across the easy handles using this shared
+object. Note that when you use the multi interface, all easy handles added to
+the same multi handle will share DNS cache by default without this having to
+be used!
+.IP CURL_LOCK_DATA_SSL_SESSION
+SSL session IDs will be shared across the easy handles using this shared
+object. This will reduce the time spent in the SSL handshake when reconnecting
+to the same server. Note SSL session IDs are reused within the same easy
handle
+by default. Note this symbol was added in 7.10.3 but was not implemented until
+7.23.0.
+.IP CURL_LOCK_DATA_CONNECT
+Put the connection cache in the share object and make all easy handles using
+this share object share the connection cache. Using this, you can for example
+do multi-threaded libcurl use with one handle in each thread, and yet have a
+shared pool of unused connections and this way get way better connection
- re-use than if you use one separate pool in each thread. Support for this was
- added in 7.57.0, but the symbol existed long before this.
++re-use than if you use one separate pool in each thread.
++
++Connections that are used for HTTP/1.1 Pipelining or HTTP/2 multiplexing only
++get additional transfers added to them if the existing connection is held by
++the same multi or easy handle. libcurl does not support doing HTTP/2 streams
++in different threads using a shared connection.
++
++Support for \fBCURL_LOCK_DATA_CONNECT\fP was added in 7.57.0, but the symbol
++existed before this.
+.RE
+.IP CURLSHOPT_UNSHARE
+This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
+the specified \fIparameter\fP will no longer be shared. Valid values are
+the same as those for \fICURLSHOPT_SHARE\fP.
+.IP CURLSHOPT_USERDATA
+The \fIparameter\fP allows you to specify a pointer to data that will be
passed
+to the lock_function and unlock_function each time it is called.
+.SH RETURN VALUE
+CURLSHE_OK (zero) means that the option was set properly, non-zero means an
+error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fP
+man page for the full list with descriptions.
+.SH "SEE ALSO"
+.BR curl_share_cleanup "(3), " curl_share_init "(3)"
diff --cc docs/libcurl/gnurl_version_info.3
index 18d3bd2f5,000000000..3d1d0d88a
mode 100644,000000..100644
--- a/docs/libcurl/gnurl_version_info.3
+++ b/docs/libcurl/gnurl_version_info.3
@@@ -1,188 -1,0 +1,188 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH curl_version_info 3 "2 Nov 2014" "libcurl 7.40.0" "libcurl Manual"
+.SH NAME
+curl_version_info - returns run-time libcurl version info
+.SH SYNOPSIS
+.B #include <gnurl/curl.h>
+.sp
- .BI "curl_version_info_data *curl_version_info( CURLversion "type ");"
++.BI "curl_version_info_data *curl_version_info( CURLversion "age ");"
+.ad
+.SH DESCRIPTION
+Returns a pointer to a filled in static struct with information about various
- features in the running version of libcurl. \fItype\fP should be set to the
++features in the running version of libcurl. \fIage\fP should be set to the
+version of this functionality by the time you write your program. This way,
+libcurl will always return a proper struct that your program understands,
+while programs in the future might get a different
+struct. \fBCURLVERSION_NOW\fP will be the most recent one for the library you
+have installed:
+
+ data = curl_version_info(CURLVERSION_NOW);
+
+Applications should use this information to judge if things are possible to do
+or not, instead of using compile-time checks, as dynamic/DLL libraries can be
+changed independent of applications.
+
+The curl_version_info_data struct looks like this
+
+.nf
+typedef struct {
+ CURLversion age; /* see description below */
+
+ /* when 'age' is 0 or higher, the members below also exist: */
+ const char *version; /* human readable string */
+ unsigned int version_num; /* numeric representation */
+ const char *host; /* human readable string */
+ int features; /* bitmask, see below */
+ char *ssl_version; /* human readable string */
+ long ssl_version_num; /* not used, always zero */
+ const char *libz_version; /* human readable string */
+ const char * const *protocols; /* protocols */
+
+ /* when 'age' is 1 or higher, the members below also exist: */
+ const char *ares; /* human readable string */
+ int ares_num; /* number */
+
+ /* when 'age' is 2 or higher, the member below also exists: */
+ const char *libidn; /* human readable string */
+
+ /* when 'age' is 3 or higher (7.16.1 or later), the members below also
+ exist */
+ int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
+
+ const char *libssh_version; /* human readable string */
+
+ /* when 'age' is 4 or higher (7.57.0 or later), the members below also
+ exist */
+ unsigned int brotli_ver_num; /* Numeric Brotli version
+ (MAJOR << 24) | (MINOR << 12) | PATCH */
+ const char *brotli_version; /* human readable string. */
+
+} curl_version_info_data;
+.fi
+
+\fIage\fP describes what the age of this struct is. The number depends on how
+new the libcurl you're using is. You are however guaranteed to get a struct
+that you have a matching struct for in the header, as you tell libcurl your
+"age" with the input argument.
+
+\fIversion\fP is just an ascii string for the libcurl version.
+
+\fIversion_num\fP is a 24 bit number created like this: <8 bits major number>
+| <8 bits minor number> | <8 bits patch number>. Version 7.9.8 is therefore
+returned as 0x070908.
+
+\fIhost\fP is an ascii string showing what host information that this libcurl
+was built for. As discovered by a configure script or set by the build
+environment.
+
+\fIfeatures\fP can have none, one or more bits set, and the currently defined
+bits are:
+.RS
+.IP CURL_VERSION_IPV6
+supports IPv6
+.IP CURL_VERSION_KERBEROS4
+supports Kerberos V4 (when using FTP)
+.IP CURL_VERSION_KERBEROS5
+supports Kerberos V5 authentication for FTP, IMAP, POP3, SMTP and SOCKSv5
proxy
+(Added in 7.40.0)
+.IP CURL_VERSION_SSL
+supports SSL (HTTPS/FTPS) (Added in 7.10)
+.IP CURL_VERSION_LIBZ
+supports HTTP deflate using libz (Added in 7.10)
+.IP CURL_VERSION_NTLM
+supports HTTP NTLM (added in 7.10.6)
+.IP CURL_VERSION_GSSNEGOTIATE
+supports HTTP GSS-Negotiate (added in 7.10.6)
+.IP CURL_VERSION_DEBUG
+libcurl was built with debug capabilities (added in 7.10.6)
+.IP CURL_VERSION_CURLDEBUG
+libcurl was built with memory tracking debug capabilities. This is mainly of
+interest for libcurl hackers. (added in 7.19.6)
+.IP CURL_VERSION_ASYNCHDNS
+libcurl was built with support for asynchronous name lookups, which allows
+more exact timeouts (even on Windows) and less blocking when using the multi
+interface. (added in 7.10.7)
+.IP CURL_VERSION_SPNEGO
+libcurl was built with support for SPNEGO authentication (Simple and Protected
+GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
+.IP CURL_VERSION_LARGEFILE
+libcurl was built with support for large files. (Added in 7.11.1)
+.IP CURL_VERSION_IDN
+libcurl was built with support for IDNA, domain names with international
+letters. (Added in 7.12.0)
+.IP CURL_VERSION_SSPI
+libcurl was built with support for SSPI. This is only available on Windows and
+makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and
+Digest authentication. It also allows libcurl to use the current user
+credentials without the app having to pass them on. (Added in 7.13.2)
+.IP CURL_VERSION_GSSAPI
+libcurl was built with support for GSS-API. This makes libcurl use provided
+functions for Kerberos and SPNEGO authentication. It also allows libcurl
+to use the current user credentials without the app having to pass them on.
+(Added in 7.38.0)
+.IP CURL_VERSION_CONV
+libcurl was built with support for character conversions, as provided by the
+CURLOPT_CONV_* callbacks. (Added in 7.15.4)
+.IP CURL_VERSION_TLSAUTH_SRP
+libcurl was built with support for TLS-SRP. (Added in 7.21.4)
+.IP CURL_VERSION_NTLM_WB
+libcurl was built with support for NTLM delegation to a winbind helper.
+(Added in 7.22.0)
+.IP CURL_VERSION_HTTP2
+libcurl was built with support for HTTP2.
+(Added in 7.33.0)
+.IP CURL_VERSION_UNIX_SOCKETS
+libcurl was built with support for Unix domain sockets.
+(Added in 7.40.0)
+.IP CURL_VERSION_PSL
+libcurl was built with support for Mozilla's Public Suffix List. This makes
+libcurl ignore cookies with a domain that's on the list.
+(Added in 7.47.0)
+.IP CURL_VERSION_HTTPS_PROXY
+libcurl was built with support for HTTPS-proxy.
+(Added in 7.52.0)
+.IP CURL_VERSION_MULTI_SSL
+libcurl was built with multiple SSL backends. For details, see
+\fIcurl_global_sslset(3)\fP.
+(Added in 7.56.0)
+.IP CURL_VERSION_BROTLI
+supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0)
+.RE
+\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
+has no SSL support, this is NULL.
+
+\fIssl_version_num\fP is always 0.
+
+\fIlibz_version\fP is an ASCII string (there is no numerical version). If
+libcurl has no libz support, this is NULL.
+
+\fIprotocols\fP is a pointer to an array of char * pointers, containing the
+names protocols that libcurl supports (using lowercase letters). The protocol
+names are the same as would be used in URLs. The array is terminated by a NULL
+entry.
+.SH RETURN VALUE
+A pointer to a curl_version_info_data struct.
+.SH "SEE ALSO"
+\fIcurl_version(3)\fP
+
diff --cc docs/libcurl/libgnurl-env.3
index 000000000,6548cd4aa..6548cd4aa
mode 000000,100644..100644
--- a/docs/libcurl/libgnurl-env.3
+++ b/docs/libcurl/libgnurl-env.3
diff --cc docs/libcurl/mksymbolsmanpage.pl
index cd93c51ad,8ae202e46..b0b8480ad
mode 100644,100755..100755
--- a/docs/libcurl/mksymbolsmanpage.pl
+++ b/docs/libcurl/mksymbolsmanpage.pl
diff --cc docs/libcurl/opts/GNURLOPT_DNS_CACHE_TIMEOUT.3
index e7ebef884,000000000..d4294502b
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_DNS_CACHE_TIMEOUT.3
+++ b/docs/libcurl/opts/GNURLOPT_DNS_CACHE_TIMEOUT.3
@@@ -1,72 -1,0 +1,73 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_DNS_CACHE_TIMEOUT 3 "17 Jun 2014" "libcurl 7.37.0"
"curl_easy_setopt options"
+.SH NAME
+CURLOPT_DNS_CACHE_TIMEOUT \- set life-time for DNS cache entries
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_CACHE_TIMEOUT, long age);
+.SH DESCRIPTION
+Pass a long, this sets the timeout in seconds. Name resolves will be kept in
+memory and used for this number of seconds. Set to zero to completely disable
+caching, or set to -1 to make the cached entries remain forever. By default,
+libcurl caches this info for 60 seconds.
+
+The name resolve functions of various libc implementations don't re-read name
+server information unless explicitly told so (for example, by calling
+\fIres_init(3)\fP). This may cause libcurl to keep using the older server even
+if DHCP has updated the server info, and this may look like a DNS cache issue
+to the casual libcurl-app user.
+
+Note that DNS entries have a "TTL" property but libcurl doesn't use that. This
+DNS cache timeout is entirely speculative that a name will resolve to the same
+address for a certain small amount of time into the future.
+.SH DEFAULT
+60
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
+
+ /* only reuse addresses for a very short time */
+ curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, 2L);
+
+ ret = curl_easy_perform(curl);
+
+ /* in this second request, the cache will not be used if more than
+ two seconds have passed since the previous name resolve */
+ ret = curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+}
+.fi
+.SH AVAILABILITY
+Always
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_DNS_USE_GLOBAL_CACHE "(3), " CURLOPT_DNS_SERVERS "(3), "
++.BR CURLOPT_RESOLVE "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_DNS_LOCAL_IP4.3
index 5141869e5,000000000..62ccd075c
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_DNS_LOCAL_IP4.3
+++ b/docs/libcurl/opts/GNURLOPT_DNS_LOCAL_IP4.3
@@@ -1,62 -1,0 +1,62 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_DNS_LOCAL_IP4 3 "19 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_DNS_LOCAL_IP4 \- IPv4 address to bind DNS resolves to
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_LOCAL_IP4, char *address);
+.SH DESCRIPTION
+Set the local IPv4 \fIaddress\fP that the resolver should bind to. The
+argument should be of type char * and contain a single numerical IPv4 address
+as a string. Set this option to NULL to use the default setting (don't bind
+to a specific IP address).
+
+The application does not have to keep the string around after setting this
+option.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/foo.bin");
+ curl_easy_setopt(curl, CURLOPT_DNS_LOCAL_IP4, "192.168.0.14");
+ ret = curl_easy_perform(curl);
+ curl_easy_cleanup(curl);
+}
+.fi
+.SH AVAILABILITY
+This option requires that libcurl was built with a resolver backend that
+supports this operation. The c-ares backend is the only such one.
+
+Added in 7.33.0
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not,
+CURLE_NOT_BUILT_IN if support was disabled at compile-time, or
+CURLE_BAD_FUNCTION_ARGUMENT when given a bad address.
+.SH "SEE ALSO"
- .BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP4 "(3), "
++.BR CURLOPT_DNS_INTERFACE "(3), " CURLOPT_DNS_LOCAL_IP6 "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_PRIVATE.3
index 3d10607a7,000000000..fd2c0f340
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_PRIVATE.3
+++ b/docs/libcurl/opts/GNURLOPT_PRIVATE.3
@@@ -1,61 -1,0 +1,61 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_PRIVATE 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_PRIVATE \- store a private pointer
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRIVATE, void *pointer);
+.SH DESCRIPTION
+Pass a void * as parameter, pointing to data that should be associated with
+this curl handle. The pointer can subsequently be retrieved using
+\fIcurl_easy_getinfo(3)\fP with the CURLINFO_PRIVATE option. libcurl itself
- never does nothing with this data.
++never does anything with this data.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+struct private secrets;
+if(curl) {
+ struct private *extracted;
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* store a pointer to our private struct */
+ curl_easy_setopt(curl, CURLOPT_PRIVATE, &secrets);
+
+ curl_easy_perform(curl);
+
+ /* we can extract the private pointer again too */
+ curl_easy_getinfo(curl, CURLINFO_PRIVATE, &extracted);
+}
+.fi
+.SH AVAILABILITY
+Added in 7.10.3
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_VERBOSE "(3), " CURLOPT_STDERR "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_READFUNCTION.3
index f77b67b09,000000000..08fbf3bc9
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_READFUNCTION.3
@@@ -1,79 -1,0 +1,79 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
- .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
++.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_READFUNCTION 3 "16 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_READFUNCTION \- read callback for data uploads
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+size_t read_callback(char *buffer, size_t size, size_t nitems, void
*instream);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_READFUNCTION, read_callback);
+
+.SH DESCRIPTION
+Pass a pointer to your callback function, as the prototype shows above.
+
+This callback function gets called by libcurl as soon as it needs to read data
+in order to send it to the peer - like if you ask it to upload or post data to
+the server. The data area pointed at by the pointer \fIbuffer\fP should be
- filled up with at most \fIsize\fP multiplied with \fInmemb\fP number of bytes
++filled up with at most \fIsize\fP multiplied with \fInitems\fP number of bytes
+by your function.
+
+Your function must then return the actual number of bytes that it stored in
+that memory area. Returning 0 will signal end-of-file to the library and cause
+it to stop the current transfer.
+
+If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
+server expected it, like when you've said you will upload N bytes and you
+upload less than N bytes), you may experience that the server "hangs" waiting
+for the rest of the data that won't come.
+
+The read callback may return \fICURL_READFUNC_ABORT\fP to stop the current
+operation immediately, resulting in a \fICURLE_ABORTED_BY_CALLBACK\fP error
+code from the transfer.
+
+The callback can return \fICURL_READFUNC_PAUSE\fP to cause reading from this
+connection to pause. See \fIcurl_easy_pause(3)\fP for further details.
+
+\fBBugs\fP: when doing TFTP uploads, you must return the exact amount of data
+that the callback wants, or it will be considered the final packet by the
+server end and the transfer will end there.
+
+If you set this callback pointer to NULL, or don't set it at all, the default
+internal read function will be used. It is doing an fread() on the FILE *
+userdata set with \fICURLOPT_READDATA(3)\fP.
+.SH DEFAULT
+The default internal read callback is fread().
+.SH PROTOCOLS
+This is used for all protocols when doing uploads.
+.SH EXAMPLE
+Here's an example setting a read callback for reading that to upload to an FTP
+site: https://curl.haxx.se/libcurl/c/ftpupload.html
+.SH AVAILABILITY
+CURL_READFUNC_PAUSE return code was added in 7.18.0 and CURL_READFUNC_ABORT
+was added in 7.12.1.
+.SH RETURN VALUE
+This will return CURLE_OK.
+.SH "SEE ALSO"
+.BR CURLOPT_READDATA "(3), " CURLOPT_WRITEFUNCTION "(3), "
+.BR CURLOPT_SEEKFUNCTION "(3), " CURLOPT_UPLOAD "(3), " CURLOPT_POST "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_SSLVERSION.3
index 44cb487b8,000000000..b2b112083
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_SSLVERSION.3
+++ b/docs/libcurl/opts/GNURLOPT_SSLVERSION.3
@@@ -1,98 -1,0 +1,102 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSLVERSION 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_SSLVERSION \- set preferred TLS/SSL version
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLVERSION, long version);
+.SH DESCRIPTION
+Pass a long as parameter to control which version of SSL/TLS to attempt to
+use.
+
+Use one of the available defines for this purpose. The available options are:
+.RS
+.IP CURL_SSLVERSION_DEFAULT
+The default action. This will attempt to figure out the remote SSL protocol
+version.
+.IP CURL_SSLVERSION_TLSv1
+TLSv1.x
+.IP CURL_SSLVERSION_SSLv2
+SSLv2
+.IP CURL_SSLVERSION_SSLv3
+SSLv3
+.IP CURL_SSLVERSION_TLSv1_0
+TLSv1.0 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_1
+TLSv1.1 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_2
+TLSv1.2 (Added in 7.34.0)
+.IP CURL_SSLVERSION_TLSv1_3
+TLSv1.3 (Added in 7.52.0)
++.RE
++The maximum TLS version can be set by using \fIone\fP of the
++CURL_SSLVERSION_MAX_ macros below. It is also possible to OR \fIone\fP of the
++CURL_SSLVERSION_ macros with \fIone\fP of the CURL_SSLVERSION_MAX_ macros.
++The MAX macros are not supported for SSL backends axTLS or wolfSSL.
++.RS
+.IP CURL_SSLVERSION_MAX_DEFAULT
+The flag defines the maximum supported TLS version as TLSv1.2, or the default
- value from the SSL library. Only the NSS library currently allows one to get
- the maximum supported TLS version.
++value from the SSL library.
+(Added in 7.54.0)
+.IP CURL_SSLVERSION_MAX_TLSv1_0
+The flag defines maximum supported TLS version as TLSv1.0.
+(Added in 7.54.0)
+.IP CURL_SSLVERSION_MAX_TLSv1_1
+The flag defines maximum supported TLS version as TLSv1.1.
+(Added in 7.54.0)
+.IP CURL_SSLVERSION_MAX_TLSv1_2
+The flag defines maximum supported TLS version as TLSv1.2.
+(Added in 7.54.0)
+.IP CURL_SSLVERSION_MAX_TLSv1_3
+The flag defines maximum supported TLS version as TLSv1.3.
+(Added in 7.54.0)
+.RE
+.SH DEFAULT
+CURL_SSLVERSION_DEFAULT
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
- /* ask libcurl to use TLS version 1.1 or later */
- curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1 |
- CURL_SSLVERSION_MAX_DEFAULT);
++ /* ask libcurl to use TLS version 1.0 or later */
++ curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+SSLv2 is disabled by default since 7.18.1. Other SSL versions availability may
+vary depending on which backend libcurl has been built to use.
+
+SSLv3 is disabled by default since 7.39.0.
+.SH RETURN VALUE
+Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+.SH "SEE ALSO"
+.BR CURLOPT_USE_SSL "(3), " CURLOPT_HTTP_VERSION "(3), "
+.BR CURLOPT_IPRESOLVE "(3) "
diff --cc docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3
index 8fc18f962,000000000..b142d061d
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3
+++ b/docs/libcurl/opts/GNURLOPT_SSL_CTX_FUNCTION.3
@@@ -1,148 -1,0 +1,78 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_SSL_CTX_FUNCTION 3 "19 Jun 2014" "libcurl 7.37.0"
"curl_easy_setopt options"
+.SH NAME
+CURLOPT_SSL_CTX_FUNCTION \- SSL context callback for OpenSSL, wolfSSL/CyaSSL
or mbedTLS
+.SH SYNOPSIS
+.nf
+#include <gnurl/curl.h>
+
+CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr);
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CTX_FUNCTION,
+ ssl_ctx_callback);
+.SH DESCRIPTION
+This option only works for libcurl powered by OpenSSL, wolfSSL/CyaSSL or
+mbedTLS. If libcurl was built against another SSL library this functionality
is
+absent.
+
+Pass a pointer to your callback function, which should match the prototype
+shown above.
+
+This callback function gets called by libcurl just before the initialization
+of an SSL connection after having processed all other SSL related options to
+give a last chance to an application to modify the behaviour of the SSL
+initialization. The \fIssl_ctx\fP parameter is actually a pointer to the SSL
+library's \fISSL_CTX\fP for OpenSSL or wolfSSL/CyaSSL, and a pointer to
+\fImbedtls_ssl_config\fP for mbedTLS. If an error is returned from the
callback
+no attempt to establish a connection is made and the perform operation will
+return the callback's error code. Set the \fIuserptr\fP argument with the
+\fICURLOPT_SSL_CTX_DATA(3)\fP option.
+
+This function will get called on all new connections made to a server, during
+the SSL negotiation. The \fIssl_ctx\fP will point to a newly initialized
object
+each time, but note the pointer may be the same as from a prior call.
+
+To use this properly, a non-trivial amount of knowledge of your SSL library is
+necessary. For example, you can use this function to call library-specific
+callbacks to add additional validation code for certificates, and even to
+change the actual URI of a HTTPS request.
+.SH DEFAULT
+NULL
+.SH PROTOCOLS
+All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
+.SH EXAMPLE
- .nf
- /* OpenSSL specific */
-
- #include <openssl/ssl.h>
- #include <gnurl/curl.h>
- #include <stdio.h>
-
- static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
- {
- X509_STORE *store;
- X509 *cert=NULL;
- BIO *bio;
- char *mypem = /* example CA cert PEM - shortened */
- "-----BEGIN CERTIFICATE-----\\n"
- "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\\n"
- "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\\n"
- "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\\n"
- "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\\n"
- "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\\n"
- "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\\n"
- "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\\n"
- "-----END CERTIFICATE-----\\n";
- /* get a BIO */
- bio=BIO_new_mem_buf(mypem, -1);
- /* use it to read the PEM formatted certificate from memory into an
- * X509 structure that SSL can use
- */
- PEM_read_bio_X509(bio, &cert, 0, NULL);
- if(cert == NULL)
- printf("PEM_read_bio_X509 failed...\\n");
-
- /* get a pointer to the X509 certificate store (which may be empty) */
- store=SSL_CTX_get_cert_store((SSL_CTX *)sslctx);
-
- /* add our certificate to this store */
- if(X509_STORE_add_cert(store, cert)==0)
- printf("error adding certificate\\n");
-
- /* decrease reference counts */
- X509_free(cert);
- BIO_free(bio);
-
- /* all set to go */
- return CURLE_OK;
- }
-
- int main(void)
- {
- CURL * ch;
- CURLcode rv;
-
- rv=curl_global_init(CURL_GLOBAL_ALL);
- ch=curl_easy_init();
- rv=curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
- rv=curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L);
- rv=curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
-
- /* Retrieve page using cacerts' certificate -> will succeed
- * load the certificate by installing a function doing the necessary
- * "modifications" to the SSL CONTEXT just before link init
- */
- rv=curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
- rv=curl_easy_perform(ch);
- if(rv==CURLE_OK)
- printf("*** transfer succeeded ***\\n");
- else
- printf("*** transfer failed ***\\n");
++See cacertinmem.c in docs/examples directory for usage example.
+
- curl_easy_cleanup(ch);
- curl_global_cleanup();
- return rv;
- }
- .fi
++https://curl.haxx.se/libcurl/c/cacertinmem.html
+.SH AVAILABILITY
+Added in 7.11.0 for OpenSSL. Added in 7.42.0 for wolfSSL/CyaSSL. Added in
+7.54.0 for mbedTLS. Other SSL backends not supported.
+.SH RETURN VALUE
+CURLE_OK if supported; or an error such as:
+
+CURLE_NOT_BUILT_IN - Not supported by the SSL backend
+
+CURLE_UNKNOWN_OPTION
+.SH "SEE ALSO"
+.BR CURLOPT_SSL_CTX_DATA "(3), " CURLOPT_SSL_VERIFYPEER "(3), "
diff --cc docs/libcurl/opts/GNURLOPT_TCP_NODELAY.3
index 175675ef1,000000000..ddc22f1b5
mode 100644,000000..100644
--- a/docs/libcurl/opts/GNURLOPT_TCP_NODELAY.3
+++ b/docs/libcurl/opts/GNURLOPT_TCP_NODELAY.3
@@@ -1,64 -1,0 +1,64 @@@
+.\" **************************************************************************
+.\" * _ _ ____ _
+.\" * Project ___| | | | _ \| |
+.\" * / __| | | | |_) | |
+.\" * | (__| |_| | _ <| |___
+.\" * \___|\___/|_| \_\_____|
+.\" *
+.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+.\" *
+.\" * This software is licensed as described in the file COPYING, which
+.\" * you should have received as part of this distribution. The terms
+.\" * are also available at https://curl.haxx.se/docs/copyright.html.
+.\" *
+.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+.\" * copies of the Software, and permit persons to whom the Software is
+.\" * furnished to do so, under the terms of the COPYING file.
+.\" *
+.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
ANY
+.\" * KIND, either express or implied.
+.\" *
+.\" **************************************************************************
+.\"
+.TH CURLOPT_TCP_NODELAY 3 "30 Jun 2016" "libcurl 7.50.0" "curl_easy_setopt
options"
+.SH NAME
+CURLOPT_TCP_NODELAY \- set the TCP_NODELAY option
+.SH SYNOPSIS
+#include <gnurl/curl.h>
+
+CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_NODELAY, long nodelay);
+.SH DESCRIPTION
+Pass a long specifying whether the TCP_NODELAY option is to be set or cleared
+(1L = set, 0 = clear). The option is set by default. This will have no effect
+after the connection has been established.
+
+Setting this option to 1L will disable TCP's Nagle algorithm on this
+connection. The purpose of this algorithm is to try to minimize the number of
+small packets on the network (where "small packets" means TCP segments less
+than the Maximum Segment Size (MSS) for the network).
+
+Maximizing the amount of data sent per TCP segment is good because it
+amortizes the overhead of the send. However, in some cases small segments may
+need to be sent without delay. This is less efficient than sending larger
+amounts of data at a time, and can contribute to congestion on the network if
+overdone.
+.SH DEFAULT
+1
+.SH PROTOCOLS
+All
+.SH EXAMPLE
+.nf
+CURL *curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+ /* disable Nagle */
- curl_easy_setopt(curl, CURLOPT_TCP_FASTOPEN, 0);
++ curl_easy_setopt(curl, CURLOPT_TCP_NODELAY, 0);
+ curl_easy_perform(curl);
+}
+.fi
+.SH AVAILABILITY
+Always. The default was changed to 1 from 0 in 7.50.2.
+.SH RETURN VALUE
+Returns CURLE_OK
+.SH "SEE ALSO"
+.BR CURLOPT_SOCKOPTFUNCTION "(3), " CURLOPT_TCP_KEEPALIVE "(3), "
diff --cc gnurl-config.in
index 07bcefbf6,000000000..a2d249ccf
mode 100644,000000..100644
--- a/gnurl-config.in
+++ b/gnurl-config.in
@@@ -1,178 -1,0 +1,182 @@@
+#! /bin/sh
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
- # Copyright (C) 2001 - 2012, Daniel Stenberg, <address@hidden>, et al.
++# Copyright (C) 2001 - 2017, Daniel Stenberg, <address@hidden>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.haxx.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+###########################################################################
+
address@hidden@
address@hidden@
address@hidden@
address@hidden@
+
+usage()
+{
+ cat <<EOF
+Usage: gnurl-config [OPTION]
+
+Available values for OPTION include:
+
+ --built-shared says 'yes' if libgnurl was built shared
+ --ca ca bundle install path
+ --cc compiler
+ --cflags pre-processor and compiler flags
+ --checkfor [version] check for (lib)gnurl of the specified version
+ --configure the arguments given to configure when building gnurl
+ --features newline separated list of enabled features
+ --help display this help and exit
+ --libs library linking information
+ --prefix gnurl install prefix
+ --protocols newline separated list of enabled protocols
++ --ssl-backends output the SSL backends libcurl was built to support
+ --static-libs static libgnurl library linking information
+ --version output version information
+ --vernum output the version information as a number (hexadecimal)
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ # this deals with options in the style
+ # --option=value and extracts the value part
+ # [not currently used]
+ -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) value= ;;
+ esac
+
+ case "$1" in
+ --built-shared)
+ echo @ENABLE_SHARED@
+ ;;
+
+ --ca)
+ echo @CURL_CA_BUNDLE@
+ ;;
+
+ --cc)
+ echo "@CC@"
+ ;;
+
+ --prefix)
+ echo "$prefix"
+ ;;
+
+ --feature|--features)
+ for feature in @SUPPORT_FEATURES@ ""; do
+ test -n "$feature" && echo "$feature"
+ done
+ ;;
+
+ --protocols)
+ for protocol in @SUPPORT_PROTOCOLS@; do
+ echo "$protocol"
+ done
+ ;;
+
+ --version)
+ echo libgnurl @CURLVERSION@
+ exit 0
+ ;;
+
+ --checkfor)
+ checkfor=$2
+ cmajor=`echo $checkfor | cut -d. -f1`
+ cminor=`echo $checkfor | cut -d. -f2`
+ # when extracting the patch part we strip off everything after a
+ # dash as that's used for things like version 1.2.3-CVS
+ cpatch=`echo $checkfor | cut -d. -f3 | cut -d- -f1`
+ checknum=`echo "$cmajor*256*256 + $cminor*256 + ${cpatch:-0}" | bc`
+ numuppercase=`echo @VERSIONNUM@ | tr 'a-f' 'A-F'`
+ nownum=`echo "obase=10; ibase=16; $numuppercase" | bc`
+
+ if test "$nownum" -ge "$checknum"; then
+ # silent success
+ exit 0
+ else
+ echo "requested version $checkfor is newer than existing
@CURLVERSION@"
+ exit 1
+ fi
+ ;;
+
+ --vernum)
+ echo @VERSIONNUM@
+ exit 0
+ ;;
+
+ --help)
+ usage 0
+ ;;
+
+ --cflags)
+ if test "X$cppflag_gnurl_staticlib" = "X-DGNURL_STATICLIB"; then
+ CPPFLAG_GNURL_STATICLIB="-DGNURL_STATICLIB "
+ else
+ CPPFLAG_GNURL_STATICLIB=""
+ fi
+ if test "address@hidden@" = "X/usr/include"; then
+ echo "$CPPFLAG_GNURL_STATICLIB"
+ else
+ echo "address@hidden@"
+ fi
+ ;;
+
+ --libs)
+ if test "address@hidden@" != "X/usr/lib" -a "address@hidden@" !=
"X/usr/lib64"; then
+ GNURLLIBDIR="address@hidden@ "
+ else
+ GNURLLIBDIR=""
+ fi
+ if test "address@hidden@" = "Xyes"; then
+ echo ${GNURLLIBDIR}-lgnurl @LIBCURL_LIBS@
+ else
+ echo ${GNURLLIBDIR}-lgnurl
+ fi
+ ;;
++ --ssl-backends)
++ echo "@SSL_BACKENDS@"
++ ;;
+
+ --static-libs)
+ if test "address@hidden@" != "Xno" ; then
+ echo @libdir@/address@hidden@ @LDFLAGS@ @LIBGNURL_LIBS@
+ else
+ echo "gnurl was built with static libraries disabled" >&2
+ exit 1
+ fi
+ ;;
+
+ --configure)
+ echo @CONFIGURE_OPTIONS@
+ ;;
+
+ *)
+ echo "unknown option: $1"
+ usage 1
+ ;;
+ esac
+ shift
+done
+
+exit 0
diff --cc lib/Makefile.am
index ed99956fd,87c64f3a8..d1338c992
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@@ -105,7 -105,9 +105,9 @@@ libgnurl_la_LDFLAGS_EXTRA += -mimpure-t
endif
if CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS
-libcurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+libgnurl_la_LDFLAGS_EXTRA += -Wl,--version-script=libcurl.vers
+ else
-libcurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*'
++libgnurl_la_LDFLAGS_EXTRA += -export-symbols-regex '^curl_.*'
endif
if USE_CPPFLAG_CURL_STATICLIB
diff --cc lib/parsedate.c
index 9ba5b94ad,0fabbd269..a678ede3a
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@@ -75,11 -75,9 +75,9 @@@
#include "curl_setup.h"
- #ifdef HAVE_LIMITS_H
#include <limits.h>
- #endif
-#include <curl/curl.h>
+#include <gnurl/curl.h>
#include "strcase.h"
#include "warnless.h"
#include "parsedate.h"
diff --cc lib/vtls/gskit.c
index 6050fd1a7,8f0cc0bb8..f9db8d1f7
--- a/lib/vtls/gskit.c
+++ b/lib/vtls/gskit.c
@@@ -61,11 -61,9 +61,9 @@@
#endif
- #ifdef HAVE_LIMITS_H
- # include <limits.h>
- #endif
+ #include <limits.h>
-#include <curl/curl.h>
+#include <gnurl/curl.h>
#include "urldata.h"
#include "sendf.h"
#include "gskit.h"
diff --cc tests/libtest/mk-lib1521.pl
index 0b1d10d46,6ded47220..0b1d10d46
mode 100644,100755..100755
--- a/tests/libtest/mk-lib1521.pl
+++ b/tests/libtest/mk-lib1521.pl
diff --cc tests/manpage-scan.pl
index 62eaebea1,b6864c857..62eaebea1
mode 100644,100755..100755
--- a/tests/manpage-scan.pl
+++ b/tests/manpage-scan.pl
diff --cc tests/nroff-scan.pl
index 1ab780f56,393068cd3..1ab780f56
mode 100644,100755..100755
--- a/tests/nroff-scan.pl
+++ b/tests/nroff-scan.pl
diff --cc tests/symbol-scan.pl
index 1700ca33a,5d570d8a8..1700ca33a
mode 100644,100755..100755
--- a/tests/symbol-scan.pl
+++ b/tests/symbol-scan.pl
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 92/125: mail-rcpt.d: fix short-text description, (continued)
- [GNUnet-SVN] [gnurl] 92/125: mail-rcpt.d: fix short-text description, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 102/125: configure.ac: append extra linker flags instead of prepending them., gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 112/125: SMB: fix numeric constant suffix and variable types, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 119/125: examples/url2file.c: add missing curl_global_cleanup() call, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 84/125: examples/cacertinmem: ignore cert-already-exists error, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 123/125: libcurl-env.3: first take, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 55/125: Revert "curl: don't set CURLOPT_INTERLEAVEDATA", gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 62/125: setopt: less *or equal* than INT_MAX/1000 should be fine, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 68/125: conncache: fix a return code [regression], gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 65/125: examples/smtp-mail.c: use separate defines for options and mail, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 125/125: Merge branch 'master' of https://github.com/curl/curl,
gnunet <=
- [GNUnet-SVN] [gnurl] 81/125: Makefile.vc: Added our standard copyright header, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 73/125: content_encoding: rework zlib_inflate, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 96/125: system.h: Additionally check __LONG_MAX__ for defining curl_off_t, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 107/125: docs: comment about CURLE_READ_ERROR returned by curl_mime_filedata, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 120/125: test558: fix for multissl builds, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 79/125: build: Added Visual Studio 2017 project files, gnunet, 2018/01/21