Compare commits
134 Commits
curl-7_21_
...
curl-7_21_
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8249b0522d | ||
![]() |
a43201e578 | ||
![]() |
3c2ee9c341 | ||
![]() |
8d31d70114 | ||
![]() |
9754b20adb | ||
![]() |
17c1e3bcba | ||
![]() |
6cf90c6a7b | ||
![]() |
67d76dd520 | ||
![]() |
8348dd96dd | ||
![]() |
2596eb6d19 | ||
![]() |
625932d398 | ||
![]() |
37201e3c36 | ||
![]() |
06869597c3 | ||
![]() |
517f3a1b8f | ||
![]() |
495d3e07d4 | ||
![]() |
44e5e37f38 | ||
![]() |
1d594772fd | ||
![]() |
ff26895b5c | ||
![]() |
d7134036b2 | ||
![]() |
7115245f88 | ||
![]() |
dc2157a087 | ||
![]() |
5d5dd08e77 | ||
![]() |
cfbdbf9783 | ||
![]() |
b24e872502 | ||
![]() |
50a1d5ee1c | ||
![]() |
6ccbd1bee4 | ||
![]() |
1267719735 | ||
![]() |
c49e9683b8 | ||
![]() |
6ea043a504 | ||
![]() |
af4eae77ac | ||
![]() |
7d342c723c | ||
![]() |
5c2b6b2d3e | ||
![]() |
11958ed331 | ||
![]() |
15201da4ca | ||
![]() |
59bad26bb2 | ||
![]() |
f91d578674 | ||
![]() |
9df8257301 | ||
![]() |
992ceae386 | ||
![]() |
364fd2f1ad | ||
![]() |
1cbe66fbc8 | ||
![]() |
f8cf037ecf | ||
![]() |
6028fdb305 | ||
![]() |
45456135d5 | ||
![]() |
52beeb2c9f | ||
![]() |
544f15af98 | ||
![]() |
000ac0c975 | ||
![]() |
fc308282ac | ||
![]() |
e9f3513264 | ||
![]() |
a1a5ba3d0a | ||
![]() |
687df5c8c3 | ||
![]() |
40253e32fe | ||
![]() |
f97a7eb400 | ||
![]() |
3cf658fc24 | ||
![]() |
5247266df6 | ||
![]() |
dfa6ee890d | ||
![]() |
bd5df39a29 | ||
![]() |
6f3dc2a726 | ||
![]() |
b01fb30f9c | ||
![]() |
f38e52071e | ||
![]() |
811fcccfc9 | ||
![]() |
b552ca223e | ||
![]() |
a93522f68d | ||
![]() |
425060fed1 | ||
![]() |
fbee86a9e2 | ||
![]() |
2f0c118577 | ||
![]() |
53e47ca947 | ||
![]() |
314117cbf1 | ||
![]() |
d296dd4ee8 | ||
![]() |
04eff9beb9 | ||
![]() |
b5c3feda17 | ||
![]() |
01c309e186 | ||
![]() |
d873c820bd | ||
![]() |
41cf1f4090 | ||
![]() |
6ad0acb608 | ||
![]() |
cfbb351e22 | ||
![]() |
11f53b9a18 | ||
![]() |
eb33f5d1f8 | ||
![]() |
cef30e0924 | ||
![]() |
a13128596c | ||
![]() |
6d2ccfed48 | ||
![]() |
7738b15977 | ||
![]() |
0fa4b41c2b | ||
![]() |
7d166b0ef6 | ||
![]() |
affff47b3d | ||
![]() |
d6981cb508 | ||
![]() |
40ecd6c9b8 | ||
![]() |
181b08babb | ||
![]() |
7abf3b97fe | ||
![]() |
4a1384a8b4 | ||
![]() |
d76874a665 | ||
![]() |
c8d42b2f1c | ||
![]() |
84332b60b9 | ||
![]() |
bc0699f226 | ||
![]() |
157e6d4e7e | ||
![]() |
d4e6404135 | ||
![]() |
3992309285 | ||
![]() |
241b704e1f | ||
![]() |
1dbb9a0ba4 | ||
![]() |
e7743aa7b4 | ||
![]() |
915032ea02 | ||
![]() |
e01cc7737c | ||
![]() |
bd36927f18 | ||
![]() |
0417d34533 | ||
![]() |
a57611e308 | ||
![]() |
12533bb184 | ||
![]() |
9be951a415 | ||
![]() |
7239538d9a | ||
![]() |
18a9ee6bdf | ||
![]() |
f3b77e5611 | ||
![]() |
89924a897d | ||
![]() |
bcefe839c7 | ||
![]() |
458dd4550b | ||
![]() |
f7ae7b3623 | ||
![]() |
31dd8ab1d6 | ||
![]() |
8da56e12c6 | ||
![]() |
0a04078916 | ||
![]() |
1182c8bdcd | ||
![]() |
55d2460fc3 | ||
![]() |
a89d7997b7 | ||
![]() |
d8383220ec | ||
![]() |
8e7ec794f5 | ||
![]() |
bd5d478dd4 | ||
![]() |
1b15b31c86 | ||
![]() |
e6d85923c1 | ||
![]() |
614bae813e | ||
![]() |
bd6a695545 | ||
![]() |
d63bdba097 | ||
![]() |
43edcc4a2e | ||
![]() |
01c2b397aa | ||
![]() |
51a757c11b | ||
![]() |
7a99672042 | ||
![]() |
7eecfb536a | ||
![]() |
a09814138a | ||
![]() |
42432d67cc |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -40,3 +40,4 @@ tags
|
|||||||
TAGS
|
TAGS
|
||||||
*~
|
*~
|
||||||
aclocal.m4.bak
|
aclocal.m4.bak
|
||||||
|
CHANGES.dist
|
||||||
|
36
Android.mk
36
Android.mk
@@ -12,29 +12,37 @@
|
|||||||
# shown. Now, from the external/curl/ directory, run curl's normal configure
|
# shown. Now, from the external/curl/ directory, run curl's normal configure
|
||||||
# command with flags that match what Android itself uses. This will mean
|
# command with flags that match what Android itself uses. This will mean
|
||||||
# putting the compiler directory into the PATH, putting the -I, -isystem and
|
# putting the compiler directory into the PATH, putting the -I, -isystem and
|
||||||
# -D options into CPPFLAGS, putting the -m, -f, -O and -nostdlib options into
|
# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
|
||||||
# CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the path
|
# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
|
||||||
# to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o. Remember
|
# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
|
||||||
# that the paths must be absolute since you will not be running configure from
|
# Remember that the paths must be absolute since you will not be running
|
||||||
# the same directory as the Android make. The normal cross-compiler options
|
# configure from the same directory as the Android make. The normal
|
||||||
# must also be set.
|
# cross-compiler options must also be set. Note that the -c, -o, -MD and
|
||||||
|
# similar flags must not be set.
|
||||||
|
#
|
||||||
|
# To see all the LIBS options, you'll need to do the "showcommands" trick on an
|
||||||
|
# executable that's already buildable and watch what flags Android uses to link
|
||||||
|
# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
|
||||||
|
# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
|
||||||
|
# directories so that additional libraries can be found and used by curl.
|
||||||
#
|
#
|
||||||
# The end result will be a configure command that looks something like this
|
# The end result will be a configure command that looks something like this
|
||||||
# (the environment variable A is set to the Android root path):
|
# (the environment variable A is set to the Android root path which makes the
|
||||||
|
# command shorter):
|
||||||
#
|
#
|
||||||
# A=`realpath ../..` && \
|
# A=`realpath ../..` && \
|
||||||
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
|
# PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
|
||||||
# ./configure --host=arm-linux CC=arm-eabi-gcc \
|
# ./configure --host=arm-linux CC=arm-eabi-gcc \
|
||||||
# CPPFLAGS="-I $A/system/core/include ..." \
|
# CPPFLAGS="-I $A/system/core/include ..." \
|
||||||
# CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
|
# CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
|
||||||
# LIB="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
# LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
|
||||||
# /interwork/libgcc.a ..." \
|
# /interwork/libgcc.a ..."
|
||||||
#
|
#
|
||||||
# Finally, copy the file COPYING to NOTICE so that the curl license gets put
|
# Finally, copy the file COPYING to NOTICE so that the curl license gets put
|
||||||
# into the right place (see the note about this below).
|
# into the right place (but see the note about this below).
|
||||||
#
|
#
|
||||||
# Dan Fandrich
|
# Dan Fandrich
|
||||||
# May 2010
|
# August 2010
|
||||||
|
|
||||||
LOCAL_PATH:= $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
|
|
||||||
@@ -82,7 +90,7 @@ include $(BUILD_STATIC_LIBRARY)
|
|||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
include $(LOCAL_PATH)/src/Makefile.inc
|
include $(LOCAL_PATH)/src/Makefile.inc
|
||||||
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_SOURCES))
|
LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))
|
||||||
|
|
||||||
LOCAL_MODULE := curl
|
LOCAL_MODULE := curl
|
||||||
LOCAL_STATIC_LIBRARIES := libcurl
|
LOCAL_STATIC_LIBRARIES := libcurl
|
||||||
@@ -90,8 +98,8 @@ LOCAL_SYSTEM_SHARED_LIBRARIES := libc
|
|||||||
|
|
||||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
|
||||||
|
|
||||||
# This will also need to include $(CURLX_ONES) in order to correctly link
|
# This may also need to include $(CURLX_ONES) in order to correctly link
|
||||||
# against a dynamic library
|
# if libcurl is changed to be built as a dynamic library
|
||||||
LOCAL_CFLAGS += $(common_CFLAGS)
|
LOCAL_CFLAGS += $(common_CFLAGS)
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
@@ -54,17 +54,23 @@ borland-clean:
|
|||||||
cd ..\src
|
cd ..\src
|
||||||
make -f Makefile.b32 clean
|
make -f Makefile.b32 clean
|
||||||
|
|
||||||
watcom:
|
watcom: .SYMBOLIC
|
||||||
cd lib
|
cd lib
|
||||||
wmake -f Makefile.Watcom
|
wmake -u -f Makefile.Watcom
|
||||||
cd ..\src
|
cd ..\src
|
||||||
wmake -f Makefile.Watcom
|
wmake -u -f Makefile.Watcom
|
||||||
|
|
||||||
watcom-clean:
|
watcom-clean: .SYMBOLIC
|
||||||
cd lib
|
cd lib
|
||||||
wmake -f Makefile.Watcom clean
|
wmake -u -f Makefile.Watcom clean
|
||||||
cd ..\src
|
cd ..\src
|
||||||
wmake -f Makefile.Watcom clean
|
wmake -u -f Makefile.Watcom clean
|
||||||
|
|
||||||
|
watcom-vclean: .SYMBOLIC
|
||||||
|
cd lib
|
||||||
|
wmake -u -f Makefile.Watcom vclean
|
||||||
|
cd ..\src
|
||||||
|
wmake -u -f Makefile.Watcom vclean
|
||||||
|
|
||||||
mingw32:
|
mingw32:
|
||||||
$(MAKE) -C lib -f Makefile.m32
|
$(MAKE) -C lib -f Makefile.m32
|
||||||
|
@@ -1,43 +1,58 @@
|
|||||||
Curl and libcurl 7.21.0
|
Curl and libcurl 7.21.1
|
||||||
|
|
||||||
Public curl releases: 116
|
Public curl releases: 117
|
||||||
Command line options: 138
|
Command line options: 138
|
||||||
curl_easy_setopt() options: 180
|
curl_easy_setopt() options: 180
|
||||||
Public functions in libcurl: 58
|
Public functions in libcurl: 58
|
||||||
Known libcurl bindings: 39
|
Known libcurl bindings: 39
|
||||||
Contributors: 794
|
Contributors: 808
|
||||||
|
|
||||||
This release includes the following changes:
|
This release includes the following changes:
|
||||||
|
|
||||||
o added the --proto and -proto-redir options
|
o maketgz: produce CHANGES automatically
|
||||||
o new configure option --enable-threaded-resolver
|
o added support for NTLM authentication when compiled with NSS
|
||||||
o improve TELNET ability with libcurl
|
o build: Enable configure --enable-werror
|
||||||
o added support for PolarSSL
|
o curl-config: --built-shared returns shared info
|
||||||
o added support for FTP wildcard matching and downloads
|
|
||||||
o added support for RTMP
|
|
||||||
o introducing new LDAP code for new enough OpenLDAP
|
|
||||||
o OpenLDAP support enabled for cygwin builds
|
|
||||||
o added CURLINFO_PRIMARY_PORT, CURLINFO_LOCAL_IP and CURLINFO_LOCAL_PORT
|
|
||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
o prevent needless reverse name lookups
|
o configure: spell --disable-threaded-resolver correctly
|
||||||
o detect GSS on ancient Linux distros
|
o multi: call the progress callback in all states
|
||||||
o GnuTLS: EOF caused error when it wasn't
|
o multi: unmark handle as used when no longer head of pipeline
|
||||||
o GnuTLS: SSL handshake phase is non-blocking
|
o sendrecv: treat all negative values from send/recv as errors
|
||||||
o -J/--remote-header-name strips CRLF
|
o ftp-wildcard: avoid tight loop when used without any pattern
|
||||||
o MSVC makefiles now use ws2_32.lib instead of wsock32.lib
|
o multi_socket: re-use of same socket without notifying app
|
||||||
o -O crash on windows
|
o ftp wildcard: FTP LIST parser FIX
|
||||||
o SSL handshake timeout underflow in libcurl-NSS
|
o urlglobbing backslash escaping bug
|
||||||
o multi interface missed storing connection time
|
o build: add enable IPV6 option for the VC makefiles
|
||||||
o broken CRL support in libcurl-NSS
|
o multi: CURLINFO_LASTSOCKET doesn't work after remove_handle
|
||||||
o ignore response-body on redirect even if compressed
|
o --libcurl: use *_LARGE options with typecasted constants
|
||||||
o OpenSSL handshake state-machine for multi interface
|
o --libcurl: hide setopt() calls setting default options
|
||||||
o TFTP timeout option sent correctly
|
o curl: avoid setting libcurl options to its default
|
||||||
o TFTP block id wrap
|
o --libcurl: list the tricky options instead of using [REMARK]
|
||||||
o curl_multi_socket_action() timeout handles inaccuracy in timers better
|
o http: don't enable chunked during authentication negotiations
|
||||||
o SCP/SFTP failure to respect the timeout
|
o upload: warn users trying to upload from stdin with anyauth
|
||||||
o spurious SSL connection aborts with OpenSSL
|
o configure: allow environments variable to override internals
|
||||||
|
o threaded resolver: fix timeout issue
|
||||||
|
o multi: fix condition that remove timers before trigger
|
||||||
|
o examples: add curl_multi_timeout
|
||||||
|
o --retry: access violation with URL part sets continued
|
||||||
|
o ssh: Fix compile error on 64-bit systems.
|
||||||
|
o remote-header-name: chop filename at next semicolon
|
||||||
|
o ftp: response timeout bug in "quote" sending
|
||||||
|
o CUSTOMREQUEST: shouldn't be disabled when HTTP is disabled
|
||||||
|
o Watcom makefiles overhaul.
|
||||||
|
o NTLM tests: boost coverage by forcing the hostname
|
||||||
|
o multi: fix FTPS connecting the data connection with OpenSSL
|
||||||
|
o retry: consider retrying even if -f is used
|
||||||
|
o fix SOCKS problem when using multi interface
|
||||||
|
o typecheck-gcc: add checks for recently added options
|
||||||
|
o SCP: send large files properly with new enough libssh2
|
||||||
|
o multi_socket: set timeout for 100-continue
|
||||||
|
o ";type=" URL suffix over HTTP proxy
|
||||||
|
o acknowledge progress callback error returns during connect
|
||||||
|
o Watcom makefile fixes
|
||||||
|
o runtests: clear old setenv remainders before test
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@@ -46,11 +61,11 @@ This release includes the following known bugs:
|
|||||||
This release would not have looked like this without help, code, reports and
|
This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Rainer Canavan, Paul Howarth, Jerome Vouillon, Ruslan Gazizov, Yang Tse,
|
Dan Fandrich, Kamil Dudka, Krister Johansen, Pavel Raiskup, Jon Sargeant,
|
||||||
Kamil Dudka, Alex Bligh, Ben Greear, Hoi-Ho Chan, Howard Chu, Dirk Manske,
|
Pierre Joye, Tor Arntsen, Constantine Sapuntzakis, Sidney San Martin,
|
||||||
Pavel Raiskup, John-Mark Bell, Eric Mertens, Tor Arntsen, Douglas Kilpatrick,
|
Jeff Pohlmeyer, Jan Van Boghout, Ben Greear, Guenter Knauf, Adam Light,
|
||||||
Igor Novoseltsev, Jason McDonald, Dan Fandrich, Tanguy Fautre, Guenter Knauf,
|
Georg Lippitsch, Mike Power, Robin Cornelius, Mikael Johansson,
|
||||||
Julien Chaffraix, Kalle Vahlman, Frank Meier, Constantine Sapuntzakis
|
Yang Tse, Ben Darnell
|
||||||
|
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
To be addressed in 7.20.1 (planned release: April 2010)
|
To be addressed in 7.XX.X
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
261 -
|
261 -
|
||||||
|
60
configure.ac
60
configure.ac
@@ -40,6 +40,7 @@ AM_MAINTAINER_MODE
|
|||||||
CURL_CHECK_OPTION_DEBUG
|
CURL_CHECK_OPTION_DEBUG
|
||||||
CURL_CHECK_OPTION_OPTIMIZE
|
CURL_CHECK_OPTION_OPTIMIZE
|
||||||
CURL_CHECK_OPTION_WARNINGS
|
CURL_CHECK_OPTION_WARNINGS
|
||||||
|
CURL_CHECK_OPTION_WERROR
|
||||||
CURL_CHECK_OPTION_CURLDEBUG
|
CURL_CHECK_OPTION_CURLDEBUG
|
||||||
CURL_CHECK_OPTION_ARES
|
CURL_CHECK_OPTION_ARES
|
||||||
|
|
||||||
@@ -51,33 +52,48 @@ CURL_CHECK_PATH_SEPARATOR_REQUIRED
|
|||||||
CONFIGURE_OPTIONS="\"$ac_configure_args\""
|
CONFIGURE_OPTIONS="\"$ac_configure_args\""
|
||||||
AC_SUBST(CONFIGURE_OPTIONS)
|
AC_SUBST(CONFIGURE_OPTIONS)
|
||||||
|
|
||||||
|
CURL_CFLAG_EXTRAS=""
|
||||||
|
if test X"$want_werror" == Xyes; then
|
||||||
|
CURL_CFLAG_EXTRAS="-Werror"
|
||||||
|
fi
|
||||||
|
AC_SUBST(CURL_CFLAG_EXTRAS)
|
||||||
|
|
||||||
dnl SED is mandatory for configure process and libtool.
|
dnl SED is mandatory for configure process and libtool.
|
||||||
dnl Set it now, allowing it to be changed later.
|
dnl Set it now, allowing it to be changed later.
|
||||||
AC_PATH_PROG([SED], [sed], [not_found],
|
if test -z "$SED"; then
|
||||||
|
dnl allow it to be overridden
|
||||||
|
AC_PATH_PROG([SED], [sed], [not_found],
|
||||||
[$PATH:/usr/bin:/usr/local/bin])
|
[$PATH:/usr/bin:/usr/local/bin])
|
||||||
if test -z "$SED" || test "$SED" = "not_found"; then
|
if test -z "$SED" || test "$SED" = "not_found"; then
|
||||||
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST([SED])
|
AC_SUBST([SED])
|
||||||
|
|
||||||
dnl GREP is mandatory for configure process and libtool.
|
dnl GREP is mandatory for configure process and libtool.
|
||||||
dnl Set it now, allowing it to be changed later.
|
dnl Set it now, allowing it to be changed later.
|
||||||
AC_PATH_PROG([GREP], [grep], [not_found],
|
if test -z "$GREP"; then
|
||||||
|
dnl allow it to be overridden
|
||||||
|
AC_PATH_PROG([GREP], [grep], [not_found],
|
||||||
[$PATH:/usr/bin:/usr/local/bin])
|
[$PATH:/usr/bin:/usr/local/bin])
|
||||||
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
if test -z "$GREP" || test "$GREP" = "not_found"; then
|
||||||
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST([GREP])
|
AC_SUBST([GREP])
|
||||||
|
|
||||||
dnl EGREP is mandatory for configure process and libtool.
|
dnl EGREP is mandatory for configure process and libtool.
|
||||||
dnl Set it now, allowing it to be changed later.
|
dnl Set it now, allowing it to be changed later.
|
||||||
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
|
if test -z "$EGREP"; then
|
||||||
|
dnl allow it to be overridden
|
||||||
|
if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
|
||||||
AC_MSG_CHECKING([for egrep])
|
AC_MSG_CHECKING([for egrep])
|
||||||
EGREP="$GREP -E"
|
EGREP="$GREP -E"
|
||||||
AC_MSG_RESULT([$EGREP])
|
AC_MSG_RESULT([$EGREP])
|
||||||
else
|
else
|
||||||
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
AC_PATH_PROG([EGREP], [egrep], [not_found],
|
||||||
[$PATH:/usr/bin:/usr/local/bin])
|
[$PATH:/usr/bin:/usr/local/bin])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
if test -z "$EGREP" || test "$EGREP" = "not_found"; then
|
||||||
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
AC_MSG_ERROR([egrep not found in PATH. Cannot continue without egrep.])
|
||||||
@@ -86,10 +102,13 @@ AC_SUBST([EGREP])
|
|||||||
|
|
||||||
dnl AR is mandatory for configure process and libtool.
|
dnl AR is mandatory for configure process and libtool.
|
||||||
dnl This is target dependent, so check it as a tool.
|
dnl This is target dependent, so check it as a tool.
|
||||||
AC_PATH_TOOL([AR], [ar], [not_found],
|
if test -z "$AR"; then
|
||||||
|
dnl allow it to be overridden
|
||||||
|
AC_PATH_TOOL([AR], [ar], [not_found],
|
||||||
[$PATH:/usr/bin:/usr/local/bin])
|
[$PATH:/usr/bin:/usr/local/bin])
|
||||||
if test -z "$AR" || test "$AR" = "not_found"; then
|
if test -z "$AR" || test "$AR" = "not_found"; then
|
||||||
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST([AR])
|
AC_SUBST([AR])
|
||||||
|
|
||||||
@@ -209,6 +228,9 @@ case $host in
|
|||||||
esac
|
esac
|
||||||
AC_MSG_RESULT($mimpure)
|
AC_MSG_RESULT($mimpure)
|
||||||
AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
|
AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes)
|
||||||
|
|
||||||
|
dnl 'STATICLIB' is, in spite of its name, not generic but only for static-only
|
||||||
|
dnl builds on Windows
|
||||||
AM_CONDITIONAL(STATICLIB, false)
|
AM_CONDITIONAL(STATICLIB, false)
|
||||||
|
|
||||||
AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
|
AC_MSG_CHECKING([if we need BUILDING_LIBCURL])
|
||||||
@@ -742,6 +764,8 @@ ac_cv_func_strcasecmp="no"
|
|||||||
|
|
||||||
CURL_CHECK_LIBS_CONNECT
|
CURL_CHECK_LIBS_CONNECT
|
||||||
|
|
||||||
|
CURL_NETWORK_LIBS=$LIBS
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl In case that function clock_gettime with monotonic timer is available,
|
dnl In case that function clock_gettime with monotonic timer is available,
|
||||||
dnl check for additional required libraries.
|
dnl check for additional required libraries.
|
||||||
@@ -1962,7 +1986,9 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
|
|
||||||
dnl libssh2_version is a post 1.0 addition
|
dnl libssh2_version is a post 1.0 addition
|
||||||
dnl libssh2_init and libssh2_exit were added in 1.2.5
|
dnl libssh2_init and libssh2_exit were added in 1.2.5
|
||||||
AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit)
|
dnl libssh2_scp_send64 was added in 1.2.6
|
||||||
|
AC_CHECK_FUNCS( libssh2_version libssh2_init libssh2_exit \
|
||||||
|
libssh2_scp_send64 )
|
||||||
|
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
||||||
export LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH
|
||||||
@@ -2435,6 +2461,13 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
|
|||||||
CURL_CHECK_LIB_ARES
|
CURL_CHECK_LIB_ARES
|
||||||
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
|
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
|
||||||
|
|
||||||
|
if test "x$enable_shared" = "xyes"; then
|
||||||
|
build_libhostname=yes
|
||||||
|
else
|
||||||
|
build_libhostname=no
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
|
||||||
|
|
||||||
CURL_CHECK_OPTION_THREADED_RESOLVER
|
CURL_CHECK_OPTION_THREADED_RESOLVER
|
||||||
|
|
||||||
if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
|
if test "x$want_thres" = xyes && test "x$want_ares" = xyes; then
|
||||||
@@ -2627,10 +2660,15 @@ LIBCURL_LIBS=$LIBS
|
|||||||
AC_SUBST(LIBCURL_LIBS)
|
AC_SUBST(LIBCURL_LIBS)
|
||||||
AC_SUBST(CURL_LIBS)
|
AC_SUBST(CURL_LIBS)
|
||||||
AC_SUBST(TEST_SERVER_LIBS)
|
AC_SUBST(TEST_SERVER_LIBS)
|
||||||
|
AC_SUBST(CURL_NETWORK_LIBS)
|
||||||
LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
|
LIBS=$ALL_LIBS dnl LIBS is a magic variable that's used for every link
|
||||||
|
|
||||||
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
|
||||||
|
|
||||||
|
dnl yes or no
|
||||||
|
ENABLE_SHARED="$enable_shared"
|
||||||
|
AC_SUBST(ENABLE_SHARED)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl For keeping supported features and protocols also in pkg-config file
|
dnl For keeping supported features and protocols also in pkg-config file
|
||||||
dnl since it is more cross-compile frient than curl-config
|
dnl since it is more cross-compile frient than curl-config
|
||||||
@@ -2659,7 +2697,8 @@ fi
|
|||||||
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
if test "x$USE_WINDOWS_SSPI" = "x1"; then
|
||||||
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
|
||||||
fi
|
fi
|
||||||
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then
|
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \
|
||||||
|
-o "x$GNUTLS_ENABLED" = "x1" -o "x$NSS_ENABLED" = "x1"; then
|
||||||
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -2746,6 +2785,7 @@ squeeze LIBS
|
|||||||
squeeze CURL_LIBS
|
squeeze CURL_LIBS
|
||||||
squeeze LIBCURL_LIBS
|
squeeze LIBCURL_LIBS
|
||||||
squeeze TEST_SERVER_LIBS
|
squeeze TEST_SERVER_LIBS
|
||||||
|
squeeze CURL_NETWORK_LIBS
|
||||||
|
|
||||||
squeeze SUPPORT_FEATURES
|
squeeze SUPPORT_FEATURES
|
||||||
squeeze SUPPORT_PROTOCOLS
|
squeeze SUPPORT_PROTOCOLS
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2001 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 2001 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@@ -32,6 +32,7 @@ Usage: curl-config [OPTION]
|
|||||||
|
|
||||||
Available values for OPTION include:
|
Available values for OPTION include:
|
||||||
|
|
||||||
|
--built-shared says 'yes' if libcurl was built shared
|
||||||
--ca ca bundle install path
|
--ca ca bundle install path
|
||||||
--cc compiler
|
--cc compiler
|
||||||
--cflags pre-processor and compiler flags
|
--cflags pre-processor and compiler flags
|
||||||
@@ -64,6 +65,10 @@ while test $# -gt 0; do
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--built-shared)
|
||||||
|
echo @ENABLE_SHARED@
|
||||||
|
;;
|
||||||
|
|
||||||
--ca)
|
--ca)
|
||||||
echo "@CURL_CA_BUNDLE@"
|
echo "@CURL_CA_BUNDLE@"
|
||||||
;;
|
;;
|
||||||
@@ -87,6 +92,7 @@ while test $# -gt 0; do
|
|||||||
echo "$protocol"
|
echo "$protocol"
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--version)
|
--version)
|
||||||
echo libcurl @VERSION@
|
echo libcurl @VERSION@
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -268,7 +268,7 @@
|
|||||||
|
|
||||||
[separate the above single line from the rest with an empty line]
|
[separate the above single line from the rest with an empty line]
|
||||||
|
|
||||||
[full description, no wider than 65 columns that describe as much as
|
[full description, no wider than 72 columns that describe as much as
|
||||||
possible as to why this change is made, and possibly what things
|
possible as to why this change is made, and possibly what things
|
||||||
it fixes and everything else that is related]
|
it fixes and everything else that is related]
|
||||||
---- stop ----
|
---- stop ----
|
||||||
|
55
docs/FAQ
55
docs/FAQ
@@ -1,4 +1,4 @@
|
|||||||
Updated: Nov 7, 2009 (http://curl.haxx.se/docs/faq.html)
|
Updated: June 30, 2010 (http://curl.haxx.se/docs/faq.html)
|
||||||
_ _ ____ _
|
_ _ ____ _
|
||||||
___| | | | _ \| |
|
___| | | | _ \| |
|
||||||
/ __| | | | |_) | |
|
/ __| | | | |_) | |
|
||||||
@@ -74,6 +74,7 @@ FAQ
|
|||||||
4.16 My HTTP POST or PUT requests are slow!
|
4.16 My HTTP POST or PUT requests are slow!
|
||||||
4.17 Non-functional connect timeouts on Windows
|
4.17 Non-functional connect timeouts on Windows
|
||||||
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
4.18 file:// URLs containing drive letters (Windows, NetWare)
|
||||||
|
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||||
|
|
||||||
5. libcurl Issues
|
5. libcurl Issues
|
||||||
5.1 Is libcurl thread-safe?
|
5.1 Is libcurl thread-safe?
|
||||||
@@ -83,7 +84,7 @@ FAQ
|
|||||||
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
|
5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ?
|
||||||
5.6 What about Keep-Alive or persistent connections?
|
5.6 What about Keep-Alive or persistent connections?
|
||||||
5.7 Link errors when building libcurl on Windows!
|
5.7 Link errors when building libcurl on Windows!
|
||||||
5.8 libcurl.so.3: open failed: No such file or directory
|
5.8 libcurl.so.X: open failed: No such file or directory
|
||||||
5.9 How does libcurl resolve host names?
|
5.9 How does libcurl resolve host names?
|
||||||
5.10 How do I prevent libcurl from writing the response to stdout?
|
5.10 How do I prevent libcurl from writing the response to stdout?
|
||||||
5.11 How do I make libcurl not receive the whole HTTP response?
|
5.11 How do I make libcurl not receive the whole HTTP response?
|
||||||
@@ -399,10 +400,10 @@ FAQ
|
|||||||
|
|
||||||
2.2 Does curl work/build with other SSL libraries?
|
2.2 Does curl work/build with other SSL libraries?
|
||||||
|
|
||||||
Curl has been written to use OpenSSL, GnuTLS, yassl or NSS, although there
|
Curl has been written to use OpenSSL, GnuTLS, yassl, NSS or PolarSSL,
|
||||||
should not be many problems using a different library. If anyone does "port"
|
although there should not be many problems using a different library. If
|
||||||
curl to use a different SSL library, we are of course very interested in
|
anyone does "port" curl to use a different SSL library, we are of course
|
||||||
getting the patch!
|
very interested in getting the patch!
|
||||||
|
|
||||||
2.3 Where can I find a copy of LIBEAY32.DLL?
|
2.3 Where can I find a copy of LIBEAY32.DLL?
|
||||||
|
|
||||||
@@ -944,6 +945,31 @@ FAQ
|
|||||||
|
|
||||||
In either case, cURL should now be looking for the correct file.
|
In either case, cURL should now be looking for the correct file.
|
||||||
|
|
||||||
|
4.19 Why doesn't cURL return an error when the network cable is unplugged?
|
||||||
|
|
||||||
|
Unplugging the cable is not an error situation. The TCP/IP protocol stack
|
||||||
|
was designed to be fault tolerant, so even though there may be a physical
|
||||||
|
break somewhere the connection shouldn't be affected, just possibly
|
||||||
|
delayed. Eventually, the physical break will be fixed or the data will be
|
||||||
|
re-routed around the physical problem.
|
||||||
|
|
||||||
|
In such cases, the TCP/IP stack is responsible for detecting when the
|
||||||
|
network connection is irrevocably lost. Since with some protocols it is
|
||||||
|
perfectly legal for the client wait indefinitely for data, the stack may
|
||||||
|
never report a problem, and even when it does, it can take up to 20 minutes
|
||||||
|
for it to detect an issue. The curl option --keepalive-time enables
|
||||||
|
keep-alive support in the TCP/IP stack which makes it periodically probe the
|
||||||
|
connection to make sure it is still available to send data. That should
|
||||||
|
reliably detect any TCP/IP network failure.
|
||||||
|
|
||||||
|
But even that won't detect the network going down before the TCP/IP
|
||||||
|
connection is established (e.g. during a DNS lookup) or using protocols that
|
||||||
|
don't use TCP. To handle those situations, curl offers a number of timeouts
|
||||||
|
on its own. --speed-limit/--speed-time will abort if the data transfer rate
|
||||||
|
falls too low, and --connect-timeout and --max-time can be used to put an
|
||||||
|
overall timeout on the connection phase or the entire transfer.
|
||||||
|
|
||||||
|
|
||||||
5. libcurl Issues
|
5. libcurl Issues
|
||||||
|
|
||||||
5.1 Is libcurl thread-safe?
|
5.1 Is libcurl thread-safe?
|
||||||
@@ -1058,13 +1084,14 @@ FAQ
|
|||||||
Borland: libcurl.lib libcurl_imp.lib
|
Borland: libcurl.lib libcurl_imp.lib
|
||||||
|
|
||||||
|
|
||||||
5.8 libcurl.so.3: open failed: No such file or directory
|
5.8 libcurl.so.X: open failed: No such file or directory
|
||||||
|
|
||||||
This is an error message you might get when you try to run a program linked
|
This is an error message you might get when you try to run a program linked
|
||||||
with a shared version of libcurl and your run-time linker (ld.so) couldn't
|
with a shared version of libcurl and your run-time linker (ld.so) couldn't
|
||||||
find the shared library named libcurl.so.3.
|
find the shared library named libcurl.so.X. (Where X is the number of the
|
||||||
|
current libcurl ABI, typically 3 or 4).
|
||||||
|
|
||||||
You need to make sure that ld.so finds libcurl.so.3. You can do that
|
You need to make sure that ld.so finds libcurl.so.X. You can do that
|
||||||
multiple ways, and it differs somewhat between different operating systems,
|
multiple ways, and it differs somewhat between different operating systems,
|
||||||
but they are usually:
|
but they are usually:
|
||||||
|
|
||||||
@@ -1100,10 +1127,10 @@ FAQ
|
|||||||
Using this offers asynchronous name resolves but it currently has no IPv6
|
Using this offers asynchronous name resolves but it currently has no IPv6
|
||||||
support.
|
support.
|
||||||
|
|
||||||
- The Windows threaded resolver. It use:
|
- The threaded resolver (default option on Windows). It uses:
|
||||||
|
|
||||||
A - gethostbyname() on plain ipv4 windows hosts
|
A - gethostbyname() on plain ipv4 hosts
|
||||||
B - getaddrinfo() on ipv6-enabled windows hosts
|
B - getaddrinfo() on ipv6-enabled hosts
|
||||||
|
|
||||||
Also note that libcurl never resolves or reverse-lookups addresses given as
|
Also note that libcurl never resolves or reverse-lookups addresses given as
|
||||||
pure numbers, such as 127.0.0.1 or ::1.
|
pure numbers, such as 127.0.0.1 or ::1.
|
||||||
@@ -1182,7 +1209,9 @@ FAQ
|
|||||||
to do "LIST -a" or similar to see them.
|
to do "LIST -a" or similar to see them.
|
||||||
|
|
||||||
The application thus needs to parse the LIST output. One such existing
|
The application thus needs to parse the LIST output. One such existing
|
||||||
list parser is available at http://cr.yp.to/ftpparse.html
|
list parser is available at http://cr.yp.to/ftpparse.html Versions of
|
||||||
|
libcurl since 7.21.0 also provide the ability to specify a wildcard to
|
||||||
|
download multiple files from one FTP directory.
|
||||||
|
|
||||||
|
|
||||||
6. License Issues
|
6. License Issues
|
||||||
|
@@ -43,7 +43,7 @@ HTTP
|
|||||||
- POST
|
- POST
|
||||||
- Pipelining
|
- Pipelining
|
||||||
- multipart formpost (RFC1867-style)
|
- multipart formpost (RFC1867-style)
|
||||||
- authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and
|
- authentication: Basic, Digest, NTLM(*9), GSS-Negotiate/Negotiate(*3) and
|
||||||
SPNEGO (*4) to server and proxy
|
SPNEGO (*4) to server and proxy
|
||||||
- resume (both GET and PUT)
|
- resume (both GET and PUT)
|
||||||
- follow redirects
|
- follow redirects
|
||||||
@@ -125,7 +125,7 @@ FILE
|
|||||||
FOOTNOTES
|
FOOTNOTES
|
||||||
=========
|
=========
|
||||||
|
|
||||||
*1 = requires OpenSSL, GnuTLS, NSS or yassl
|
*1 = requires OpenSSL, GnuTLS, NSS, yassl or PolarSSL
|
||||||
*2 = requires OpenLDAP
|
*2 = requires OpenLDAP
|
||||||
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
*3 = requires a GSSAPI-compliant library, such as Heimdal or similar.
|
||||||
*4 = requires FBopenssl
|
*4 = requires FBopenssl
|
||||||
@@ -133,3 +133,4 @@ FOOTNOTES
|
|||||||
*6 = requires c-ares
|
*6 = requires c-ares
|
||||||
*7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
|
*7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1
|
||||||
*8 = requires libssh2
|
*8 = requires libssh2
|
||||||
|
*9 = requires OpenSSL, GnuTLS, NSS or yassl
|
||||||
|
51
docs/HISTORY
51
docs/HISTORY
@@ -157,6 +157,14 @@ September 2005:
|
|||||||
|
|
||||||
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
More than 100,000 unique visitors of the curl web site. 25 mirrors.
|
||||||
|
|
||||||
|
December 2005:
|
||||||
|
|
||||||
|
security vulnerability: libcurl URL Buffer Overflow
|
||||||
|
|
||||||
|
March 2006:
|
||||||
|
|
||||||
|
security vulnerability: libcurl TFTP Packet Buffer Overflow
|
||||||
|
|
||||||
April 2006:
|
April 2006:
|
||||||
|
|
||||||
Added the multi_socket() API
|
Added the multi_socket() API
|
||||||
@@ -174,6 +182,10 @@ February 2007:
|
|||||||
|
|
||||||
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
Added support for the Mozilla NSS library to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
July 2007:
|
||||||
|
|
||||||
|
security vulnerability: libcurl GnuTLS insufficient cert verification
|
||||||
|
|
||||||
November 2008:
|
November 2008:
|
||||||
|
|
||||||
Command line options: 128
|
Command line options: 128
|
||||||
@@ -184,3 +196,42 @@ November 2008:
|
|||||||
|
|
||||||
145,000 unique visitors. >100 GB downloaded.
|
145,000 unique visitors. >100 GB downloaded.
|
||||||
|
|
||||||
|
March 2009:
|
||||||
|
|
||||||
|
security vulnerability: libcurl Arbitrary File Access
|
||||||
|
|
||||||
|
August 2009:
|
||||||
|
|
||||||
|
security vulnerability: libcurl embedded zero in cert name
|
||||||
|
|
||||||
|
December 2009:
|
||||||
|
|
||||||
|
Added support for IMAP, POP3 and SMTP
|
||||||
|
|
||||||
|
January 2010:
|
||||||
|
|
||||||
|
Added support for RTSP
|
||||||
|
|
||||||
|
February 2010:
|
||||||
|
|
||||||
|
security vulnerability: libcurl data callback excessive length
|
||||||
|
|
||||||
|
March 2010:
|
||||||
|
|
||||||
|
The project switched over to use git instead of CVS for source code control
|
||||||
|
|
||||||
|
May 2010:
|
||||||
|
|
||||||
|
Added support for RTMP
|
||||||
|
|
||||||
|
Added support for PolarSSL to do the SSL/TLS stuff
|
||||||
|
|
||||||
|
August 2010:
|
||||||
|
|
||||||
|
Public curl releases: 117
|
||||||
|
Command line options: 138
|
||||||
|
curl_easy_setopt() options: 180
|
||||||
|
Public functions in libcurl: 58
|
||||||
|
Known libcurl bindings: 39
|
||||||
|
Contributors: 808
|
||||||
|
|
||||||
|
10
docs/INSTALL
10
docs/INSTALL
@@ -139,6 +139,9 @@ UNIX
|
|||||||
To build with NSS support instead of OpenSSL for SSL/TLS, note that
|
To build with NSS support instead of OpenSSL for SSL/TLS, note that
|
||||||
you need to use both --without-ssl and --with-nss.
|
you need to use both --without-ssl and --with-nss.
|
||||||
|
|
||||||
|
To build with PolarSSL support instead of OpenSSL for SSL/TLS, note that
|
||||||
|
you need to use both --without-ssl and --with-polarssl.
|
||||||
|
|
||||||
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
To get GSSAPI support, build with --with-gssapi and have the MIT or
|
||||||
Heimdal Kerberos 5 packages installed.
|
Heimdal Kerberos 5 packages installed.
|
||||||
|
|
||||||
@@ -779,6 +782,11 @@ VxWorks
|
|||||||
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
To clean the build results type 'make -f ./Makefile.vxworks clean'.
|
||||||
|
|
||||||
|
|
||||||
|
Android
|
||||||
|
=======
|
||||||
|
See the build notes in the Android.mk file.
|
||||||
|
|
||||||
|
|
||||||
CROSS COMPILE
|
CROSS COMPILE
|
||||||
=============
|
=============
|
||||||
(This section was graciously brought to us by Jim Duey, with additions by
|
(This section was graciously brought to us by Jim Duey, with additions by
|
||||||
@@ -908,7 +916,7 @@ PORTS
|
|||||||
- Alpha OpenVMS V7.1-1H2
|
- Alpha OpenVMS V7.1-1H2
|
||||||
- Alpha Tru64 v5.0 5.1
|
- Alpha Tru64 v5.0 5.1
|
||||||
- AVR32 Linux
|
- AVR32 Linux
|
||||||
- ARM Android 1.5
|
- ARM Android 1.5, 2.1
|
||||||
- ARM INTEGRITY
|
- ARM INTEGRITY
|
||||||
- ARM iPhone OS
|
- ARM iPhone OS
|
||||||
- Cell Linux
|
- Cell Linux
|
||||||
|
@@ -3,6 +3,11 @@ join in and help us correct one or more of these! Also be sure to check the
|
|||||||
changelog of the current development status, as one or more of these problems
|
changelog of the current development status, as one or more of these problems
|
||||||
may have been fixed since this was written!
|
may have been fixed since this was written!
|
||||||
|
|
||||||
|
76. The SOCKET type in Win64 is 64 bits large (and thus so is curl_socket_t on
|
||||||
|
that platform), and long is only 32 bits. It makes it impossible for
|
||||||
|
curl_easy_getinfo() to return a socket properly with the CURLINFO_LASTSOCKET
|
||||||
|
option as for all other operating systems.
|
||||||
|
|
||||||
75. NTLM authentication involving unicode user name or password.
|
75. NTLM authentication involving unicode user name or password.
|
||||||
http://curl.haxx.se/mail/lib-2009-10/0024.html
|
http://curl.haxx.se/mail/lib-2009-10/0024.html
|
||||||
http://curl.haxx.se/bug/view.cgi?id=2944325
|
http://curl.haxx.se/bug/view.cgi?id=2944325
|
||||||
@@ -63,10 +68,6 @@ may have been fixed since this was written!
|
|||||||
is waiting for the the 100-continue response.
|
is waiting for the the 100-continue response.
|
||||||
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
http://curl.haxx.se/mail/lib-2008-08/0462.html
|
||||||
|
|
||||||
59. If the CURLOPT_PORT option is used on an FTP URL like
|
|
||||||
"ftp://example.com/file;type=A" using a proxy, the ";type=A" is stripped off.
|
|
||||||
See the comment in parse_remote_port()
|
|
||||||
|
|
||||||
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
58. It seems sensible to be able to use CURLOPT_NOBODY and
|
||||||
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
|
||||||
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
|
||||||
@@ -91,7 +92,7 @@ may have been fixed since this was written!
|
|||||||
|
|
||||||
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
52. Gautam Kachroo's issue that identifies a problem with the multi interface
|
||||||
where a connection can be re-used without actually being properly
|
where a connection can be re-used without actually being properly
|
||||||
SSL-negoatiated:
|
SSL-negotiated:
|
||||||
http://curl.haxx.se/mail/lib-2008-01/0277.html
|
http://curl.haxx.se/mail/lib-2008-01/0277.html
|
||||||
|
|
||||||
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
49. If using --retry and the transfer timeouts (possibly due to using -m or
|
||||||
@@ -141,12 +142,13 @@ may have been fixed since this was written!
|
|||||||
30. You need to use -g to the command line tool in order to use RFC2732-style
|
30. You need to use -g to the command line tool in order to use RFC2732-style
|
||||||
IPv6 numerical addresses in URLs.
|
IPv6 numerical addresses in URLs.
|
||||||
|
|
||||||
29. IPv6 URLs with zone ID is not supported.
|
29. IPv6 URLs with zone ID is not nicely supported.
|
||||||
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
|
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt (expired)
|
||||||
specifies the use of a plus sign instead of a percent when specifying zone
|
specifies the use of a plus sign instead of a percent when specifying zone
|
||||||
IDs in URLs to get around the problem of percent signs being
|
IDs in URLs to get around the problem of percent signs being
|
||||||
special. According to the reporter, Firefox deals with the URL _with_ a
|
special. According to the reporter, Firefox deals with the URL _with_ a
|
||||||
percent letter (which seems like a blatant URL spec violation).
|
percent letter (which seems like a blatant URL spec violation).
|
||||||
|
libcurl supports zone IDs where the percent sign is URL-escaped (i.e. %25).
|
||||||
|
|
||||||
See http://curl.haxx.se/bug/view.cgi?id=1371118
|
See http://curl.haxx.se/bug/view.cgi?id=1371118
|
||||||
|
|
||||||
@@ -189,7 +191,7 @@ may have been fixed since this was written!
|
|||||||
would not meaningfully support NUL characters within RFC 959 <string>,
|
would not meaningfully support NUL characters within RFC 959 <string>,
|
||||||
anyway (e.g., UNIX pathnames may not contain NUL).
|
anyway (e.g., UNIX pathnames may not contain NUL).
|
||||||
|
|
||||||
14. Test case 165 might fail on system which has libidn present, but with an
|
14. Test case 165 might fail on a system which has libidn present, but with an
|
||||||
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
old iconv version (2.1.3 is a known bad version), since it doesn't recognize
|
||||||
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
|
the charset when named ISO8859-1. Changing the name to ISO-8859-1 makes the
|
||||||
test pass, but instead makes it fail on Solaris hosts that use its native
|
test pass, but instead makes it fail on Solaris hosts that use its native
|
||||||
|
14
docs/THANKS
14
docs/THANKS
@@ -15,6 +15,7 @@ Albert Choy
|
|||||||
Ale Vesely
|
Ale Vesely
|
||||||
Aleksandar Milivojevic
|
Aleksandar Milivojevic
|
||||||
Alessandro Vesely
|
Alessandro Vesely
|
||||||
|
Alex Bligh
|
||||||
Alex Fishman
|
Alex Fishman
|
||||||
Alex Neblett
|
Alex Neblett
|
||||||
Alex Suykov
|
Alex Suykov
|
||||||
@@ -204,6 +205,7 @@ Dominick Meglio
|
|||||||
Doug Kaufman
|
Doug Kaufman
|
||||||
Doug Porter
|
Doug Porter
|
||||||
Douglas E. Wegscheid
|
Douglas E. Wegscheid
|
||||||
|
Douglas Kilpatrick
|
||||||
Douglas R. Horner
|
Douglas R. Horner
|
||||||
Douglas Steinwand
|
Douglas Steinwand
|
||||||
Dov Murik
|
Dov Murik
|
||||||
@@ -227,6 +229,7 @@ Eric Cooper
|
|||||||
Eric Landes
|
Eric Landes
|
||||||
Eric Lavigne
|
Eric Lavigne
|
||||||
Eric Melville
|
Eric Melville
|
||||||
|
Eric Mertens
|
||||||
Eric Rautman
|
Eric Rautman
|
||||||
Eric Thelin
|
Eric Thelin
|
||||||
Eric Vergnaud
|
Eric Vergnaud
|
||||||
@@ -248,6 +251,7 @@ Forrest Cahoon
|
|||||||
Frank Hempel
|
Frank Hempel
|
||||||
Frank Keeney
|
Frank Keeney
|
||||||
Frank McGeough
|
Frank McGeough
|
||||||
|
Frank Meier
|
||||||
Frank Ticheler
|
Frank Ticheler
|
||||||
Fred Machado
|
Fred Machado
|
||||||
Fred New
|
Fred New
|
||||||
@@ -300,6 +304,8 @@ Hauke Duden
|
|||||||
Heikki Korpela
|
Heikki Korpela
|
||||||
Henrik Storner
|
Henrik Storner
|
||||||
Hidemoto Nakada
|
Hidemoto Nakada
|
||||||
|
Hoi-Ho Chan
|
||||||
|
Howard Chu
|
||||||
Hzhijun
|
Hzhijun
|
||||||
Ian Ford
|
Ian Ford
|
||||||
Ian Gulliver
|
Ian Gulliver
|
||||||
@@ -335,6 +341,7 @@ Jamie Wilkinson
|
|||||||
Jan Kunder
|
Jan Kunder
|
||||||
Jared Lundell
|
Jared Lundell
|
||||||
Jari Sundell
|
Jari Sundell
|
||||||
|
Jason McDonald
|
||||||
Jason S. Priebe
|
Jason S. Priebe
|
||||||
Jay Austin
|
Jay Austin
|
||||||
Jayesh A Shah
|
Jayesh A Shah
|
||||||
@@ -353,6 +360,7 @@ Jeff Weber
|
|||||||
Jeffrey Pohlmeyer
|
Jeffrey Pohlmeyer
|
||||||
Jeremy Friesner
|
Jeremy Friesner
|
||||||
Jerome Muffat-Meridol
|
Jerome Muffat-Meridol
|
||||||
|
Jerome Vouillon
|
||||||
Jes Badwal
|
Jes Badwal
|
||||||
Jesper Jensen
|
Jesper Jensen
|
||||||
Jesse Noller
|
Jesse Noller
|
||||||
@@ -377,6 +385,7 @@ John Lightsey
|
|||||||
John McGowan
|
John McGowan
|
||||||
John P. McCaskey
|
John P. McCaskey
|
||||||
John Wilkinson
|
John Wilkinson
|
||||||
|
John-Mark Bell
|
||||||
Johnny Luong
|
Johnny Luong
|
||||||
Jon Grubbs
|
Jon Grubbs
|
||||||
Jon Nelson
|
Jon Nelson
|
||||||
@@ -404,6 +413,7 @@ J
|
|||||||
J<EFBFBD>rn Hartroth
|
J<EFBFBD>rn Hartroth
|
||||||
Kai Sommerfeld
|
Kai Sommerfeld
|
||||||
Kai-Uwe Rommel
|
Kai-Uwe Rommel
|
||||||
|
Kalle Vahlman
|
||||||
Kamil Dudka
|
Kamil Dudka
|
||||||
Kang-Jin Lee
|
Kang-Jin Lee
|
||||||
Karl Moerder
|
Karl Moerder
|
||||||
@@ -574,12 +584,14 @@ Patrick Scott
|
|||||||
Patrick Smith
|
Patrick Smith
|
||||||
Patrik Thunstrom
|
Patrik Thunstrom
|
||||||
Paul Harrington
|
Paul Harrington
|
||||||
|
Paul Howarth
|
||||||
Paul Marquis
|
Paul Marquis
|
||||||
Paul Moore
|
Paul Moore
|
||||||
Paul Nolan
|
Paul Nolan
|
||||||
Paul Querna
|
Paul Querna
|
||||||
Pavel Cenek
|
Pavel Cenek
|
||||||
Pavel Orehov
|
Pavel Orehov
|
||||||
|
Pavel Raiskup
|
||||||
Pawel A. Gajda
|
Pawel A. Gajda
|
||||||
Pawel Kierski
|
Pawel Kierski
|
||||||
Pedro Neves
|
Pedro Neves
|
||||||
@@ -615,6 +627,7 @@ Puneet Pawaia
|
|||||||
Quagmire
|
Quagmire
|
||||||
Rafa Muyo
|
Rafa Muyo
|
||||||
Rafael Sagula
|
Rafael Sagula
|
||||||
|
Rainer Canavan
|
||||||
Rainer Koenig
|
Rainer Koenig
|
||||||
Ralf S. Engelschall
|
Ralf S. Engelschall
|
||||||
Ralph Beckmann
|
Ralph Beckmann
|
||||||
@@ -665,6 +678,7 @@ Ron Zapp
|
|||||||
Rosimildo da Silva
|
Rosimildo da Silva
|
||||||
Roy Shan
|
Roy Shan
|
||||||
Rune Kleveland
|
Rune Kleveland
|
||||||
|
Ruslan Gazizov
|
||||||
Ryan Chan
|
Ryan Chan
|
||||||
Ryan Nelson
|
Ryan Nelson
|
||||||
S. Moonesamy
|
S. Moonesamy
|
||||||
|
32
docs/examples/.gitignore
vendored
Normal file
32
docs/examples/.gitignore
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
10-at-a-time
|
||||||
|
anyauthput
|
||||||
|
certinfo
|
||||||
|
chkspeed
|
||||||
|
cookie_interface
|
||||||
|
debug
|
||||||
|
fileupload
|
||||||
|
fopen
|
||||||
|
ftp-wildcard
|
||||||
|
ftpget
|
||||||
|
ftpgetinfo
|
||||||
|
ftpgetresp
|
||||||
|
ftpupload
|
||||||
|
getinfo
|
||||||
|
getinmemory
|
||||||
|
http-post
|
||||||
|
httpcustomheader
|
||||||
|
httpput
|
||||||
|
https
|
||||||
|
multi-app
|
||||||
|
multi-debugcallback
|
||||||
|
multi-double
|
||||||
|
multi-post
|
||||||
|
multi-single
|
||||||
|
persistant
|
||||||
|
post-callback
|
||||||
|
postit2
|
||||||
|
sendrecv
|
||||||
|
sepheaders
|
||||||
|
simple
|
||||||
|
simplepost
|
||||||
|
simplessl
|
@@ -1,16 +1,12 @@
|
|||||||
# These are all libcurl example programs to be test compiled
|
# These are all libcurl example programs to be test compiled
|
||||||
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface \
|
check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \
|
||||||
debug fileupload fopen ftpget ftpgetresp ftpupload \
|
fopen ftpget ftpgetresp ftpupload getinfo getinmemory http-post httpput \
|
||||||
getinfo getinmemory http-post httpput \
|
https multi-app multi-debugcallback multi-double multi-post multi-single \
|
||||||
https multi-app multi-debugcallback multi-double \
|
persistant post-callback postit2 sepheaders simple simplepost simplessl \
|
||||||
multi-post multi-single persistant post-callback \
|
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo ftp-wildcard
|
||||||
postit2 sepheaders simple simplepost simplessl \
|
|
||||||
sendrecv httpcustomheader certinfo chkspeed ftpgetinfo
|
|
||||||
|
|
||||||
# These examples require external dependencies that may not be commonly
|
# These examples require external dependencies that may not be commonly
|
||||||
# available on POSIX systems, so don't bother attempting to compile them here.
|
# available on POSIX systems, so don't bother attempting to compile them here.
|
||||||
COMPLICATED_EXAMPLES = \
|
COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \
|
||||||
curlgtk.c curlx.c htmltitle.cc cacertinmem.c ftpuploadresume.c \
|
ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
||||||
ghiper.c hiperfifo.c htmltidy.c multithread.c \
|
|
||||||
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
|
opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c
|
||||||
|
|
||||||
|
@@ -40,6 +40,8 @@ static size_t WriteCallback(void *ptr, size_t size, size_t nmemb, void *data)
|
|||||||
{
|
{
|
||||||
/* we are not interested in the downloaded bytes itself,
|
/* we are not interested in the downloaded bytes itself,
|
||||||
so we only return the size we would have saved ... */
|
so we only return the size we would have saved ... */
|
||||||
|
(void)ptr; /* unused */
|
||||||
|
(void)data; /* unused */
|
||||||
return (size_t)(size * nmemb);
|
return (size_t)(size * nmemb);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +50,7 @@ int main(int argc, char *argv[])
|
|||||||
CURL *curl_handle;
|
CURL *curl_handle;
|
||||||
CURLcode res;
|
CURLcode res;
|
||||||
int prtsep = 0, prttime = 0;
|
int prtsep = 0, prttime = 0;
|
||||||
char *url = URL_1M;
|
const char *url = URL_1M;
|
||||||
char *appname = argv[0];
|
char *appname = argv[0];
|
||||||
|
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
@@ -135,17 +137,17 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* check for bytes downloaded */
|
/* check for bytes downloaded */
|
||||||
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &val);
|
res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD, &val);
|
||||||
if((CURLE_OK == res) && val)
|
if((CURLE_OK == res) && (val>0))
|
||||||
printf("Data downloaded: %0.0f bytes.\n", val);
|
printf("Data downloaded: %0.0f bytes.\n", val);
|
||||||
|
|
||||||
/* check for total download time */
|
/* check for total download time */
|
||||||
res = curl_easy_getinfo(curl_handle, CURLINFO_TOTAL_TIME, &val);
|
res = curl_easy_getinfo(curl_handle, CURLINFO_TOTAL_TIME, &val);
|
||||||
if((CURLE_OK == res) && val)
|
if((CURLE_OK == res) && (val>0))
|
||||||
printf("Total download time: %0.3f sec.\n", val);
|
printf("Total download time: %0.3f sec.\n", val);
|
||||||
|
|
||||||
/* check for average download speed */
|
/* check for average download speed */
|
||||||
res = curl_easy_getinfo(curl_handle, CURLINFO_SPEED_DOWNLOAD, &val);
|
res = curl_easy_getinfo(curl_handle, CURLINFO_SPEED_DOWNLOAD, &val);
|
||||||
if((CURLE_OK == res) && val)
|
if((CURLE_OK == res) && (val>0))
|
||||||
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
|
printf("Average download speed: %0.3f kbyte/sec.\n", val / 1024);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@@ -144,6 +144,8 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
int maxfd = -1;
|
int maxfd = -1;
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
FD_ZERO(&fdexcep);
|
FD_ZERO(&fdexcep);
|
||||||
@@ -152,6 +154,15 @@ fill_buffer(URL_FILE *file,int want,int waittime)
|
|||||||
timeout.tv_sec = 60; /* 1 minute */
|
timeout.tv_sec = 60; /* 1 minute */
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
136
docs/examples/ftp-wildcard.c
Normal file
136
docs/examples/ftp-wildcard.c
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <curl/curl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
struct callback_data {
|
||||||
|
FILE *output;
|
||||||
|
};
|
||||||
|
|
||||||
|
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||||
|
struct callback_data *data,
|
||||||
|
int remains);
|
||||||
|
|
||||||
|
static long file_is_downloaded(struct callback_data *data);
|
||||||
|
|
||||||
|
static size_t write_it(char *buff, size_t size, size_t nmemb,
|
||||||
|
struct callback_data *data);
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int rc = CURLE_OK;
|
||||||
|
|
||||||
|
/* curl easy handle */
|
||||||
|
CURL *handle;
|
||||||
|
|
||||||
|
/* help data */
|
||||||
|
struct callback_data data = { 0 };
|
||||||
|
|
||||||
|
/* global initialization */
|
||||||
|
rc = curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
if(rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
|
/* initialization of easy handle */
|
||||||
|
handle = curl_easy_init();
|
||||||
|
if(!handle) {
|
||||||
|
curl_global_cleanup();
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* turn on wildcard matching */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
|
||||||
|
|
||||||
|
/* callback is called before download of concrete file started */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming);
|
||||||
|
|
||||||
|
/* callback is called after data from the file have been transferred */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
|
||||||
|
|
||||||
|
/* this callback will write contents into files */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_it);
|
||||||
|
|
||||||
|
/* put transfer data into callbacks */
|
||||||
|
curl_easy_setopt(handle, CURLOPT_CHUNK_DATA, &data);
|
||||||
|
curl_easy_setopt(handle, CURLOPT_WRITEDATA, &data);
|
||||||
|
|
||||||
|
/* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L); */
|
||||||
|
|
||||||
|
/* set an URL containing wildcard pattern (only in the last part) */
|
||||||
|
if(argc == 2)
|
||||||
|
curl_easy_setopt(handle, CURLOPT_URL, argv[1]);
|
||||||
|
else
|
||||||
|
curl_easy_setopt(handle, CURLOPT_URL,
|
||||||
|
"ftp://curltest.howto.cz:123456@curltest.howto.cz/test/*");
|
||||||
|
|
||||||
|
/* and start transfer! */
|
||||||
|
rc = curl_easy_perform(handle);
|
||||||
|
|
||||||
|
curl_easy_cleanup(handle);
|
||||||
|
curl_global_cleanup();
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
static long file_is_comming(struct curl_fileinfo *finfo,
|
||||||
|
struct callback_data *data,
|
||||||
|
int remains)
|
||||||
|
{
|
||||||
|
printf("%3d %40s %10luB ", remains, finfo->filename,
|
||||||
|
(unsigned long)finfo->size);
|
||||||
|
|
||||||
|
switch(finfo->filetype) {
|
||||||
|
case CURLFILETYPE_DIRECTORY:
|
||||||
|
printf(" DIR\n");
|
||||||
|
break;
|
||||||
|
case CURLFILETYPE_FILE:
|
||||||
|
printf("FILE ");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("OTHER\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(finfo->filetype == CURLFILETYPE_FILE) {
|
||||||
|
/* do not transfer files >= 50B */
|
||||||
|
if(finfo->size > 50) {
|
||||||
|
printf("SKIPPED\n");
|
||||||
|
return CURL_CHUNK_BGN_FUNC_SKIP;
|
||||||
|
}
|
||||||
|
|
||||||
|
data->output = fopen(finfo->filename, "w");
|
||||||
|
if(!data->output) {
|
||||||
|
return CURL_CHUNK_BGN_FUNC_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return CURL_CHUNK_BGN_FUNC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static long file_is_downloaded(struct callback_data *data)
|
||||||
|
{
|
||||||
|
if(data->output) {
|
||||||
|
printf("DOWNLOADED\n");
|
||||||
|
fclose(data->output);
|
||||||
|
data->output = 0x0;
|
||||||
|
}
|
||||||
|
return CURL_CHUNK_END_FUNC_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static size_t write_it(char *buff, size_t size, size_t nmemb,
|
||||||
|
struct callback_data *data)
|
||||||
|
{
|
||||||
|
size_t written = 0;
|
||||||
|
if(data->output)
|
||||||
|
written = fwrite(buff, size, nmemb, data->output);
|
||||||
|
else
|
||||||
|
/* listing output */
|
||||||
|
written = fwrite(buff, size, nmemb, stdout);
|
||||||
|
return written;
|
||||||
|
}
|
@@ -68,6 +68,8 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd = -1;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
FD_ZERO(&fdexcep);
|
FD_ZERO(&fdexcep);
|
||||||
@@ -76,6 +78,15 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
@@ -142,6 +142,8 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd = -1;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
FD_ZERO(&fdexcep);
|
FD_ZERO(&fdexcep);
|
||||||
@@ -150,6 +152,15 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
@@ -59,6 +59,8 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd = -1;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
FD_ZERO(&fdexcep);
|
FD_ZERO(&fdexcep);
|
||||||
@@ -67,6 +69,15 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
@@ -79,6 +79,8 @@ int main(int argc, char *argv[])
|
|||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd = -1;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
FD_ZERO(&fdexcep);
|
FD_ZERO(&fdexcep);
|
||||||
@@ -87,6 +89,15 @@ int main(int argc, char *argv[])
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
@@ -53,6 +53,8 @@ int main(int argc, char **argv)
|
|||||||
fd_set fdexcep;
|
fd_set fdexcep;
|
||||||
int maxfd = -1;
|
int maxfd = -1;
|
||||||
|
|
||||||
|
long curl_timeo = -1;
|
||||||
|
|
||||||
FD_ZERO(&fdread);
|
FD_ZERO(&fdread);
|
||||||
FD_ZERO(&fdwrite);
|
FD_ZERO(&fdwrite);
|
||||||
FD_ZERO(&fdexcep);
|
FD_ZERO(&fdexcep);
|
||||||
@@ -61,6 +63,15 @@ int main(int argc, char **argv)
|
|||||||
timeout.tv_sec = 1;
|
timeout.tv_sec = 1;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
|
|
||||||
|
curl_multi_timeout(multi_handle, &curl_timeo);
|
||||||
|
if(curl_timeo >= 0) {
|
||||||
|
timeout.tv_sec = curl_timeo / 1000;
|
||||||
|
if(timeout.tv_sec > 1)
|
||||||
|
timeout.tv_sec = 1;
|
||||||
|
else
|
||||||
|
timeout.tv_usec = (curl_timeo % 1000) * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
/* get file descriptors from the transfers */
|
/* get file descriptors from the transfers */
|
||||||
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||||
|
|
||||||
|
@@ -198,6 +198,9 @@ working with the socket, you must call curl_easy_cleanup() as usual and let
|
|||||||
libcurl close the socket and cleanup other resources associated with the
|
libcurl close the socket and cleanup other resources associated with the
|
||||||
handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
|
handle. This is typically used in combination with \fICURLOPT_CONNECT_ONLY\fP.
|
||||||
(Added in 7.15.2)
|
(Added in 7.15.2)
|
||||||
|
|
||||||
|
NOTE: this API is not really working on win64, since the SOCKET type on win64
|
||||||
|
is 64 bit large while its 'long' is only 32 bits.
|
||||||
.IP CURLINFO_FTP_ENTRY_PATH
|
.IP CURLINFO_FTP_ENTRY_PATH
|
||||||
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
||||||
path of the entry path. That is the initial path libcurl ended up in when
|
path of the entry path. That is the initial path libcurl ended up in when
|
||||||
|
@@ -138,7 +138,7 @@ Using the rules above, a file name pattern can be constructed:
|
|||||||
.SH CALLBACK OPTIONS
|
.SH CALLBACK OPTIONS
|
||||||
.IP CURLOPT_WRITEFUNCTION
|
.IP CURLOPT_WRITEFUNCTION
|
||||||
Function pointer that should match the following prototype: \fBsize_t
|
Function pointer that should match the following prototype: \fBsize_t
|
||||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP This
|
function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
|
||||||
function gets called by libcurl as soon as there is data received that needs
|
function gets called by libcurl as soon as there is data received that needs
|
||||||
to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
to be saved. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
||||||
multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
|
multiplied with \fInmemb\fP, it will not be zero terminated. Return the number
|
||||||
@@ -157,7 +157,7 @@ Set this option to NULL to get the internal default function. The internal
|
|||||||
default function will write the data to the FILE * given with
|
default function will write the data to the FILE * given with
|
||||||
\fICURLOPT_WRITEDATA\fP.
|
\fICURLOPT_WRITEDATA\fP.
|
||||||
|
|
||||||
Set the \fIstream\fP argument with the \fICURLOPT_WRITEDATA\fP option.
|
Set the \fIuserdata\fP argument with the \fICURLOPT_WRITEDATA\fP option.
|
||||||
|
|
||||||
The callback function will be passed as much data as possible in all invokes,
|
The callback function will be passed as much data as possible in all invokes,
|
||||||
but you cannot possibly make any assumptions. It may be one byte, it may be
|
but you cannot possibly make any assumptions. It may be one byte, it may be
|
||||||
@@ -180,7 +180,7 @@ This option is also known with the older name \fICURLOPT_FILE\fP, the name
|
|||||||
\fICURLOPT_WRITEDATA\fP was introduced in 7.9.7.
|
\fICURLOPT_WRITEDATA\fP was introduced in 7.9.7.
|
||||||
.IP CURLOPT_READFUNCTION
|
.IP CURLOPT_READFUNCTION
|
||||||
Function pointer that should match the following prototype: \fBsize_t
|
Function pointer that should match the following prototype: \fBsize_t
|
||||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP This
|
function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP This
|
||||||
function gets called by libcurl as soon as it needs to read data in order to
|
function gets called by libcurl as soon as it needs to read data in order to
|
||||||
send it to the peer. The data area pointed at by the pointer \fIptr\fP may be
|
send it to the peer. The data area pointed at by the pointer \fIptr\fP may be
|
||||||
filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
|
filled with at most \fIsize\fP multiplied with \fInmemb\fP number of
|
||||||
@@ -201,9 +201,9 @@ From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
|
|||||||
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
|
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
|
||||||
for further details.
|
for further details.
|
||||||
|
|
||||||
If you set the callback pointer to NULL, or don't set it at all, the default
|
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 simply doing an fread() on the FILE
|
internal read function will be used. It is doing an fread() on the FILE *
|
||||||
* stream set with \fICURLOPT_READDATA\fP.
|
userdata set with \fICURLOPT_READDATA\fP.
|
||||||
.IP CURLOPT_READDATA
|
.IP CURLOPT_READDATA
|
||||||
Data pointer to pass to the file read function. If you use the
|
Data pointer to pass to the file read function. If you use the
|
||||||
\fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
|
\fICURLOPT_READFUNCTION\fP option, this is the pointer you'll get as input. If
|
||||||
@@ -313,13 +313,13 @@ Pass a pointer that will be untouched by libcurl and passed as the first
|
|||||||
argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION\fP.
|
argument in the progress callback set with \fICURLOPT_PROGRESSFUNCTION\fP.
|
||||||
.IP CURLOPT_HEADERFUNCTION
|
.IP CURLOPT_HEADERFUNCTION
|
||||||
Function pointer that should match the following prototype: \fIsize_t
|
Function pointer that should match the following prototype: \fIsize_t
|
||||||
function( void *ptr, size_t size, size_t nmemb, void *stream);\fP. This
|
function( void *ptr, size_t size, size_t nmemb, void *userdata);\fP. This
|
||||||
function gets called by libcurl as soon as it has received header data. The
|
function gets called by libcurl as soon as it has received header data. The
|
||||||
header callback will be called once for each header and only complete header
|
header callback will be called once for each header and only complete header
|
||||||
lines are passed on to the callback. Parsing headers should be easy enough
|
lines are passed on to the callback. Parsing headers should be easy enough
|
||||||
using this. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
using this. The size of the data pointed to by \fIptr\fP is \fIsize\fP
|
||||||
multiplied with \fInmemb\fP. Do not assume that the header line is zero
|
multiplied with \fInmemb\fP. Do not assume that the header line is zero
|
||||||
terminated! The pointer named \fIstream\fP is the one you set with the
|
terminated! The pointer named \fIuserdata\fP is the one you set with the
|
||||||
\fICURLOPT_WRITEHEADER\fP option. The callback function must return the number
|
\fICURLOPT_WRITEHEADER\fP option. The callback function must return the number
|
||||||
of bytes actually taken care of. If that amount differs from the amount passed
|
of bytes actually taken care of. If that amount differs from the amount passed
|
||||||
to your function, it'll signal an error to the library. This will abort the
|
to your function, it'll signal an error to the library. This will abort the
|
||||||
@@ -452,7 +452,7 @@ You will need to override these definitions if they are different on your
|
|||||||
system.
|
system.
|
||||||
.IP CURLOPT_INTERLEAVEFUNCTION
|
.IP CURLOPT_INTERLEAVEFUNCTION
|
||||||
Function pointer that should match the following prototype: \fIsize_t
|
Function pointer that should match the following prototype: \fIsize_t
|
||||||
function( void *ptr, size_t size, size_t nmemb, void *stream)\fP. This
|
function( void *ptr, size_t size, size_t nmemb, void *userdata)\fP. This
|
||||||
function gets called by libcurl as soon as it has received interleaved RTP
|
function gets called by libcurl as soon as it has received interleaved RTP
|
||||||
data. This function gets called for each $ block and therefore contains
|
data. This function gets called for each $ block and therefore contains
|
||||||
exactly one upper-layer protocol unit (e.g. one RTP packet). Curl writes the
|
exactly one upper-layer protocol unit (e.g. one RTP packet). Curl writes the
|
||||||
@@ -472,8 +472,9 @@ request, (e.g. \fICURL_RTSPREQ_PAUSE\fP) then the response handler will
|
|||||||
process any pending RTP data before marking the request as finished. (Added
|
process any pending RTP data before marking the request as finished. (Added
|
||||||
in 7.20.0)
|
in 7.20.0)
|
||||||
.IP CURLOPT_INTERLEAVEDATA
|
.IP CURLOPT_INTERLEAVEDATA
|
||||||
This is the stream that will be passed to \fICURLOPT_INTERLEAVEFUNCTION\fP when
|
This is the userdata pointer that will be passed to
|
||||||
interleaved RTP data is received. (Added in 7.20.0)
|
\fICURLOPT_INTERLEAVEFUNCTION\fP when interleaved RTP data is received. (Added
|
||||||
|
in 7.20.0)
|
||||||
.IP CURLOPT_CHUNK_BGN_FUNCTION
|
.IP CURLOPT_CHUNK_BGN_FUNCTION
|
||||||
Function pointer that should match the following prototype: \fBlong function
|
Function pointer that should match the following prototype: \fBlong function
|
||||||
(const void *transfer_info, void *ptr, int remains)\fP. This function gets
|
(const void *transfer_info, void *ptr, int remains)\fP. This function gets
|
||||||
|
@@ -112,14 +112,15 @@ timeout value to use when waiting for socket activities.
|
|||||||
them for activity. This can be done through your application code, or by way
|
them for activity. This can be done through your application code, or by way
|
||||||
of an external library such as libevent or glib.
|
of an external library such as libevent or glib.
|
||||||
|
|
||||||
6. Wait for activity on any of libcurl's sockets, use the timeout value your
|
6. Call curl_multi_socket_action() to kickstart everything. To get one or more
|
||||||
|
callbacks called.
|
||||||
|
|
||||||
|
7. Wait for activity on any of libcurl's sockets, use the timeout value your
|
||||||
callback has been told
|
callback has been told
|
||||||
|
|
||||||
7, When activity is detected, call curl_multi_socket_action() for the
|
8, When activity is detected, call curl_multi_socket_action() for the
|
||||||
socket(s) that got action. If no activity is detected and the timeout expires,
|
socket(s) that got action. If no activity is detected and the timeout expires,
|
||||||
call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
|
call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
|
||||||
|
|
||||||
8. Go back to step 6.
|
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
|
This function was added in libcurl 7.15.4, and is deemed stable since 7.16.0.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
|
@@ -30,13 +30,13 @@
|
|||||||
|
|
||||||
/* This is the version number of the libcurl package from which this header
|
/* This is the version number of the libcurl package from which this header
|
||||||
file origins: */
|
file origins: */
|
||||||
#define LIBCURL_VERSION "7.21.0-DEV"
|
#define LIBCURL_VERSION "7.21.1-DEV"
|
||||||
|
|
||||||
/* The numeric version number is also available "in parts" by using these
|
/* The numeric version number is also available "in parts" by using these
|
||||||
defines: */
|
defines: */
|
||||||
#define LIBCURL_VERSION_MAJOR 7
|
#define LIBCURL_VERSION_MAJOR 7
|
||||||
#define LIBCURL_VERSION_MINOR 21
|
#define LIBCURL_VERSION_MINOR 21
|
||||||
#define LIBCURL_VERSION_PATCH 0
|
#define LIBCURL_VERSION_PATCH 1
|
||||||
|
|
||||||
/* This is the numeric version of the libcurl version number, meant for easier
|
/* This is the numeric version of the libcurl version number, meant for easier
|
||||||
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
and it is always a greater number in a more recent release. It makes
|
and it is always a greater number in a more recent release. It makes
|
||||||
comparisons with greater than and less than work.
|
comparisons with greater than and less than work.
|
||||||
*/
|
*/
|
||||||
#define LIBCURL_VERSION_NUM 0x071500
|
#define LIBCURL_VERSION_NUM 0x071501
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the date and time when the full source package was created. The
|
* This is the date and time when the full source package was created. The
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -230,6 +230,12 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
|||||||
(option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
|
(option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
|
||||||
(option) == CURLOPT_CRLFILE || \
|
(option) == CURLOPT_CRLFILE || \
|
||||||
(option) == CURLOPT_ISSUERCERT || \
|
(option) == CURLOPT_ISSUERCERT || \
|
||||||
|
(option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
|
||||||
|
(option) == CURLOPT_SSH_KNOWNHOSTS || \
|
||||||
|
(option) == CURLOPT_MAIL_FROM || \
|
||||||
|
(option) == CURLOPT_RTSP_SESSION_ID || \
|
||||||
|
(option) == CURLOPT_RTSP_STREAM_URI || \
|
||||||
|
(option) == CURLOPT_RTSP_TRANSPORT || \
|
||||||
0)
|
0)
|
||||||
|
|
||||||
/* evaluates to true if option takes a curl_write_callback argument */
|
/* evaluates to true if option takes a curl_write_callback argument */
|
||||||
@@ -256,6 +262,10 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
|||||||
(option) == CURLOPT_SSL_CTX_DATA || \
|
(option) == CURLOPT_SSL_CTX_DATA || \
|
||||||
(option) == CURLOPT_SEEKDATA || \
|
(option) == CURLOPT_SEEKDATA || \
|
||||||
(option) == CURLOPT_PRIVATE || \
|
(option) == CURLOPT_PRIVATE || \
|
||||||
|
(option) == CURLOPT_SSH_KEYDATA || \
|
||||||
|
(option) == CURLOPT_INTERLEAVEDATA || \
|
||||||
|
(option) == CURLOPT_CHUNK_DATA || \
|
||||||
|
(option) == CURLOPT_FNMATCH_DATA || \
|
||||||
0)
|
0)
|
||||||
|
|
||||||
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
||||||
@@ -272,6 +282,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
|||||||
(option) == CURLOPT_POSTQUOTE || \
|
(option) == CURLOPT_POSTQUOTE || \
|
||||||
(option) == CURLOPT_PREQUOTE || \
|
(option) == CURLOPT_PREQUOTE || \
|
||||||
(option) == CURLOPT_TELNETOPTIONS || \
|
(option) == CURLOPT_TELNETOPTIONS || \
|
||||||
|
(option) == CURLOPT_MAIL_RCPT || \
|
||||||
0)
|
0)
|
||||||
|
|
||||||
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
||||||
|
@@ -3,57 +3,107 @@
|
|||||||
# G. Vanem <gvanem@broadpark.no>
|
# G. Vanem <gvanem@broadpark.no>
|
||||||
#
|
#
|
||||||
|
|
||||||
TARGETS = libcurl_wc.dll libcurl_wc_imp.lib libcurl_wc.lib
|
!ifndef %watcom
|
||||||
|
!error WATCOM environment variable not set!
|
||||||
|
!else
|
||||||
|
SYS_INCL = -I$(%watcom)\h\nt -I$(%watcom)\h
|
||||||
|
SYS_LIBS = $(%watcom)\lib386\nt;$(%watcom)\lib386
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %libname
|
||||||
|
LIBNAME = $(%libname)
|
||||||
|
!else
|
||||||
|
LIBNAME = libcurl
|
||||||
|
!endif
|
||||||
|
TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
|
||||||
|
|
||||||
CC = wcc386
|
CC = wcc386
|
||||||
|
LD = wlink
|
||||||
|
AR = wlib
|
||||||
|
RC = wrc
|
||||||
|
|
||||||
CFLAGS = -3s -mf -d3 -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -bt=nt &
|
!ifdef __LOADDLL__
|
||||||
-bd -d+ -dWIN32 -dCURL_CA_BUNDLE=getenv("CURL_CA_BUNDLE") &
|
! loaddll wcc386 wccd386
|
||||||
-dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -dENABLE_IPV6 &
|
! loaddll wpp386 wppd386
|
||||||
-dDEBUG=1 -dDEBUGBUILD -d_WIN32_WINNT=0x0501 -dWINBERAPI=__declspec(cdecl) &
|
! loaddll wlib wlibd
|
||||||
-dWINLDAPAPI=__declspec(cdecl) -I. -I..\include
|
! if $(__VERSION__) > 1270
|
||||||
|
! loaddll wlink wlinkd
|
||||||
|
! else
|
||||||
|
! loaddll wlink wlink
|
||||||
|
! endif
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if $(__VERSION__) < 1250
|
||||||
|
RM = del /q /f >NUL 2>&1
|
||||||
|
!else
|
||||||
|
RM = rm -f
|
||||||
|
!endif
|
||||||
|
MD = mkdir
|
||||||
|
RD = rmdir /q /s >NUL 2>&1
|
||||||
|
CP = copy
|
||||||
|
|
||||||
|
CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm &
|
||||||
|
-wcd=201 -bt=nt -d+ -dWIN32 -dCURL_WANTS_CA_BUNDLE_ENV &
|
||||||
|
-dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -I. -I..\include $(SYS_INCL)
|
||||||
|
|
||||||
|
!ifdef %debug
|
||||||
|
DEBUG = -dDEBUG=1 -dDEBUGBUILD
|
||||||
|
CFLAGS += -d3 $(DEBUG)
|
||||||
|
!else
|
||||||
|
CFLAGS += -d0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %use_ipv6
|
||||||
|
CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
|
||||||
|
!endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Change to suite.
|
# Change to suite.
|
||||||
#
|
#
|
||||||
ZLIB_ROOT = ..\..\..\zlib-1.2.3
|
!ifdef %zlib_root
|
||||||
USE_ZLIB = 0
|
ZLIB_ROOT = $(%zlib_root)
|
||||||
USE_ARES = 0
|
!else
|
||||||
USE_WATT32 = 0
|
ZLIB_ROOT = ..\..\zlib-1.2.5
|
||||||
|
!endif
|
||||||
|
|
||||||
!ifeq USE_ZLIB 1
|
!ifdef %openssl_root
|
||||||
|
OPENSSL_ROOT = $(%openssl_root)
|
||||||
|
!else
|
||||||
|
OPENSSL_ROOT = ..\..\openssl-0.9.8o
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %ares_root
|
||||||
|
ARES_ROOT = $(%ares_root)
|
||||||
|
!else
|
||||||
|
ARES_ROOT = ..\ares
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %use_zlib
|
||||||
CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I$(ZLIB_ROOT)
|
CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I$(ZLIB_ROOT)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifeq USE_ARES 1
|
!ifdef %use_ssl
|
||||||
CFLAGS += -dUSE_ARES -I..\ares
|
CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I$(OPENSSL_ROOT)\inc32
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!ifeq USE_WATT32 1
|
!ifdef %use_ares
|
||||||
|
CFLAGS += -dUSE_ARES -I$(ARES_ROOT)
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %use_watt32
|
||||||
CFLAGS += -dUSE_WATT32 -I$(%watt_root)\inc
|
CFLAGS += -dUSE_WATT32 -I$(%watt_root)\inc
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
OBJ_BASE = WC_Win32.obj
|
OBJ_BASE = WC_Win32.obj
|
||||||
C_ARG = $(OBJ_BASE)\wcc386.arg
|
|
||||||
LINK_ARG = $(OBJ_BASE)\dyn\wlink.arg
|
LINK_ARG = $(OBJ_BASE)\dyn\wlink.arg
|
||||||
LIB_ARG = $(OBJ_BASE)\stat\wlib.arg
|
LIB_ARG = $(OBJ_BASE)\stat\wlib.arg
|
||||||
|
|
||||||
# Unfortunately, we can't include Makefile.inc here because wmake doesn't
|
# In order to process Makefile.inc wmake must be called with -u switch!
|
||||||
# use backslash as the line continuation character by default
|
!ifndef %MAKEFLAGS
|
||||||
CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c &
|
!error You MUST call wmake with the -u switch!
|
||||||
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c &
|
!else
|
||||||
ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c &
|
!include Makefile.inc
|
||||||
netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c &
|
!endif
|
||||||
curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c &
|
|
||||||
krb5.c memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c &
|
|
||||||
multi.c content_encoding.c share.c http_digest.c md5.c curl_rand.c &
|
|
||||||
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c &
|
|
||||||
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c &
|
|
||||||
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c &
|
|
||||||
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c &
|
|
||||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c &
|
|
||||||
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c &
|
|
||||||
warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c
|
|
||||||
|
|
||||||
OBJS = $(CSOURCES:.c=.obj)
|
OBJS = $(CSOURCES:.c=.obj)
|
||||||
OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
|
OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
|
||||||
@@ -67,500 +117,76 @@ OBJS_STAT = $+ $(OBJS) $-
|
|||||||
OBJ_DIR = $(OBJ_BASE)\dyn
|
OBJ_DIR = $(OBJ_BASE)\dyn
|
||||||
OBJS_DYN = $+ $(OBJS) $-
|
OBJS_DYN = $+ $(OBJS) $-
|
||||||
|
|
||||||
|
CURLBUILDH = ..\include\curl\curlbuild.h
|
||||||
RESOURCE = $(OBJ_BASE)\dyn\libcurl.res
|
RESOURCE = $(OBJ_BASE)\dyn\libcurl.res
|
||||||
|
|
||||||
all: $(OBJ_BASE) $(C_ARG) $(TARGETS) .SYMBOLIC
|
all: $(CURLBUILDH) $(OBJ_BASE) $(TARGETS) .SYMBOLIC
|
||||||
@echo Welcome to libcurl
|
@echo Welcome to libcurl
|
||||||
|
|
||||||
$(OBJ_BASE):
|
|
||||||
- mkdir $(OBJ_BASE)
|
|
||||||
- mkdir $(OBJ_BASE)\stat
|
|
||||||
- mkdir $(OBJ_BASE)\dyn
|
|
||||||
|
|
||||||
libcurl_wc.dll libcurl_wc_imp.lib: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
|
|
||||||
wlink name libcurl_wc.dll @$(LINK_ARG)
|
|
||||||
|
|
||||||
libcurl_wc.lib: $(OBJS_STAT) $(LIB_ARG)
|
|
||||||
wlib -q -b- c $@ @$(LIB_ARG)
|
|
||||||
|
|
||||||
clean: .SYMBOLIC
|
clean: .SYMBOLIC
|
||||||
- rm -f $(OBJS_STAT) $(OBJS_DYN) $(RESOURCE) $(C_ARG) $(LINK_ARG) $(LIB_ARG)
|
-$(RM) $(OBJS_STAT)
|
||||||
|
-$(RM) $(OBJS_DYN)
|
||||||
|
-$(RM) $(RESOURCE) $(LINK_ARG) $(LIB_ARG)
|
||||||
|
|
||||||
vclean realclean: clean .SYMBOLIC
|
vclean realclean: clean .SYMBOLIC
|
||||||
- rm -f $(TARGETS) libcurl_wc.map
|
-$(RM) $(TARGETS) $(LIBNAME).map $(LIBNAME).sym
|
||||||
- rmdir $(OBJ_BASE)\stat
|
-$(RD) $(OBJ_BASE)\stat
|
||||||
- rmdir $(OBJ_BASE)\dyn
|
-$(RD) $(OBJ_BASE)\dyn
|
||||||
- rmdir $(OBJ_BASE)
|
-$(RD) $(OBJ_BASE)
|
||||||
|
|
||||||
|
$(OBJ_BASE):
|
||||||
|
-$(MD) $^@
|
||||||
|
-$(MD) $^@\stat
|
||||||
|
-$(MD) $^@\dyn
|
||||||
|
|
||||||
|
$(CURLBUILDH): .EXISTSONLY
|
||||||
|
$(CP) $^@.dist $^@
|
||||||
|
|
||||||
|
$(LIBNAME).dll: $(OBJS_DYN) $(RESOURCE) $(LINK_ARG)
|
||||||
|
$(LD) name $^@ @$]@
|
||||||
|
|
||||||
|
$(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
|
||||||
|
$(AR) -q -b -c $^@ @$]@
|
||||||
|
|
||||||
.ERASE
|
.ERASE
|
||||||
$(RESOURCE): libcurl.rc
|
$(RESOURCE): libcurl.rc
|
||||||
wrc -dDEBUGBUILD=1 -q -r -zm -I..\include -fo=$@ libcurl.rc
|
$(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
|
||||||
|
|
||||||
.ERASE
|
.ERASE
|
||||||
.c{$(OBJ_BASE)\dyn}.obj:
|
.c{$(OBJ_BASE)\dyn}.obj:
|
||||||
$(CC) $[@ @$(C_ARG) -fo=$@
|
$(CC) $(CFLAGS) -bd -br $[@ -fo=$^@
|
||||||
|
|
||||||
.ERASE
|
.ERASE
|
||||||
.c{$(OBJ_BASE)\stat}.obj:
|
.c{$(OBJ_BASE)\stat}.obj:
|
||||||
$(CC) $[@ @$(C_ARG) -DCURL_STATICLIB -fo=$@
|
$(CC) $(CFLAGS) -DCURL_STATICLIB $[@ -fo=$^@
|
||||||
|
|
||||||
$(C_ARG): $(__MAKEFILES__)
|
|
||||||
%create $^@
|
|
||||||
%append $^@ $(CFLAGS)
|
|
||||||
|
|
||||||
$(LINK_ARG): $(__MAKEFILES__)
|
$(LINK_ARG): $(__MAKEFILES__)
|
||||||
%create $^@
|
%create $^@
|
||||||
@%append $^@ system nt dll
|
@%append $^@ system nt dll
|
||||||
@%append $^@ file { $(OBJS_DYN) }
|
@%append $^@ file { $(OBJS_DYN) }
|
||||||
@%append $^@ option quiet, map, caseexact, eliminate, implib=libcurl_wc_imp.lib,
|
!ifdef %debug
|
||||||
@%append $^@ res=$(RESOURCE) libpath $(%watcom)\lib386;$(%watcom)\lib386\nt
|
@%append $^@ debug all
|
||||||
@%append $^@ library clib3s.lib, wldap32.lib
|
@%append $^@ option symfile
|
||||||
!ifeq USE_WATT32 1
|
!endif
|
||||||
|
@%append $^@ option quiet, map, caseexact, eliminate, implib=$(LIBNAME)_imp.lib,
|
||||||
|
@%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
|
||||||
|
@%append $^@ library wldap32.lib
|
||||||
|
!ifdef %use_watt32
|
||||||
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
|
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
|
||||||
!else
|
!else
|
||||||
@%append $^@ library ws2_32.lib
|
@%append $^@ library ws2_32.lib
|
||||||
!endif
|
!endif
|
||||||
!ifeq USE_ZLIB 1
|
!ifdef %use_zlib
|
||||||
@%append $^@ library $(ZLIB_ROOT)\zlib.lib
|
@%append $^@ library $(ZLIB_ROOT)\zlib.lib
|
||||||
!endif
|
!endif
|
||||||
!ifeq USE_ARES 1
|
!ifdef %use_ssl
|
||||||
@%append $^@ library ..\ares\cares.lib
|
@%append $^@ library $(OPENSSL_ROOT)\out32\libeay32.lib, $(OPENSSL_ROOT)\out32\ssleay32.lib
|
||||||
|
!endif
|
||||||
|
!ifdef %use_ares
|
||||||
|
@%append $^@ library $(ARES_ROOT)\cares.lib
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
$(LIB_ARG): $(__MAKEFILES__)
|
$(LIB_ARG): $(__MAKEFILES__)
|
||||||
%create $^@
|
%create $^@
|
||||||
for %f in ($(OBJS_STAT)) do @%append $^@ +- %f
|
@for %f in ($(OBJS_STAT)) do @%append $^@ +- %f
|
||||||
|
|
||||||
#
|
|
||||||
# Dependencies based on "gcc -MM .."
|
|
||||||
#
|
|
||||||
$(OBJ_DIR)\file.obj: file.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h strtoofft.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
|
||||||
progress.h sendf.h escape.h file.h speedcheck.h getinfo.h transfer.h &
|
|
||||||
url.h curl_memory.h parsedate.h ..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\timeval.obj: timeval.c timeval.h setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\base64.obj: base64.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
|
|
||||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
|
||||||
curl_addrinfo.h splay.h easyif.h curl_base64.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\hostip.obj: hostip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h inet_ntop.h ..\include\curl\mprintf.h curl_memory.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\progress.obj: progress.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
progress.h ..\include\curl\mprintf.h
|
|
||||||
$(OBJ_DIR)\formdata.obj: formdata.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h easyif.h strequal.h curl_memory.h &
|
|
||||||
curl_rand.h ..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\cookie.obj: cookie.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
|
|
||||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
|
||||||
curl_addrinfo.h splay.h strequal.h strtok.h sendf.h curl_memory.h share.h &
|
|
||||||
strtoofft.h rawstr.h memdebug.h curl_memrchr.h
|
|
||||||
$(OBJ_DIR)\http.obj: http.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
|
||||||
transfer.h sendf.h easyif.h progress.h curl_base64.h strequal.h &
|
|
||||||
sslgen.h http_digest.h http_ntlm.h http_negotiate.h url.h share.h &
|
|
||||||
http.h curl_memory.h select.h parsedate.h strtoofft.h multiif.h rawstr.h &
|
|
||||||
..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\sendf.obj: sendf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h sendf.h connect.h sslgen.h ssh.h &
|
|
||||||
multiif.h ..\include\curl\mprintf.h curl_memory.h strerror.h easyif.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\ftp.obj: ftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h sendf.h easyif.h if2ip.h progress.h &
|
|
||||||
transfer.h escape.h http.h socks.h ftp.h strtoofft.h strequal.h &
|
|
||||||
sslgen.h connect.h strerror.h inet_ntop.h inet_pton.h select.h &
|
|
||||||
parsedate.h sockaddr.h multiif.h url.h ..\include\curl\mprintf.h &
|
|
||||||
curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\url.obj: url.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h netrc.h &
|
|
||||||
sslgen.h transfer.h sendf.h progress.h strequal.h strerror.h escape.h &
|
|
||||||
strtok.h share.h content_encoding.h http_digest.h http_negotiate.h &
|
|
||||||
select.h multiif.h easyif.h speedcheck.h rawstr.h ftp.h dict.h telnet.h &
|
|
||||||
tftp.h http.h file.h curl_ldap.h ssh.h url.h connect.h inet_ntop.h &
|
|
||||||
http_ntlm.h socks.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\dict.obj: dict.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
|
||||||
transfer.h sendf.h progress.h strequal.h dict.h rawstr.h &
|
|
||||||
..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\if2ip.obj: if2ip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h inet_ntop.h strequal.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h if2ip.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\speedcheck.obj: speedcheck.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
|
|
||||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
|
||||||
curl_addrinfo.h splay.h sendf.h multiif.h speedcheck.h
|
|
||||||
$(OBJ_DIR)\ldap.obj: ldap.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\ssluse.obj: ssluse.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
url.h inet_pton.h ssluse.h connect.h strequal.h select.h sslgen.h &
|
|
||||||
rawstr.h ..\include\curl\mprintf.h
|
|
||||||
$(OBJ_DIR)\version.obj: version.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h sslgen.h ..\include\curl\mprintf.h
|
|
||||||
$(OBJ_DIR)\getenv.obj: getenv.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\escape.obj: escape.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
curl_memory.h urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h &
|
|
||||||
hash.h llist.h curl_addrinfo.h splay.h easyif.h &
|
|
||||||
..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\mprintf.obj: mprintf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h curl_memory.h ..\include\curl\curl.h memdebug.h
|
|
||||||
$(OBJ_DIR)\telnet.obj: telnet.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
|
||||||
transfer.h sendf.h telnet.h connect.h ..\include\curl\mprintf.h &
|
|
||||||
arpa_telnet.h curl_memory.h select.h strequal.h rawstr.h memdebug.h
|
|
||||||
$(OBJ_DIR)\netrc.obj: netrc.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
netrc.h strequal.h strtok.h curl_memory.h rawstr.h ..\include\curl\mprintf.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\getinfo.obj: getinfo.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h getinfo.h curl_memory.h sslgen.h connect.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\transfer.obj: transfer.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h strtoofft.h strequal.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h rawstr.h urldata.h &
|
|
||||||
cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
|
||||||
curl_addrinfo.h splay.h netrc.h content_encoding.h transfer.h sendf.h &
|
|
||||||
speedcheck.h progress.h http.h url.h getinfo.h sslgen.h http_digest.h &
|
|
||||||
http_ntlm.h http_negotiate.h share.h curl_memory.h select.h multiif.h &
|
|
||||||
easyif.h ..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\strequal.obj: strequal.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h strequal.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h
|
|
||||||
$(OBJ_DIR)\easy.obj: easy.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h strequal.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
|
|
||||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
|
||||||
curl_addrinfo.h splay.h transfer.h sslgen.h url.h getinfo.h share.h &
|
|
||||||
strdup.h curl_memory.h progress.h easyif.h select.h sendf.h http_ntlm.h &
|
|
||||||
curl_rand.h connect.h ..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\security.obj: security.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\krb4.obj: krb4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\krb5.obj: krb5.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\memdebug.obj: memdebug.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\mprintf.h urldata.h cookie.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h curl_memory.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\http_chunks.obj: http_chunks.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
content_encoding.h http.h curl_memory.h easyif.h ..\include\curl\mprintf.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\strtok.obj: strtok.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h strtok.h
|
|
||||||
$(OBJ_DIR)\connect.obj: connect.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
|
|
||||||
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
|
|
||||||
curl_addrinfo.h splay.h sendf.h if2ip.h strerror.h connect.h curl_memory.h &
|
|
||||||
select.h url.h multiif.h sockaddr.h inet_ntop.h sslgen.h memdebug.h
|
|
||||||
$(OBJ_DIR)\llist.obj: llist.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h llist.h curl_memory.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h memdebug.h
|
|
||||||
$(OBJ_DIR)\hash.obj: hash.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h hash.h llist.h &
|
|
||||||
..\include\curl\mprintf.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h curl_memory.h &
|
|
||||||
..\include\curl\curl.h memdebug.h
|
|
||||||
$(OBJ_DIR)\multi.obj: multi.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h transfer.h url.h connect.h progress.h &
|
|
||||||
easyif.h multiif.h sendf.h http.h ..\include\curl\mprintf.h curl_memory.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\content_encoding.obj: content_encoding.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\share.obj: share.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h share.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\http_digest.obj: http_digest.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
rawstr.h curl_base64.h curl_md5.h http_digest.h strtok.h url.h curl_memory.h &
|
|
||||||
easyif.h ..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\md5.obj: md5.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h curl_md5.h
|
|
||||||
$(OBJ_DIR)\http_negotiate.obj: http_negotiate.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\http_ntlm.obj: http_ntlm.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h easyif.h &
|
|
||||||
sendf.h rawstr.h curl_base64.h http_ntlm.h url.h curl_memory.h ssluse.h &
|
|
||||||
..\include\curl\mprintf.h memdebug.h
|
|
||||||
$(OBJ_DIR)\inet_pton.obj: inet_pton.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
inet_pton.h
|
|
||||||
$(OBJ_DIR)\strtoofft.obj: strtoofft.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
strtoofft.h
|
|
||||||
$(OBJ_DIR)\strerror.obj: strerror.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
strerror.h urldata.h cookie.h formdata.h timeval.h http_chunks.h &
|
|
||||||
hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
|
||||||
..\include\curl\mprintf.h
|
|
||||||
$(OBJ_DIR)\hostares.obj: hostares.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h multiif.h inet_pton.h connect.h select.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\hostasyn.obj: hostasyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\hostip4.obj: hostip4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h inet_pton.h ..\include\curl\mprintf.h curl_memory.h &
|
|
||||||
memdebug.h
|
|
||||||
$(OBJ_DIR)\hostip6.obj: hostip6.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h inet_pton.h connect.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\hostsyn.obj: hostsyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h ..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\hostthre.obj: hostthre.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
share.h strerror.h url.h multiif.h inet_pton.h &
|
|
||||||
..\include\curl\mprintf.h inet_ntop.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\mprintf.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h inet_ntop.h
|
|
||||||
$(OBJ_DIR)\parsedate.obj: parsedate.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h rawstr.h parsedate.h
|
|
||||||
$(OBJ_DIR)\select.obj: select.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
|
|
||||||
llist.h curl_addrinfo.h splay.h connect.h select.h
|
|
||||||
$(OBJ_DIR)\gtls.obj: gtls.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\sslgen.obj: sslgen.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sslgen.h &
|
|
||||||
ssluse.h gtls.h nssg.h qssl.h sendf.h rawstr.h url.h curl_memory.h &
|
|
||||||
progress.h memdebug.h
|
|
||||||
$(OBJ_DIR)\tftp.obj: tftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
|
|
||||||
transfer.h sendf.h tftp.h progress.h connect.h strerror.h sockaddr.h &
|
|
||||||
url.h ..\include\curl\mprintf.h curl_memory.h select.h memdebug.h
|
|
||||||
$(OBJ_DIR)\splay.obj: splay.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h splay.h
|
|
||||||
$(OBJ_DIR)\strdup.obj: strdup.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h strdup.h
|
|
||||||
$(OBJ_DIR)\socks.obj: socks.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
strequal.h select.h connect.h socks.h memdebug.h
|
|
||||||
$(OBJ_DIR)\ssh.obj: ssh.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\nss.obj: nss.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
|
|
||||||
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
|
|
||||||
url.h connect.h strequal.h select.h sslgen.h ..\include\curl\mprintf.h
|
|
||||||
$(OBJ_DIR)\qssl.obj: qssl.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h
|
|
||||||
$(OBJ_DIR)\nonblock.obj: nonblock.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h nonblock.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h
|
|
||||||
$(OBJ_DIR)\rawstr.obj: rawstr.c setup.h config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h setup_once.h rawstr.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h
|
|
||||||
$(OBJ_DIR)\curl_addrinfo.obj: curl_addrinfo.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h curl_addrinfo.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\curl_rand.obj: curl_rand.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h curl_rand.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\curl_memrchr.obj: curl_memrchr.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h curl_memrchr.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\imap.obj: imap.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h imap.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\pop3.obj: pop3.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h pop3.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\smtp.obj: smtp.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h smtp.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
$(OBJ_DIR)\pingpong.obj: pingpong.c setup.h config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h pingpong.h &
|
|
||||||
..\include\curl\mprintf.h curl_memory.h memdebug.h
|
|
||||||
|
@@ -44,6 +44,9 @@ CLEANFILES = $(DSP) $(VCPROJ)
|
|||||||
lib_LTLIBRARIES = libcurl.la
|
lib_LTLIBRARIES = libcurl.la
|
||||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||||
|
|
||||||
|
# This might hold -Werror
|
||||||
|
CFLAGS += @CURL_CFLAG_EXTRAS@
|
||||||
|
|
||||||
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
# Specify our include paths here, and do it relative to $(top_srcdir) and
|
||||||
# $(top_builddir), to ensure that these paths which belong to the library
|
# $(top_builddir), to ensure that these paths which belong to the library
|
||||||
# being currently built and tested are searched before the library which
|
# being currently built and tested are searched before the library which
|
||||||
|
@@ -1,30 +1,38 @@
|
|||||||
# ./lib/Makefile.inc
|
# ./lib/Makefile.inc
|
||||||
|
# Using the backslash as line continuation character might be problematic
|
||||||
|
# with some make flavours, as Watcom's wmake showed us already. If we
|
||||||
|
# ever want to change this in a portable manner then we should consider
|
||||||
|
# this idea (posted to the libcurl list by Adam Kellas):
|
||||||
|
# CSRC1 = file1.c file2.c file3.c
|
||||||
|
# CSRC2 = file4.c file5.c file6.c
|
||||||
|
# CSOURCES = $(CSRC1) $(CSRC2)
|
||||||
|
|
||||||
CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
||||||
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \
|
cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \
|
||||||
ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
|
ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
|
||||||
netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c \
|
netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c \
|
||||||
curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c \
|
curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c \
|
||||||
krb5.c memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c \
|
memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c \
|
||||||
multi.c content_encoding.c share.c http_digest.c md5.c curl_rand.c \
|
content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c \
|
||||||
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
|
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
|
||||||
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
|
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
|
||||||
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
|
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
|
||||||
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
|
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
|
||||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c \
|
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c \
|
||||||
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
|
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
|
||||||
warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c
|
warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c
|
||||||
|
|
||||||
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
||||||
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
||||||
if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h \
|
if2ip.h speedcheck.h urldata.h curl_ldap.h ssluse.h escape.h telnet.h \
|
||||||
getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.h \
|
getinfo.h strequal.h krb4.h memdebug.h http_chunks.h curl_rand.h \
|
||||||
curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h \
|
curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h \
|
||||||
strtok.h connect.h llist.h hash.h content_encoding.h share.h \
|
connect.h llist.h hash.h content_encoding.h share.h curl_md4.h \
|
||||||
curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h \
|
curl_md5.h http_digest.h http_negotiate.h http_ntlm.h inet_pton.h \
|
||||||
strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
|
strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
|
||||||
transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
|
transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
|
||||||
tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
|
tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
|
||||||
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
|
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
|
||||||
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
|
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
|
||||||
warnless.h curl_hmac.h polarssl.h curl_rtmp.h
|
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h
|
||||||
|
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
## Makefile for building libcurl.a with MingW32 (GCC-3.2 or later)
|
## Makefile for building libcurl.a with MingW32 (GCC-3.2 or later)
|
||||||
## and optionally OpenSSL (0.9.8), libssh2 (1.1), zlib (1.2.3)
|
## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
|
||||||
##
|
##
|
||||||
## Usage:
|
## Usage:
|
||||||
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [DYN=1]
|
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [DYN=1]
|
||||||
##
|
##
|
||||||
## Hint: you can also set environment vars to control the build, f.e.:
|
## Hint: you can also set environment vars to control the build, f.e.:
|
||||||
## set ZLIB_PATH=c:/zlib-1.2.3
|
## set ZLIB_PATH=c:/zlib-1.2.5
|
||||||
## set ZLIB=1
|
## set ZLIB=1
|
||||||
##
|
##
|
||||||
## Comments to: Troy Engel <tengel@sonic.net> or
|
## Comments to: Troy Engel <tengel@sonic.net> or
|
||||||
@@ -20,11 +20,11 @@ ZLIB_PATH = ../../zlib-1.2.5
|
|||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your OpenSSL package.
|
# Edit the path below to point to the base of your OpenSSL package.
|
||||||
ifndef OPENSSL_PATH
|
ifndef OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8n
|
OPENSSL_PATH = ../../openssl-0.9.8o
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
LIBSSH2_PATH = ../../libssh2-1.2.5
|
LIBSSH2_PATH = ../../libssh2-1.2.6
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your libidn package.
|
# Edit the path below to point to the base of your libidn package.
|
||||||
ifndef LIBIDN_PATH
|
ifndef LIBIDN_PATH
|
||||||
|
@@ -19,12 +19,12 @@ endif
|
|||||||
|
|
||||||
# Edit the path below to point to the base of your OpenSSL package.
|
# Edit the path below to point to the base of your OpenSSL package.
|
||||||
ifndef OPENSSL_PATH
|
ifndef OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8n
|
OPENSSL_PATH = ../../openssl-0.9.8o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
LIBSSH2_PATH = ../../libssh2-1.2.5
|
LIBSSH2_PATH = ../../libssh2-1.2.6
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Edit the path below to point to the base of your libidn package.
|
# Edit the path below to point to the base of your libidn package.
|
||||||
@@ -616,6 +616,9 @@ $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
|
|||||||
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
|
||||||
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
|
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
|
||||||
@echo $(DL)*/$(DL) >> $@
|
@echo $(DL)*/$(DL) >> $@
|
||||||
|
@echo $(DL)#ifndef NETWARE$(DL) >> $@
|
||||||
|
@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
|
||||||
|
@echo $(DL)#endif$(DL) >> $@
|
||||||
@echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) >> $@
|
@echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) >> $@
|
||||||
@echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@
|
@echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@
|
||||||
ifeq ($(LIBARCH),LIBC)
|
ifeq ($(LIBARCH),LIBC)
|
||||||
|
@@ -15,7 +15,7 @@ objs = o.base64 o.connect o.cookie o.dict \
|
|||||||
o.rawstr o.curl_addrinfo o.slist o.nonblock o.curl_rand \
|
o.rawstr o.curl_addrinfo o.slist o.nonblock o.curl_rand \
|
||||||
o.curl_memrchr o.imap o.pop3 o.smtp o.pingpong o.rtsp \
|
o.curl_memrchr o.imap o.pop3 o.smtp o.pingpong o.rtsp \
|
||||||
o.curl_threads o.warnless o.hmac o.md5 o.curl_rtmp \
|
o.curl_threads o.warnless o.hmac o.md5 o.curl_rtmp \
|
||||||
o.openldap o.polarssl
|
o.openldap o.polarssl o.md4 o.curl_gethostname
|
||||||
|
|
||||||
|
|
||||||
# Compile options:
|
# Compile options:
|
||||||
@@ -39,6 +39,9 @@ o.cookie: c.cookie
|
|||||||
o.curl_addrinfo: c.curl_addrinfo
|
o.curl_addrinfo: c.curl_addrinfo
|
||||||
gcc $(compileropts) -c -o curl_addrinfo.o c.curl_addrinfo
|
gcc $(compileropts) -c -o curl_addrinfo.o c.curl_addrinfo
|
||||||
|
|
||||||
|
o.curl_gethostname: c.curl_gethostname
|
||||||
|
gcc $(compileropts) -c -o curl_gethostname.o c.curl_gethostname
|
||||||
|
|
||||||
o.curl_memrchr: c.curl_memrchr
|
o.curl_memrchr: c.curl_memrchr
|
||||||
gcc $(compileropts) -c -o curl_memrchr.o c.curl_memrchr
|
gcc $(compileropts) -c -o curl_memrchr.o c.curl_memrchr
|
||||||
|
|
||||||
@@ -117,6 +120,9 @@ o.krb4: c.krb4
|
|||||||
o.ldap: c.ldap
|
o.ldap: c.ldap
|
||||||
gcc $(compileropts) -IOpenLDAP: -c -o ldap.o c.ldap
|
gcc $(compileropts) -IOpenLDAP: -c -o ldap.o c.ldap
|
||||||
|
|
||||||
|
o.md4: c.md4
|
||||||
|
gcc $(compileropts) -c -o md4.o c.md4
|
||||||
|
|
||||||
o.md5: c.md5
|
o.md5: c.md5
|
||||||
gcc $(compileropts) -c -o md5.o c.md5
|
gcc $(compileropts) -c -o md5.o c.md5
|
||||||
|
|
||||||
|
@@ -54,11 +54,11 @@ IMPLIB_NAME = libcurl_imp
|
|||||||
IMPLIB_NAME_DEBUG = libcurld_imp
|
IMPLIB_NAME_DEBUG = libcurld_imp
|
||||||
|
|
||||||
!IFNDEF OPENSSL_PATH
|
!IFNDEF OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8g
|
OPENSSL_PATH = ../../openssl-0.9.8o
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF ZLIB_PATH
|
!IFNDEF ZLIB_PATH
|
||||||
ZLIB_PATH = ../../zlib-1.2.3
|
ZLIB_PATH = ../../zlib-1.2.5
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF MACHINE
|
!IFNDEF MACHINE
|
||||||
@@ -109,6 +109,10 @@ CFGSET = FALSE
|
|||||||
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
|
CFLAGS = $(CFLAGS) /DUSE_WINDOWS_SSPI /I$(WINDOWS_SDK_PATH)\include
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IFDEF USE_IPV6
|
||||||
|
CFLAGS = $(CFLAGS) /DUSE_IPV6
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
# Runtime library configuration
|
# Runtime library configuration
|
||||||
|
|
||||||
@@ -450,6 +454,7 @@ X_OBJS= \
|
|||||||
$(DIROBJ)\cookie.obj \
|
$(DIROBJ)\cookie.obj \
|
||||||
$(DIROBJ)\curl_addrinfo.obj \
|
$(DIROBJ)\curl_addrinfo.obj \
|
||||||
$(DIROBJ)\curl_fnmatch.obj \
|
$(DIROBJ)\curl_fnmatch.obj \
|
||||||
|
$(DIROBJ)\curl_gethostname.obj \
|
||||||
$(DIROBJ)\curl_memrchr.obj \
|
$(DIROBJ)\curl_memrchr.obj \
|
||||||
$(DIROBJ)\curl_rand.obj \
|
$(DIROBJ)\curl_rand.obj \
|
||||||
$(DIROBJ)\curl_rtmp.obj \
|
$(DIROBJ)\curl_rtmp.obj \
|
||||||
@@ -486,6 +491,7 @@ X_OBJS= \
|
|||||||
$(DIROBJ)\inet_pton.obj \
|
$(DIROBJ)\inet_pton.obj \
|
||||||
$(DIROBJ)\ldap.obj \
|
$(DIROBJ)\ldap.obj \
|
||||||
$(DIROBJ)\llist.obj \
|
$(DIROBJ)\llist.obj \
|
||||||
|
$(DIROBJ)\md4.obj \
|
||||||
$(DIROBJ)\md5.obj \
|
$(DIROBJ)\md5.obj \
|
||||||
$(DIROBJ)\memdebug.obj \
|
$(DIROBJ)\memdebug.obj \
|
||||||
$(DIROBJ)\mprintf.obj \
|
$(DIROBJ)\mprintf.obj \
|
||||||
|
@@ -504,6 +504,10 @@
|
|||||||
# define USE_WIN32_LARGE_FILES
|
# define USE_WIN32_LARGE_FILES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
|
||||||
|
# define USE_WIN32_LARGE_FILES
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__POCC__)
|
#if defined(__POCC__)
|
||||||
# undef USE_WIN32_LARGE_FILES
|
# undef USE_WIN32_LARGE_FILES
|
||||||
#endif
|
#endif
|
||||||
@@ -546,6 +550,13 @@
|
|||||||
#define CURL_LDAP_WIN 1
|
#define CURL_LDAP_WIN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
|
||||||
|
#if __WATCOMC__ < 1280
|
||||||
|
#define WINBERAPI __declspec(cdecl)
|
||||||
|
#define WINLDAPAPI __declspec(cdecl)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__POCC__) && defined(CURL_LDAP_WIN)
|
#if defined(__POCC__) && defined(CURL_LDAP_WIN)
|
||||||
# define CURL_DISABLE_LDAP 1
|
# define CURL_DISABLE_LDAP 1
|
||||||
#endif
|
#endif
|
||||||
@@ -569,7 +580,7 @@
|
|||||||
/* Name of package */
|
/* Name of package */
|
||||||
#define PACKAGE "curl"
|
#define PACKAGE "curl"
|
||||||
|
|
||||||
#if defined(__POCC__)
|
#if defined(__POCC__) || (USE_IPV6)
|
||||||
# define ENABLE_IPV6 1
|
# define ENABLE_IPV6 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -112,10 +112,11 @@ struct Curl_sockaddr_ex {
|
|||||||
|
|
||||||
static bool verifyconnect(curl_socket_t sockfd, int *error);
|
static bool verifyconnect(curl_socket_t sockfd, int *error);
|
||||||
|
|
||||||
static curl_socket_t
|
static CURLcode
|
||||||
singleipconnect(struct connectdata *conn,
|
singleipconnect(struct connectdata *conn,
|
||||||
const Curl_addrinfo *ai, /* start connecting to this */
|
const Curl_addrinfo *ai, /* start connecting to this */
|
||||||
long timeout_ms,
|
long timeout_ms,
|
||||||
|
curl_socket_t *sock,
|
||||||
bool *connected);
|
bool *connected);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -180,16 +181,13 @@ long Curl_timeleft(struct connectdata *conn,
|
|||||||
/*
|
/*
|
||||||
* waitconnect() waits for a TCP connect on the given socket for the specified
|
* waitconnect() waits for a TCP connect on the given socket for the specified
|
||||||
* number if milliseconds. It returns:
|
* number if milliseconds. It returns:
|
||||||
* 0 fine connect
|
|
||||||
* -1 select() error
|
|
||||||
* 1 select() timeout
|
|
||||||
* 2 select() returned with an error condition fd_set
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define WAITCONN_CONNECTED 0
|
#define WAITCONN_CONNECTED 0
|
||||||
#define WAITCONN_SELECT_ERROR -1
|
#define WAITCONN_SELECT_ERROR -1
|
||||||
#define WAITCONN_TIMEOUT 1
|
#define WAITCONN_TIMEOUT 1
|
||||||
#define WAITCONN_FDSET_ERROR 2
|
#define WAITCONN_FDSET_ERROR 2
|
||||||
|
#define WAITCONN_ABORTED 3
|
||||||
|
|
||||||
static
|
static
|
||||||
int waitconnect(struct connectdata *conn,
|
int waitconnect(struct connectdata *conn,
|
||||||
@@ -209,9 +207,8 @@ int waitconnect(struct connectdata *conn,
|
|||||||
/* now select() until we get connect or timeout */
|
/* now select() until we get connect or timeout */
|
||||||
rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, (int)(timeout_msec>1000?
|
rc = Curl_socket_ready(CURL_SOCKET_BAD, sockfd, (int)(timeout_msec>1000?
|
||||||
1000:timeout_msec));
|
1000:timeout_msec));
|
||||||
|
|
||||||
if(Curl_pgrsUpdate(conn))
|
if(Curl_pgrsUpdate(conn))
|
||||||
return CURLE_ABORTED_BY_CALLBACK;
|
return WAITCONN_ABORTED;
|
||||||
|
|
||||||
if(-1 == rc)
|
if(-1 == rc)
|
||||||
/* error, no connect here, try next */
|
/* error, no connect here, try next */
|
||||||
@@ -492,35 +489,44 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
|
|||||||
|
|
||||||
/* Used within the multi interface. Try next IP address, return TRUE if no
|
/* Used within the multi interface. Try next IP address, return TRUE if no
|
||||||
more address exists or error */
|
more address exists or error */
|
||||||
static bool trynextip(struct connectdata *conn,
|
static CURLcode trynextip(struct connectdata *conn,
|
||||||
int sockindex,
|
int sockindex,
|
||||||
bool *connected)
|
bool *connected)
|
||||||
{
|
{
|
||||||
curl_socket_t sockfd;
|
curl_socket_t sockfd;
|
||||||
Curl_addrinfo *ai;
|
Curl_addrinfo *ai;
|
||||||
|
|
||||||
/* first close the failed socket */
|
/* First clean up after the failed socket.
|
||||||
sclose(conn->sock[sockindex]);
|
Don't close it yet to ensure that the next IP's socket gets a different
|
||||||
|
file descriptor, which can prevent bugs when the curl_multi_socket_action
|
||||||
|
interface is used with certain select() replacements such as kqueue. */
|
||||||
|
curl_socket_t fd_to_close = conn->sock[sockindex];
|
||||||
conn->sock[sockindex] = CURL_SOCKET_BAD;
|
conn->sock[sockindex] = CURL_SOCKET_BAD;
|
||||||
*connected = FALSE;
|
*connected = FALSE;
|
||||||
|
|
||||||
if(sockindex != FIRSTSOCKET)
|
if(sockindex != FIRSTSOCKET) {
|
||||||
return TRUE; /* no next */
|
sclose(fd_to_close);
|
||||||
|
return CURLE_COULDNT_CONNECT; /* no next */
|
||||||
|
}
|
||||||
|
|
||||||
/* try the next address */
|
/* try the next address */
|
||||||
ai = conn->ip_addr->ai_next;
|
ai = conn->ip_addr->ai_next;
|
||||||
|
|
||||||
while(ai) {
|
while(ai) {
|
||||||
sockfd = singleipconnect(conn, ai, 0L, connected);
|
CURLcode res = singleipconnect(conn, ai, 0L, &sockfd, connected);
|
||||||
|
if(res)
|
||||||
|
return res;
|
||||||
if(sockfd != CURL_SOCKET_BAD) {
|
if(sockfd != CURL_SOCKET_BAD) {
|
||||||
/* store the new socket descriptor */
|
/* store the new socket descriptor */
|
||||||
conn->sock[sockindex] = sockfd;
|
conn->sock[sockindex] = sockfd;
|
||||||
conn->ip_addr = ai;
|
conn->ip_addr = ai;
|
||||||
return FALSE;
|
sclose(fd_to_close);
|
||||||
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
ai = ai->ai_next;
|
ai = ai->ai_next;
|
||||||
}
|
}
|
||||||
return TRUE;
|
sclose(fd_to_close);
|
||||||
|
return CURLE_COULDNT_CONNECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* retrieves ip address and port from a sockaddr structure */
|
/* retrieves ip address and port from a sockaddr structure */
|
||||||
@@ -668,11 +674,10 @@ CURLcode Curl_is_connected(struct connectdata *conn,
|
|||||||
/* nope, not connected for real */
|
/* nope, not connected for real */
|
||||||
data->state.os_errno = error;
|
data->state.os_errno = error;
|
||||||
infof(data, "Connection failed\n");
|
infof(data, "Connection failed\n");
|
||||||
if(trynextip(conn, sockindex, connected)) {
|
code = trynextip(conn, sockindex, connected);
|
||||||
|
if(code)
|
||||||
failf(data, "Failed connect to %s:%ld; %s",
|
failf(data, "Failed connect to %s:%ld; %s",
|
||||||
conn->host.name, conn->port, Curl_strerror(conn, error));
|
conn->host.name, conn->port, Curl_strerror(conn, error));
|
||||||
code = CURLE_COULDNT_CONNECT;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(WAITCONN_TIMEOUT != rc) {
|
else if(WAITCONN_TIMEOUT != rc) {
|
||||||
int error = 0;
|
int error = 0;
|
||||||
@@ -686,12 +691,13 @@ CURLcode Curl_is_connected(struct connectdata *conn,
|
|||||||
else
|
else
|
||||||
infof(data, "Connection failed\n");
|
infof(data, "Connection failed\n");
|
||||||
|
|
||||||
if(trynextip(conn, sockindex, connected)) {
|
code = trynextip(conn, sockindex, connected);
|
||||||
|
|
||||||
|
if(code) {
|
||||||
error = SOCKERRNO;
|
error = SOCKERRNO;
|
||||||
data->state.os_errno = error;
|
data->state.os_errno = error;
|
||||||
failf(data, "Failed connect to %s:%ld; %s",
|
failf(data, "Failed connect to %s:%ld; %s",
|
||||||
conn->host.name, conn->port, Curl_strerror(conn, error));
|
conn->host.name, conn->port, Curl_strerror(conn, error));
|
||||||
code = CURLE_COULDNT_CONNECT;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -779,12 +785,20 @@ void Curl_sndbufset(curl_socket_t sockfd)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* singleipconnect() connects to the given IP only, and it may return without
|
/*
|
||||||
having connected if used from the multi interface. */
|
* singleipconnect()
|
||||||
static curl_socket_t
|
*
|
||||||
|
* Note that even on connect fail it returns CURLE_OK, but with 'sock' set to
|
||||||
|
* CURL_SOCKET_BAD. Other errors will however return proper errors.
|
||||||
|
*
|
||||||
|
* singleipconnect() connects to the given IP only, and it may return without
|
||||||
|
* having connected if used from the multi interface.
|
||||||
|
*/
|
||||||
|
static CURLcode
|
||||||
singleipconnect(struct connectdata *conn,
|
singleipconnect(struct connectdata *conn,
|
||||||
const Curl_addrinfo *ai,
|
const Curl_addrinfo *ai,
|
||||||
long timeout_ms,
|
long timeout_ms,
|
||||||
|
curl_socket_t *sockp,
|
||||||
bool *connected)
|
bool *connected)
|
||||||
{
|
{
|
||||||
struct Curl_sockaddr_ex addr;
|
struct Curl_sockaddr_ex addr;
|
||||||
@@ -794,13 +808,15 @@ singleipconnect(struct connectdata *conn,
|
|||||||
bool isconnected;
|
bool isconnected;
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
curl_socket_t sockfd;
|
curl_socket_t sockfd;
|
||||||
CURLcode res;
|
CURLcode res = CURLE_OK;
|
||||||
const void *iptoprint;
|
const void *iptoprint;
|
||||||
struct sockaddr_in * const sa4 = (void *)&addr.sa_addr;
|
struct sockaddr_in * const sa4 = (void *)&addr.sa_addr;
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
struct sockaddr_in6 * const sa6 = (void *)&addr.sa_addr;
|
struct sockaddr_in6 * const sa6 = (void *)&addr.sa_addr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
*sockp = CURL_SOCKET_BAD;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The Curl_sockaddr_ex structure is basically libcurl's external API
|
* The Curl_sockaddr_ex structure is basically libcurl's external API
|
||||||
* curl_sockaddr structure with enough space available to directly hold
|
* curl_sockaddr structure with enough space available to directly hold
|
||||||
@@ -839,7 +855,7 @@ singleipconnect(struct connectdata *conn,
|
|||||||
|
|
||||||
if(sockfd == CURL_SOCKET_BAD)
|
if(sockfd == CURL_SOCKET_BAD)
|
||||||
/* no socket, no connection */
|
/* no socket, no connection */
|
||||||
return CURL_SOCKET_BAD;
|
return CURLE_OK;
|
||||||
|
|
||||||
#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
|
#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
|
||||||
if (conn->scope && (addr.family == AF_INET6))
|
if (conn->scope && (addr.family == AF_INET6))
|
||||||
@@ -892,7 +908,7 @@ singleipconnect(struct connectdata *conn,
|
|||||||
CURLSOCKTYPE_IPCXN);
|
CURLSOCKTYPE_IPCXN);
|
||||||
if(error) {
|
if(error) {
|
||||||
sclose(sockfd); /* close the socket and bail out */
|
sclose(sockfd); /* close the socket and bail out */
|
||||||
return CURL_SOCKET_BAD;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -900,7 +916,7 @@ singleipconnect(struct connectdata *conn,
|
|||||||
res = bindlocal(conn, sockfd, addr.family);
|
res = bindlocal(conn, sockfd, addr.family);
|
||||||
if(res) {
|
if(res) {
|
||||||
sclose(sockfd); /* close socket and bail out */
|
sclose(sockfd); /* close socket and bail out */
|
||||||
return CURL_SOCKET_BAD;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set socket non-blocking */
|
/* set socket non-blocking */
|
||||||
@@ -928,6 +944,10 @@ singleipconnect(struct connectdata *conn,
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
rc = waitconnect(conn, sockfd, timeout_ms);
|
rc = waitconnect(conn, sockfd, timeout_ms);
|
||||||
|
if(WAITCONN_ABORTED == rc) {
|
||||||
|
sclose(sockfd);
|
||||||
|
return CURLE_ABORTED_BY_CALLBACK;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* unknown error, fallthrough and try another address! */
|
/* unknown error, fallthrough and try another address! */
|
||||||
@@ -943,7 +963,8 @@ singleipconnect(struct connectdata *conn,
|
|||||||
if((WAITCONN_TIMEOUT == rc) &&
|
if((WAITCONN_TIMEOUT == rc) &&
|
||||||
(data->state.used_interface == Curl_if_multi)) {
|
(data->state.used_interface == Curl_if_multi)) {
|
||||||
/* Timeout when running the multi interface */
|
/* Timeout when running the multi interface */
|
||||||
return sockfd;
|
*sockp = sockfd;
|
||||||
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
isconnected = verifyconnect(sockfd, &error);
|
isconnected = verifyconnect(sockfd, &error);
|
||||||
@@ -953,7 +974,8 @@ singleipconnect(struct connectdata *conn,
|
|||||||
*connected = TRUE; /* this is a true connect */
|
*connected = TRUE; /* this is a true connect */
|
||||||
infof(data, "connected\n");
|
infof(data, "connected\n");
|
||||||
Curl_updateconninfo(conn, sockfd);
|
Curl_updateconninfo(conn, sockfd);
|
||||||
return sockfd;
|
*sockp = sockfd;
|
||||||
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
else if(WAITCONN_TIMEOUT == rc)
|
else if(WAITCONN_TIMEOUT == rc)
|
||||||
infof(data, "Timeout\n");
|
infof(data, "Timeout\n");
|
||||||
@@ -965,7 +987,7 @@ singleipconnect(struct connectdata *conn,
|
|||||||
/* connect failed or timed out */
|
/* connect failed or timed out */
|
||||||
sclose(sockfd);
|
sclose(sockfd);
|
||||||
|
|
||||||
return CURL_SOCKET_BAD;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1030,7 +1052,11 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
|||||||
curr_addr = curr_addr->ai_next, aliasindex++) {
|
curr_addr = curr_addr->ai_next, aliasindex++) {
|
||||||
|
|
||||||
/* start connecting to the IP curr_addr points to */
|
/* start connecting to the IP curr_addr points to */
|
||||||
sockfd = singleipconnect(conn, curr_addr, timeout_per_addr, connected);
|
CURLcode res =
|
||||||
|
singleipconnect(conn, curr_addr, timeout_per_addr, &sockfd, connected);
|
||||||
|
|
||||||
|
if(res)
|
||||||
|
return res;
|
||||||
|
|
||||||
if(sockfd != CURL_SOCKET_BAD)
|
if(sockfd != CURL_SOCKET_BAD)
|
||||||
break;
|
break;
|
||||||
|
@@ -151,7 +151,10 @@ Curl_getaddrinfo_ex(const char *nodename,
|
|||||||
ca->ai_next = NULL;
|
ca->ai_next = NULL;
|
||||||
|
|
||||||
if((ai->ai_addrlen > 0) && (ai->ai_addr != NULL)) {
|
if((ai->ai_addrlen > 0) && (ai->ai_addr != NULL)) {
|
||||||
ca->ai_addrlen = ai->ai_addrlen;
|
/* typecast below avoid warning on at least win64:
|
||||||
|
conversion from 'size_t' to 'curl_socklen_t', possible loss of data
|
||||||
|
*/
|
||||||
|
ca->ai_addrlen = (curl_socklen_t)ai->ai_addrlen;
|
||||||
if((ca->ai_addr = malloc(ca->ai_addrlen)) == NULL) {
|
if((ca->ai_addr = malloc(ca->ai_addrlen)) == NULL) {
|
||||||
error = EAI_MEMORY;
|
error = EAI_MEMORY;
|
||||||
free(ca);
|
free(ca);
|
||||||
|
81
lib/curl_gethostname.c
Normal file
81
lib/curl_gethostname.c
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 http://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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "setup.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "curl_gethostname.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Curl_gethostname() is a wrapper around gethostname() which allows
|
||||||
|
* overriding the host name that the function would normally return.
|
||||||
|
* This capability is used by the test suite to verify exact matching
|
||||||
|
* of NTLM authentication, which exercises libcurl's MD4 and DES code.
|
||||||
|
*
|
||||||
|
* For libcurl debug enabled builds host name overriding takes place
|
||||||
|
* when environment variable CURL_GETHOSTNAME is set, using the value
|
||||||
|
* held by the variable to override returned host name.
|
||||||
|
*
|
||||||
|
* For libcurl shared library release builds the test suite preloads
|
||||||
|
* another shared library named libhostname using the LD_PRELOAD
|
||||||
|
* mechanism which intercepts, and might override, the gethostname()
|
||||||
|
* function call. In this case a given platform must support the
|
||||||
|
* LD_PRELOAD mechanism and additionally have environment variable
|
||||||
|
* CURL_GETHOSTNAME set in order to override the returned host name.
|
||||||
|
*
|
||||||
|
* For libcurl static library release builds no overriding takes place.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen) {
|
||||||
|
|
||||||
|
#ifndef HAVE_GETHOSTNAME
|
||||||
|
|
||||||
|
/* Allow compilation and return failure when unavailable */
|
||||||
|
(void) name;
|
||||||
|
(void) namelen;
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifdef DEBUGBUILD
|
||||||
|
|
||||||
|
/* Override host name when environment variable CURL_GETHOSTNAME is set */
|
||||||
|
const char *force_hostname = getenv("CURL_GETHOSTNAME");
|
||||||
|
if(force_hostname) {
|
||||||
|
strncpy(name, force_hostname, namelen);
|
||||||
|
name[namelen-1] = '\0';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* DEBUGBUILD */
|
||||||
|
|
||||||
|
/* The call to system's gethostname() might get intercepted by the
|
||||||
|
libhostname library when libcurl is built as a non-debug shared
|
||||||
|
library when running the test suite. */
|
||||||
|
return gethostname(name, namelen);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
27
lib/curl_gethostname.h
Normal file
27
lib/curl_gethostname.h
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#ifndef HEADER_CURL_GETHOSTNAME_H
|
||||||
|
#define HEADER_CURL_GETHOSTNAME_H
|
||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 http://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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
int Curl_gethostname(char *name, GETHOSTNAME_TYPE_ARG2 namelen);
|
||||||
|
|
||||||
|
#endif /* HEADER_CURL_GETHOSTNAME_H */
|
33
lib/curl_md4.h
Normal file
33
lib/curl_md4.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#ifndef HEADER_CURL_MD4_H
|
||||||
|
#define HEADER_CURL_MD4_H
|
||||||
|
/***************************************************************************
|
||||||
|
* _ _ ____ _
|
||||||
|
* Project ___| | | | _ \| |
|
||||||
|
* / __| | | | |_) | |
|
||||||
|
* | (__| |_| | _ <| |___
|
||||||
|
* \___|\___/|_| \_\_____|
|
||||||
|
*
|
||||||
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, 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 http://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.
|
||||||
|
*
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "setup.h"
|
||||||
|
|
||||||
|
/* NSS crypto library does not provide the MD4 hash algorithm, so that we have
|
||||||
|
* a local implementation of it */
|
||||||
|
#ifdef USE_NSS
|
||||||
|
void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len);
|
||||||
|
#endif /* USE_NSS */
|
||||||
|
|
||||||
|
#endif /* HEADER_CURL_MD4_H */
|
12
lib/ftp.c
12
lib/ftp.c
@@ -3203,6 +3203,8 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
|
|||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
int ftpcode;
|
int ftpcode;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
|
struct ftp_conn *ftpc = &conn->proto.ftpc;
|
||||||
|
struct pingpong *pp = &ftpc->pp;
|
||||||
|
|
||||||
item = quote;
|
item = quote;
|
||||||
while(item) {
|
while(item) {
|
||||||
@@ -3222,6 +3224,8 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
|
|||||||
|
|
||||||
FTPSENDF(conn, "%s", cmd);
|
FTPSENDF(conn, "%s", cmd);
|
||||||
|
|
||||||
|
pp->response = Curl_tvnow(); /* timeout relative now */
|
||||||
|
|
||||||
result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
|
result = Curl_GetFTPResponse(&nread, conn, &ftpcode);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
@@ -3509,7 +3513,7 @@ static CURLcode init_wc_data(struct connectdata *conn)
|
|||||||
path[0] = '\0';
|
path[0] = '\0';
|
||||||
}
|
}
|
||||||
else { /* only list */
|
else { /* only list */
|
||||||
conn->data->set.wildcardmatch = FALSE;
|
wildcard->state = CURLWC_CLEAN;
|
||||||
ret = ftp_parse_url_path(conn);
|
ret = ftp_parse_url_path(conn);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -3526,8 +3530,10 @@ static CURLcode init_wc_data(struct connectdata *conn)
|
|||||||
|
|
||||||
/* INITIALIZE parselist structure */
|
/* INITIALIZE parselist structure */
|
||||||
ftp_tmp->parser = Curl_ftp_parselist_data_alloc();
|
ftp_tmp->parser = Curl_ftp_parselist_data_alloc();
|
||||||
if(!ftp_tmp->parser)
|
if(!ftp_tmp->parser) {
|
||||||
|
free(ftp_tmp);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
wildcard->tmp = ftp_tmp; /* put it to the WildcardData tmp pointer */
|
wildcard->tmp = ftp_tmp; /* put it to the WildcardData tmp pointer */
|
||||||
wildcard->tmp_dtor = wc_data_dtor;
|
wildcard->tmp_dtor = wc_data_dtor;
|
||||||
@@ -4172,6 +4178,7 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
data->state.path++; /* don't include the initial slash */
|
data->state.path++; /* don't include the initial slash */
|
||||||
|
data->state.slash_removed = TRUE; /* we've skipped the slash */
|
||||||
|
|
||||||
/* FTP URLs support an extension like ";type=<typecode>" that
|
/* FTP URLs support an extension like ";type=<typecode>" that
|
||||||
* we'll try to get now! */
|
* we'll try to get now! */
|
||||||
@@ -4183,6 +4190,7 @@ static CURLcode ftp_setup_connection(struct connectdata * conn)
|
|||||||
if(type) {
|
if(type) {
|
||||||
*type = 0; /* it was in the middle of the hostname */
|
*type = 0; /* it was in the middle of the hostname */
|
||||||
command = Curl_raw_toupper(type[6]);
|
command = Curl_raw_toupper(type[6]);
|
||||||
|
conn->bits.type_set = TRUE;
|
||||||
|
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case 'A': /* ASCII mode */
|
case 'A': /* ASCII mode */
|
||||||
|
@@ -61,7 +61,8 @@
|
|||||||
#define FTP_BUFFER_ALLOCSIZE 160
|
#define FTP_BUFFER_ALLOCSIZE 160
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PL_UNIX_FILETYPE = 0,
|
PL_UNIX_TOTALSIZE = 0,
|
||||||
|
PL_UNIX_FILETYPE,
|
||||||
PL_UNIX_PERMISSION,
|
PL_UNIX_PERMISSION,
|
||||||
PL_UNIX_HLINKS,
|
PL_UNIX_HLINKS,
|
||||||
PL_UNIX_USER,
|
PL_UNIX_USER,
|
||||||
@@ -73,6 +74,11 @@ typedef enum {
|
|||||||
} pl_unix_mainstate;
|
} pl_unix_mainstate;
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
|
enum {
|
||||||
|
PL_UNIX_TOTALSIZE_INIT = 0,
|
||||||
|
PL_UNIX_TOTALSIZE_READING
|
||||||
|
} total_dirsize;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PL_UNIX_HLINKS_PRESPACE = 0,
|
PL_UNIX_HLINKS_PRESPACE = 0,
|
||||||
PL_UNIX_HLINKS_NUMBER
|
PL_UNIX_HLINKS_NUMBER
|
||||||
@@ -396,7 +402,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
finfo = parser->file_data;
|
finfo = parser->file_data;
|
||||||
finfo->b_data[finfo->b_used++] = buffer[i];
|
finfo->b_data[finfo->b_used++] = c;
|
||||||
|
|
||||||
if(finfo->b_used >= finfo->b_size - 1) {
|
if(finfo->b_used >= finfo->b_size - 1) {
|
||||||
/* if it is important, extend buffer space for file data */
|
/* if it is important, extend buffer space for file data */
|
||||||
@@ -418,6 +424,49 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||||||
switch (parser->os_type) {
|
switch (parser->os_type) {
|
||||||
case OS_TYPE_UNIX:
|
case OS_TYPE_UNIX:
|
||||||
switch (parser->state.UNIX.main) {
|
switch (parser->state.UNIX.main) {
|
||||||
|
case PL_UNIX_TOTALSIZE:
|
||||||
|
switch(parser->state.UNIX.sub.total_dirsize) {
|
||||||
|
case PL_UNIX_TOTALSIZE_INIT:
|
||||||
|
if(c == 't') {
|
||||||
|
parser->state.UNIX.sub.total_dirsize = PL_UNIX_TOTALSIZE_READING;
|
||||||
|
parser->item_length++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
parser->state.UNIX.main = PL_UNIX_FILETYPE;
|
||||||
|
/* start FSM again not considering size of directory */
|
||||||
|
finfo->b_used = 0;
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PL_UNIX_TOTALSIZE_READING:
|
||||||
|
parser->item_length++;
|
||||||
|
if(c == '\r') {
|
||||||
|
parser->item_length--;
|
||||||
|
finfo->b_used--;
|
||||||
|
}
|
||||||
|
else if(c == '\n') {
|
||||||
|
finfo->b_data[parser->item_length - 1] = 0;
|
||||||
|
if(strncmp("total ", finfo->b_data, 6) == 0) {
|
||||||
|
char *endptr = NULL;
|
||||||
|
/* here we can deal with directory size */
|
||||||
|
curlx_strtoofft(finfo->b_data+6, &endptr, 10);
|
||||||
|
if(*endptr != 0) {
|
||||||
|
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
|
||||||
|
return bufflen;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
parser->state.UNIX.main = PL_UNIX_FILETYPE;
|
||||||
|
finfo->b_used = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST);
|
||||||
|
return bufflen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case PL_UNIX_FILETYPE:
|
case PL_UNIX_FILETYPE:
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '-':
|
case '-':
|
||||||
|
@@ -451,6 +451,9 @@ CURLcode Curl_is_resolved(struct connectdata *conn,
|
|||||||
|
|
||||||
td->interval_end = elapsed + td->poll_interval;
|
td->interval_end = elapsed + td->poll_interval;
|
||||||
|
|
||||||
|
/* Reset old timer so we can set a new one further in the future */
|
||||||
|
Curl_expire(conn->data, 0);
|
||||||
|
|
||||||
Curl_expire(conn->data, td->poll_interval);
|
Curl_expire(conn->data, td->poll_interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,8 +487,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
int port,
|
int port,
|
||||||
int *waitp)
|
int *waitp)
|
||||||
{
|
{
|
||||||
struct hostent *h = NULL;
|
|
||||||
struct SessionHandle *data = conn->data;
|
|
||||||
struct in_addr in;
|
struct in_addr in;
|
||||||
|
|
||||||
*waitp = 0; /* default to synchronous response */
|
*waitp = 0; /* default to synchronous response */
|
||||||
|
24
lib/http.c
24
lib/http.c
@@ -978,10 +978,13 @@ Curl_send_buffer *Curl_add_buffer_init(void)
|
|||||||
*/
|
*/
|
||||||
CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
|
CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
|
||||||
struct connectdata *conn,
|
struct connectdata *conn,
|
||||||
long *bytes_written, /* add the number of sent bytes
|
|
||||||
to this counter */
|
/* add the number of sent bytes to this
|
||||||
size_t included_body_bytes, /* how much of the buffer
|
counter */
|
||||||
contains body data */
|
long *bytes_written,
|
||||||
|
|
||||||
|
/* how much of the buffer contains body data */
|
||||||
|
size_t included_body_bytes,
|
||||||
int socketindex)
|
int socketindex)
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1069,7 +1072,10 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
|
|||||||
accordingly */
|
accordingly */
|
||||||
http->writebytecount += bodylen;
|
http->writebytecount += bodylen;
|
||||||
|
|
||||||
*bytes_written += amount;
|
/* 'amount' can never be a very large value here so typecasting it so a
|
||||||
|
signed 31 bit value should not cause problems even if ssize_t is
|
||||||
|
64bit */
|
||||||
|
*bytes_written += (long)amount;
|
||||||
|
|
||||||
if(http) {
|
if(http) {
|
||||||
if((size_t)amount != size) {
|
if((size_t)amount != size) {
|
||||||
@@ -2222,7 +2228,10 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
if((conn->protocol&PROT_HTTP) &&
|
if((conn->protocol&PROT_HTTP) &&
|
||||||
data->set.upload &&
|
data->set.upload &&
|
||||||
(data->set.infilesize == -1)) {
|
(data->set.infilesize == -1)) {
|
||||||
if (use_http_1_1(data, conn)) {
|
if(conn->bits.authneg)
|
||||||
|
/* don't enable chunked during auth neg */
|
||||||
|
;
|
||||||
|
else if(use_http_1_1(data, conn)) {
|
||||||
/* HTTP, upload, unknown file size and not HTTP 1.0 */
|
/* HTTP, upload, unknown file size and not HTTP 1.0 */
|
||||||
data->req.upload_chunky = TRUE;
|
data->req.upload_chunky = TRUE;
|
||||||
}
|
}
|
||||||
@@ -2527,7 +2536,8 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
|||||||
/* url */
|
/* url */
|
||||||
if (paste_ftp_userpwd)
|
if (paste_ftp_userpwd)
|
||||||
result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s",
|
result = Curl_add_bufferf(req_buffer, "ftp://%s:%s@%s",
|
||||||
conn->user, conn->passwd, ppath + sizeof("ftp://") - 1);
|
conn->user, conn->passwd,
|
||||||
|
ppath + sizeof("ftp://") - 1);
|
||||||
else
|
else
|
||||||
result = Curl_add_buffer(req_buffer, ppath, strlen(ppath));
|
result = Curl_add_buffer(req_buffer, ppath, strlen(ppath));
|
||||||
if (result)
|
if (result)
|
||||||
|
@@ -61,7 +61,6 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
|
|||||||
size_t included_body_bytes,
|
size_t included_body_bytes,
|
||||||
int socketindex);
|
int socketindex);
|
||||||
|
|
||||||
|
|
||||||
CURLcode Curl_add_timecondition(struct SessionHandle *data,
|
CURLcode Curl_add_timecondition(struct SessionHandle *data,
|
||||||
Curl_send_buffer *buf);
|
Curl_send_buffer *buf);
|
||||||
CURLcode Curl_add_custom_headers(struct connectdata *conn,
|
CURLcode Curl_add_custom_headers(struct connectdata *conn,
|
||||||
|
129
lib/http_ntlm.c
129
lib/http_ntlm.c
@@ -58,6 +58,7 @@
|
|||||||
#include "curl_base64.h"
|
#include "curl_base64.h"
|
||||||
#include "http_ntlm.h"
|
#include "http_ntlm.h"
|
||||||
#include "url.h"
|
#include "url.h"
|
||||||
|
#include "curl_gethostname.h"
|
||||||
#include "curl_memory.h"
|
#include "curl_memory.h"
|
||||||
|
|
||||||
#define _MPRINTF_REPLACE /* use our functions only */
|
#define _MPRINTF_REPLACE /* use our functions only */
|
||||||
@@ -116,6 +117,15 @@
|
|||||||
#define MD5_DIGEST_LENGTH 16
|
#define MD5_DIGEST_LENGTH 16
|
||||||
#define MD4_DIGEST_LENGTH 16
|
#define MD4_DIGEST_LENGTH 16
|
||||||
|
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
|
||||||
|
#include "curl_md4.h"
|
||||||
|
#include "nssg.h"
|
||||||
|
#include <nss.h>
|
||||||
|
#include <pk11pub.h>
|
||||||
|
#include <hasht.h>
|
||||||
|
#define MD5_DIGEST_LENGTH MD5_LENGTH
|
||||||
|
|
||||||
#elif defined(USE_WINDOWS_SSPI)
|
#elif defined(USE_WINDOWS_SSPI)
|
||||||
|
|
||||||
#include "curl_sspi.h"
|
#include "curl_sspi.h"
|
||||||
@@ -250,6 +260,11 @@ CURLntlm Curl_input_ntlm(struct connectdata *conn,
|
|||||||
static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
|
static const char type2_marker[] = { 0x02, 0x00, 0x00, 0x00 };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_NSS
|
||||||
|
if(CURLE_OK != Curl_nss_force_init(conn->data))
|
||||||
|
return CURLNTLM_BAD;
|
||||||
|
#endif
|
||||||
|
|
||||||
ntlm = proxy?&conn->proxyntlm:&conn->ntlm;
|
ntlm = proxy?&conn->proxyntlm:&conn->ntlm;
|
||||||
|
|
||||||
/* skip initial whitespaces */
|
/* skip initial whitespaces */
|
||||||
@@ -351,16 +366,14 @@ static void setup_des_key(const unsigned char *key_56,
|
|||||||
DES_set_odd_parity(&key);
|
DES_set_odd_parity(&key);
|
||||||
DES_set_key(&key, ks);
|
DES_set_key(&key, ks);
|
||||||
}
|
}
|
||||||
#elif defined(USE_GNUTLS)
|
|
||||||
|
#else /* defined(USE_SSLEAY) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
|
* Turns a 56 bit key into the 64 bit, odd parity key. Used by GnuTLS and NSS.
|
||||||
*/
|
*/
|
||||||
static void setup_des_key(const unsigned char *key_56,
|
static void extend_key_56_to_64(const unsigned char *key_56, char *key)
|
||||||
gcry_cipher_hd_t *des)
|
|
||||||
{
|
{
|
||||||
char key[8];
|
|
||||||
|
|
||||||
key[0] = key_56[0];
|
key[0] = key_56[0];
|
||||||
key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1));
|
key[1] = (unsigned char)(((key_56[0] << 7) & 0xFF) | (key_56[1] >> 1));
|
||||||
key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2));
|
key[2] = (unsigned char)(((key_56[1] << 6) & 0xFF) | (key_56[2] >> 2));
|
||||||
@@ -369,10 +382,84 @@ static void setup_des_key(const unsigned char *key_56,
|
|||||||
key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5));
|
key[5] = (unsigned char)(((key_56[4] << 3) & 0xFF) | (key_56[5] >> 5));
|
||||||
key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6));
|
key[6] = (unsigned char)(((key_56[5] << 2) & 0xFF) | (key_56[6] >> 6));
|
||||||
key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
|
key[7] = (unsigned char) ((key_56[6] << 1) & 0xFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(USE_GNUTLS)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Turns a 56 bit key into the 64 bit, odd parity key and sets the key.
|
||||||
|
*/
|
||||||
|
static void setup_des_key(const unsigned char *key_56,
|
||||||
|
gcry_cipher_hd_t *des)
|
||||||
|
{
|
||||||
|
char key[8];
|
||||||
|
extend_key_56_to_64(key_56, key);
|
||||||
gcry_cipher_setkey(*des, key, 8);
|
gcry_cipher_setkey(*des, key, 8);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expands a 56 bit key KEY_56 to 64 bit and encrypts 64 bit of data, using
|
||||||
|
* the expanded key. The caller is responsible for giving 64 bit of valid
|
||||||
|
* data is IN and (at least) 64 bit large buffer as OUT.
|
||||||
|
*/
|
||||||
|
static bool encrypt_des(const unsigned char *in, unsigned char *out,
|
||||||
|
const unsigned char *key_56)
|
||||||
|
{
|
||||||
|
const CK_MECHANISM_TYPE mech = CKM_DES_ECB; /* DES cipher in ECB mode */
|
||||||
|
PK11SlotInfo *slot = NULL;
|
||||||
|
char key[8]; /* expanded 64 bit key */
|
||||||
|
SECItem key_item;
|
||||||
|
PK11SymKey *symkey = NULL;
|
||||||
|
SECItem *param = NULL;
|
||||||
|
PK11Context *ctx = NULL;
|
||||||
|
int out_len; /* not used, required by NSS */
|
||||||
|
bool rv = FALSE;
|
||||||
|
|
||||||
|
/* use internal slot for DES encryption (requires NSS to be initialized) */
|
||||||
|
slot = PK11_GetInternalKeySlot();
|
||||||
|
if(!slot)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* expand the 56 bit key to 64 bit and wrap by NSS */
|
||||||
|
extend_key_56_to_64(key_56, key);
|
||||||
|
key_item.data = (unsigned char *)key;
|
||||||
|
key_item.len = /* hard-wired */ 8;
|
||||||
|
symkey = PK11_ImportSymKey(slot, mech, PK11_OriginUnwrap, CKA_ENCRYPT,
|
||||||
|
&key_item, NULL);
|
||||||
|
if(!symkey)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
/* create DES encryption context */
|
||||||
|
param = PK11_ParamFromIV(mech, /* no IV in ECB mode */ NULL);
|
||||||
|
if(!param)
|
||||||
|
goto fail;
|
||||||
|
ctx = PK11_CreateContextBySymKey(mech, CKA_ENCRYPT, symkey, param);
|
||||||
|
if(!ctx)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
/* perform the encryption */
|
||||||
|
if(SECSuccess == PK11_CipherOp(ctx, out, &out_len, /* outbuflen */ 8,
|
||||||
|
(unsigned char *)in, /* inbuflen */ 8)
|
||||||
|
&& SECSuccess == PK11_Finalize(ctx))
|
||||||
|
rv = /* all OK */ TRUE;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
/* cleanup */
|
||||||
|
if(ctx)
|
||||||
|
PK11_DestroyContext(ctx, PR_TRUE);
|
||||||
|
if(symkey)
|
||||||
|
PK11_FreeSymKey(symkey);
|
||||||
|
if(param)
|
||||||
|
SECITEM_FreeItem(param, PR_TRUE);
|
||||||
|
PK11_FreeSlot(slot);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined(USE_NSS) */
|
||||||
|
|
||||||
|
#endif /* defined(USE_SSLEAY) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* takes a 21 byte array and treats it as 3 56-bit DES keys. The
|
* takes a 21 byte array and treats it as 3 56-bit DES keys. The
|
||||||
@@ -414,6 +501,10 @@ static void lm_resp(const unsigned char *keys,
|
|||||||
setup_des_key(keys+14, &des);
|
setup_des_key(keys+14, &des);
|
||||||
gcry_cipher_encrypt(des, results+16, 8, plaintext, 8);
|
gcry_cipher_encrypt(des, results+16, 8, plaintext, 8);
|
||||||
gcry_cipher_close(des);
|
gcry_cipher_close(des);
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
encrypt_des(plaintext, results, keys);
|
||||||
|
encrypt_des(plaintext, results+8, keys+7);
|
||||||
|
encrypt_des(plaintext, results+16, keys+14);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,11 +561,14 @@ static void mk_lm_hash(struct SessionHandle *data,
|
|||||||
setup_des_key(pw+7, &des);
|
setup_des_key(pw+7, &des);
|
||||||
gcry_cipher_encrypt(des, lmbuffer+8, 8, magic, 8);
|
gcry_cipher_encrypt(des, lmbuffer+8, 8, magic, 8);
|
||||||
gcry_cipher_close(des);
|
gcry_cipher_close(des);
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
encrypt_des(magic, lmbuffer, pw);
|
||||||
|
encrypt_des(magic, lmbuffer+8, pw+7);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
memset(lmbuffer + 16, 0, 21 - 16);
|
memset(lmbuffer + 16, 0, 21 - 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_NTRESPONSES
|
#if USE_NTRESPONSES
|
||||||
static void ascii_to_unicode_le(unsigned char *dest, const char *src,
|
static void ascii_to_unicode_le(unsigned char *dest, const char *src,
|
||||||
@@ -525,6 +619,8 @@ static CURLcode mk_nt_hash(struct SessionHandle *data,
|
|||||||
gcry_md_write(MD4pw, pw, 2*len);
|
gcry_md_write(MD4pw, pw, 2*len);
|
||||||
memcpy (ntbuffer, gcry_md_read (MD4pw, 0), MD4_DIGEST_LENGTH);
|
memcpy (ntbuffer, gcry_md_read (MD4pw, 0), MD4_DIGEST_LENGTH);
|
||||||
gcry_md_close(MD4pw);
|
gcry_md_close(MD4pw);
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
Curl_md4it(ntbuffer, pw, 2*len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
memset(ntbuffer + 16, 0, 21 - 16);
|
memset(ntbuffer + 16, 0, 21 - 16);
|
||||||
@@ -599,6 +695,11 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
|
|||||||
DEBUGASSERT(conn);
|
DEBUGASSERT(conn);
|
||||||
DEBUGASSERT(conn->data);
|
DEBUGASSERT(conn->data);
|
||||||
|
|
||||||
|
#ifdef USE_NSS
|
||||||
|
if(CURLE_OK != Curl_nss_force_init(conn->data))
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(proxy) {
|
if(proxy) {
|
||||||
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
allocuserpwd = &conn->allocptr.proxyuserpwd;
|
||||||
userp = conn->proxyuser;
|
userp = conn->proxyuser;
|
||||||
@@ -894,7 +995,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
|
|||||||
user = userp;
|
user = userp;
|
||||||
userlen = strlen(user);
|
userlen = strlen(user);
|
||||||
|
|
||||||
if(gethostname(host, HOSTNAME_MAX)) {
|
if(Curl_gethostname(host, HOSTNAME_MAX)) {
|
||||||
infof(conn->data, "gethostname() failed, continuing without!");
|
infof(conn->data, "gethostname() failed, continuing without!");
|
||||||
hostlen = 0;
|
hostlen = 0;
|
||||||
}
|
}
|
||||||
@@ -926,6 +1027,11 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
|
|||||||
gcry_md_hd_t MD5pw;
|
gcry_md_hd_t MD5pw;
|
||||||
Curl_gtls_seed(conn->data); /* Initiate the seed if not already done */
|
Curl_gtls_seed(conn->data); /* Initiate the seed if not already done */
|
||||||
gcry_randomize(entropy, 8, GCRY_STRONG_RANDOM);
|
gcry_randomize(entropy, 8, GCRY_STRONG_RANDOM);
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
PK11Context *MD5pw;
|
||||||
|
unsigned int outlen;
|
||||||
|
Curl_nss_seed(conn->data); /* Initiate the seed if not already done */
|
||||||
|
PK11_GenerateRandom(entropy, 8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 8 bytes random data as challenge in lmresp */
|
/* 8 bytes random data as challenge in lmresp */
|
||||||
@@ -946,6 +1052,11 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
|
|||||||
gcry_md_write(MD5pw, tmp, MD5_DIGEST_LENGTH);
|
gcry_md_write(MD5pw, tmp, MD5_DIGEST_LENGTH);
|
||||||
memcpy(md5sum, gcry_md_read (MD5pw, 0), MD5_DIGEST_LENGTH);
|
memcpy(md5sum, gcry_md_read (MD5pw, 0), MD5_DIGEST_LENGTH);
|
||||||
gcry_md_close(MD5pw);
|
gcry_md_close(MD5pw);
|
||||||
|
#elif defined(USE_NSS)
|
||||||
|
MD5pw = PK11_CreateDigestContext(SEC_OID_MD5);
|
||||||
|
PK11_DigestOp(MD5pw, tmp, 16);
|
||||||
|
PK11_DigestFinal(MD5pw, md5sum, &outlen, MD5_DIGEST_LENGTH);
|
||||||
|
PK11_DestroyContext(MD5pw, PR_TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* We shall only use the first 8 bytes of md5sum,
|
/* We shall only use the first 8 bytes of md5sum,
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -31,8 +31,8 @@
|
|||||||
/* this must be the last include file */
|
/* this must be the last include file */
|
||||||
#include "memdebug.h"
|
#include "memdebug.h"
|
||||||
|
|
||||||
void
|
static void
|
||||||
Curl_llist_init(struct curl_llist *l, curl_llist_dtor dtor)
|
llist_init(struct curl_llist *l, curl_llist_dtor dtor)
|
||||||
{
|
{
|
||||||
l->size = 0;
|
l->size = 0;
|
||||||
l->dtor = dtor;
|
l->dtor = dtor;
|
||||||
@@ -49,7 +49,7 @@ Curl_llist_alloc(curl_llist_dtor dtor)
|
|||||||
if(NULL == list)
|
if(NULL == list)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
Curl_llist_init(list, dtor);
|
llist_init(list, dtor);
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -43,16 +43,11 @@ struct curl_llist {
|
|||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Curl_llist_init(struct curl_llist *, curl_llist_dtor);
|
|
||||||
struct curl_llist *Curl_llist_alloc(curl_llist_dtor);
|
struct curl_llist *Curl_llist_alloc(curl_llist_dtor);
|
||||||
int Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *,
|
int Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *,
|
||||||
const void *);
|
const void *);
|
||||||
int Curl_llist_insert_prev(struct curl_llist *, struct curl_llist_element *,
|
|
||||||
const void *);
|
|
||||||
int Curl_llist_remove(struct curl_llist *, struct curl_llist_element *,
|
int Curl_llist_remove(struct curl_llist *, struct curl_llist_element *,
|
||||||
void *);
|
void *);
|
||||||
int Curl_llist_remove_next(struct curl_llist *, struct curl_llist_element *,
|
|
||||||
void *);
|
|
||||||
size_t Curl_llist_count(struct curl_llist *);
|
size_t Curl_llist_count(struct curl_llist *);
|
||||||
void Curl_llist_destroy(struct curl_llist *, void *);
|
void Curl_llist_destroy(struct curl_llist *, void *);
|
||||||
int Curl_llist_move(struct curl_llist *, struct curl_llist_element *,
|
int Curl_llist_move(struct curl_llist *, struct curl_llist_element *,
|
||||||
|
281
lib/md4.c
Normal file
281
lib/md4.c
Normal file
@@ -0,0 +1,281 @@
|
|||||||
|
/*-
|
||||||
|
Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
|
||||||
|
|
||||||
|
License to copy and use this software is granted provided that it
|
||||||
|
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
|
||||||
|
Algorithm" in all material mentioning or referencing this software
|
||||||
|
or this function.
|
||||||
|
|
||||||
|
License is also granted to make and use derivative works provided
|
||||||
|
that such works are identified as "derived from the RSA Data
|
||||||
|
Security, Inc. MD4 Message-Digest Algorithm" in all material
|
||||||
|
mentioning or referencing the derived work.
|
||||||
|
|
||||||
|
RSA Data Security, Inc. makes no representations concerning either
|
||||||
|
the merchantability of this software or the suitability of this
|
||||||
|
software for any particular purpose. It is provided "as is"
|
||||||
|
without express or implied warranty of any kind.
|
||||||
|
|
||||||
|
These notices must be retained in any copies of any part of this
|
||||||
|
documentation and/or software.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "setup.h"
|
||||||
|
|
||||||
|
/* NSS crypto library does not provide the MD4 hash algorithm, so that we have
|
||||||
|
* a local implementation of it */
|
||||||
|
#ifdef USE_NSS
|
||||||
|
|
||||||
|
#include "curl_md4.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
typedef unsigned int UINT4;
|
||||||
|
|
||||||
|
typedef struct MD4Context {
|
||||||
|
UINT4 state[4]; /* state (ABCD) */
|
||||||
|
UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
||||||
|
unsigned char buffer[64]; /* input buffer */
|
||||||
|
} MD4_CTX;
|
||||||
|
|
||||||
|
/* Constants for MD4Transform routine.
|
||||||
|
*/
|
||||||
|
#define S11 3
|
||||||
|
#define S12 7
|
||||||
|
#define S13 11
|
||||||
|
#define S14 19
|
||||||
|
#define S21 3
|
||||||
|
#define S22 5
|
||||||
|
#define S23 9
|
||||||
|
#define S24 13
|
||||||
|
#define S31 3
|
||||||
|
#define S32 9
|
||||||
|
#define S33 11
|
||||||
|
#define S34 15
|
||||||
|
|
||||||
|
static void MD4Transform(UINT4 [4], const unsigned char [64]);
|
||||||
|
static void Encode(unsigned char *, UINT4 *, unsigned int);
|
||||||
|
static void Decode(UINT4 *, const unsigned char *, unsigned int);
|
||||||
|
|
||||||
|
static unsigned char PADDING[64] = {
|
||||||
|
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
/* F, G and H are basic MD4 functions.
|
||||||
|
*/
|
||||||
|
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
|
||||||
|
#define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
|
||||||
|
#define H(x, y, z) ((x) ^ (y) ^ (z))
|
||||||
|
|
||||||
|
/* ROTATE_LEFT rotates x left n bits.
|
||||||
|
*/
|
||||||
|
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
|
||||||
|
|
||||||
|
/* FF, GG and HH are transformations for rounds 1, 2 and 3 */
|
||||||
|
/* Rotation is separate from addition to prevent recomputation */
|
||||||
|
#define FF(a, b, c, d, x, s) { \
|
||||||
|
(a) += F ((b), (c), (d)) + (x); \
|
||||||
|
(a) = ROTATE_LEFT ((a), (s)); \
|
||||||
|
}
|
||||||
|
#define GG(a, b, c, d, x, s) { \
|
||||||
|
(a) += G ((b), (c), (d)) + (x) + (UINT4)0x5a827999; \
|
||||||
|
(a) = ROTATE_LEFT ((a), (s)); \
|
||||||
|
}
|
||||||
|
#define HH(a, b, c, d, x, s) { \
|
||||||
|
(a) += H ((b), (c), (d)) + (x) + (UINT4)0x6ed9eba1; \
|
||||||
|
(a) = ROTATE_LEFT ((a), (s)); \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MD4 initialization. Begins an MD4 operation, writing a new context.
|
||||||
|
*/
|
||||||
|
static void MD4Init(MD4_CTX *context)
|
||||||
|
{
|
||||||
|
context->count[0] = context->count[1] = 0;
|
||||||
|
|
||||||
|
/* Load magic initialization constants.
|
||||||
|
*/
|
||||||
|
context->state[0] = 0x67452301;
|
||||||
|
context->state[1] = 0xefcdab89;
|
||||||
|
context->state[2] = 0x98badcfe;
|
||||||
|
context->state[3] = 0x10325476;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MD4 block update operation. Continues an MD4 message-digest
|
||||||
|
operation, processing another message block, and updating the
|
||||||
|
context.
|
||||||
|
*/
|
||||||
|
static void MD4Update(MD4_CTX *context, const unsigned char *input,
|
||||||
|
unsigned int inputLen)
|
||||||
|
{
|
||||||
|
unsigned int i, bufindex, partLen;
|
||||||
|
|
||||||
|
/* Compute number of bytes mod 64 */
|
||||||
|
bufindex = (unsigned int)((context->count[0] >> 3) & 0x3F);
|
||||||
|
/* Update number of bits */
|
||||||
|
if ((context->count[0] += ((UINT4)inputLen << 3))
|
||||||
|
< ((UINT4)inputLen << 3))
|
||||||
|
context->count[1]++;
|
||||||
|
context->count[1] += ((UINT4)inputLen >> 29);
|
||||||
|
|
||||||
|
partLen = 64 - bufindex;
|
||||||
|
/* Transform as many times as possible.
|
||||||
|
*/
|
||||||
|
if (inputLen >= partLen) {
|
||||||
|
memcpy(&context->buffer[bufindex], input, partLen);
|
||||||
|
MD4Transform (context->state, context->buffer);
|
||||||
|
|
||||||
|
for (i = partLen; i + 63 < inputLen; i += 64)
|
||||||
|
MD4Transform (context->state, &input[i]);
|
||||||
|
|
||||||
|
bufindex = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
/* Buffer remaining input */
|
||||||
|
memcpy(&context->buffer[bufindex], &input[i], inputLen-i);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MD4 padding. */
|
||||||
|
static void MD4Pad(MD4_CTX *context)
|
||||||
|
{
|
||||||
|
unsigned char bits[8];
|
||||||
|
unsigned int bufindex, padLen;
|
||||||
|
|
||||||
|
/* Save number of bits */
|
||||||
|
Encode (bits, context->count, 8);
|
||||||
|
|
||||||
|
/* Pad out to 56 mod 64.
|
||||||
|
*/
|
||||||
|
bufindex = (unsigned int)((context->count[0] >> 3) & 0x3f);
|
||||||
|
padLen = (bufindex < 56) ? (56 - bufindex) : (120 - bufindex);
|
||||||
|
MD4Update (context, PADDING, padLen);
|
||||||
|
|
||||||
|
/* Append length (before padding) */
|
||||||
|
MD4Update (context, bits, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MD4 finalization. Ends an MD4 message-digest operation, writing the
|
||||||
|
the message digest and zeroizing the context.
|
||||||
|
*/
|
||||||
|
static void MD4Final (unsigned char digest[16], MD4_CTX *context)
|
||||||
|
{
|
||||||
|
/* Do padding */
|
||||||
|
MD4Pad (context);
|
||||||
|
|
||||||
|
/* Store state in digest */
|
||||||
|
Encode (digest, context->state, 16);
|
||||||
|
|
||||||
|
/* Zeroize sensitive information.
|
||||||
|
*/
|
||||||
|
memset(context, 0, sizeof(*context));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MD4 basic transformation. Transforms state based on block.
|
||||||
|
*/
|
||||||
|
static void MD4Transform (UINT4 state[4], const unsigned char block[64])
|
||||||
|
{
|
||||||
|
UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
|
||||||
|
|
||||||
|
Decode (x, block, 64);
|
||||||
|
|
||||||
|
/* Round 1 */
|
||||||
|
FF (a, b, c, d, x[ 0], S11); /* 1 */
|
||||||
|
FF (d, a, b, c, x[ 1], S12); /* 2 */
|
||||||
|
FF (c, d, a, b, x[ 2], S13); /* 3 */
|
||||||
|
FF (b, c, d, a, x[ 3], S14); /* 4 */
|
||||||
|
FF (a, b, c, d, x[ 4], S11); /* 5 */
|
||||||
|
FF (d, a, b, c, x[ 5], S12); /* 6 */
|
||||||
|
FF (c, d, a, b, x[ 6], S13); /* 7 */
|
||||||
|
FF (b, c, d, a, x[ 7], S14); /* 8 */
|
||||||
|
FF (a, b, c, d, x[ 8], S11); /* 9 */
|
||||||
|
FF (d, a, b, c, x[ 9], S12); /* 10 */
|
||||||
|
FF (c, d, a, b, x[10], S13); /* 11 */
|
||||||
|
FF (b, c, d, a, x[11], S14); /* 12 */
|
||||||
|
FF (a, b, c, d, x[12], S11); /* 13 */
|
||||||
|
FF (d, a, b, c, x[13], S12); /* 14 */
|
||||||
|
FF (c, d, a, b, x[14], S13); /* 15 */
|
||||||
|
FF (b, c, d, a, x[15], S14); /* 16 */
|
||||||
|
|
||||||
|
/* Round 2 */
|
||||||
|
GG (a, b, c, d, x[ 0], S21); /* 17 */
|
||||||
|
GG (d, a, b, c, x[ 4], S22); /* 18 */
|
||||||
|
GG (c, d, a, b, x[ 8], S23); /* 19 */
|
||||||
|
GG (b, c, d, a, x[12], S24); /* 20 */
|
||||||
|
GG (a, b, c, d, x[ 1], S21); /* 21 */
|
||||||
|
GG (d, a, b, c, x[ 5], S22); /* 22 */
|
||||||
|
GG (c, d, a, b, x[ 9], S23); /* 23 */
|
||||||
|
GG (b, c, d, a, x[13], S24); /* 24 */
|
||||||
|
GG (a, b, c, d, x[ 2], S21); /* 25 */
|
||||||
|
GG (d, a, b, c, x[ 6], S22); /* 26 */
|
||||||
|
GG (c, d, a, b, x[10], S23); /* 27 */
|
||||||
|
GG (b, c, d, a, x[14], S24); /* 28 */
|
||||||
|
GG (a, b, c, d, x[ 3], S21); /* 29 */
|
||||||
|
GG (d, a, b, c, x[ 7], S22); /* 30 */
|
||||||
|
GG (c, d, a, b, x[11], S23); /* 31 */
|
||||||
|
GG (b, c, d, a, x[15], S24); /* 32 */
|
||||||
|
|
||||||
|
/* Round 3 */
|
||||||
|
HH (a, b, c, d, x[ 0], S31); /* 33 */
|
||||||
|
HH (d, a, b, c, x[ 8], S32); /* 34 */
|
||||||
|
HH (c, d, a, b, x[ 4], S33); /* 35 */
|
||||||
|
HH (b, c, d, a, x[12], S34); /* 36 */
|
||||||
|
HH (a, b, c, d, x[ 2], S31); /* 37 */
|
||||||
|
HH (d, a, b, c, x[10], S32); /* 38 */
|
||||||
|
HH (c, d, a, b, x[ 6], S33); /* 39 */
|
||||||
|
HH (b, c, d, a, x[14], S34); /* 40 */
|
||||||
|
HH (a, b, c, d, x[ 1], S31); /* 41 */
|
||||||
|
HH (d, a, b, c, x[ 9], S32); /* 42 */
|
||||||
|
HH (c, d, a, b, x[ 5], S33); /* 43 */
|
||||||
|
HH (b, c, d, a, x[13], S34); /* 44 */
|
||||||
|
HH (a, b, c, d, x[ 3], S31); /* 45 */
|
||||||
|
HH (d, a, b, c, x[11], S32); /* 46 */
|
||||||
|
HH (c, d, a, b, x[ 7], S33); /* 47 */
|
||||||
|
HH (b, c, d, a, x[15], S34); /* 48 */
|
||||||
|
|
||||||
|
state[0] += a;
|
||||||
|
state[1] += b;
|
||||||
|
state[2] += c;
|
||||||
|
state[3] += d;
|
||||||
|
|
||||||
|
/* Zeroize sensitive information.
|
||||||
|
*/
|
||||||
|
memset(x, 0, sizeof(x));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
|
||||||
|
a multiple of 4.
|
||||||
|
*/
|
||||||
|
static void Encode(unsigned char *output, UINT4 *input, unsigned int len)
|
||||||
|
{
|
||||||
|
unsigned int i, j;
|
||||||
|
|
||||||
|
for (i = 0, j = 0; j < len; i++, j += 4) {
|
||||||
|
output[j] = (unsigned char)(input[i] & 0xff);
|
||||||
|
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
|
||||||
|
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
|
||||||
|
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
|
||||||
|
a multiple of 4.
|
||||||
|
*/
|
||||||
|
static void Decode (UINT4 *output, const unsigned char *input, unsigned int len)
|
||||||
|
{
|
||||||
|
unsigned int i, j;
|
||||||
|
|
||||||
|
for (i = 0, j = 0; j < len; i++, j += 4)
|
||||||
|
output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
|
||||||
|
(((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len)
|
||||||
|
{
|
||||||
|
MD4_CTX ctx;
|
||||||
|
MD4Init(&ctx);
|
||||||
|
MD4Update(&ctx, input, (unsigned int)len);
|
||||||
|
MD4Final(output, &ctx);
|
||||||
|
}
|
||||||
|
#endif /* USE_NSS */
|
@@ -205,7 +205,7 @@ static void MD5_Update (struct md5_ctx *context, /* context */
|
|||||||
|
|
||||||
/* Transform as many times as possible. */
|
/* Transform as many times as possible. */
|
||||||
if(inputLen >= partLen) {
|
if(inputLen >= partLen) {
|
||||||
memcpy((void *)&context->buffer[bufindex], (void *)input, partLen);
|
memcpy(&context->buffer[bufindex], input, partLen);
|
||||||
MD5Transform(context->state, context->buffer);
|
MD5Transform(context->state, context->buffer);
|
||||||
|
|
||||||
for (i = partLen; i + 63 < inputLen; i += 64)
|
for (i = partLen; i + 63 < inputLen; i += 64)
|
||||||
@@ -217,7 +217,7 @@ static void MD5_Update (struct md5_ctx *context, /* context */
|
|||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
/* Buffer remaining input */
|
/* Buffer remaining input */
|
||||||
memcpy((void *)&context->buffer[bufindex], (void *)&input[i], inputLen-i);
|
memcpy(&context->buffer[bufindex], &input[i], inputLen-i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
|
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
|
||||||
|
@@ -40,7 +40,7 @@ my $url = 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtin
|
|||||||
# If the OpenSSL commandline is not in search path you can configure it here!
|
# If the OpenSSL commandline is not in search path you can configure it here!
|
||||||
my $openssl = 'openssl';
|
my $openssl = 'openssl';
|
||||||
|
|
||||||
my $version = $1 if ('$Revision$' =~ /\s(\d+\.\d+)\s/);
|
my $version = '1.14';
|
||||||
|
|
||||||
getopts('bhilnqtuv');
|
getopts('bhilnqtuv');
|
||||||
|
|
||||||
|
62
lib/multi.c
62
lib/multi.c
@@ -61,7 +61,6 @@
|
|||||||
struct Curl_message {
|
struct Curl_message {
|
||||||
/* the 'CURLMsg' is the part that is visible to the external user */
|
/* the 'CURLMsg' is the part that is visible to the external user */
|
||||||
struct CURLMsg extmsg;
|
struct CURLMsg extmsg;
|
||||||
struct Curl_message *next;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* NOTE: if you add a state here, add the name to the statename[] array as
|
/* NOTE: if you add a state here, add the name to the statename[] array as
|
||||||
@@ -110,12 +109,8 @@ struct Curl_one_easy {
|
|||||||
CURLMstate state; /* the handle's state */
|
CURLMstate state; /* the handle's state */
|
||||||
CURLcode result; /* previous result */
|
CURLcode result; /* previous result */
|
||||||
|
|
||||||
struct Curl_message *msg; /* A pointer to one single posted message.
|
struct Curl_message msg; /* A single posted message. */
|
||||||
Cleanup should be done on this pointer NOT on
|
int msg_stored; /* a message is stored in 'msg' to return */
|
||||||
the linked list in Curl_multi. This message
|
|
||||||
will be deleted when this handle is removed
|
|
||||||
from the multi-handle */
|
|
||||||
int msg_num; /* number of messages left in 'msg' to return */
|
|
||||||
|
|
||||||
/* Array with the plain socket numbers this handle takes care of, in no
|
/* Array with the plain socket numbers this handle takes care of, in no
|
||||||
particular order. Note that all sockets are added to the sockhash, where
|
particular order. Note that all sockets are added to the sockhash, where
|
||||||
@@ -656,6 +651,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||||||
to that since we're not part of that handle anymore */
|
to that since we're not part of that handle anymore */
|
||||||
easy->easy_handle->state.connc = NULL;
|
easy->easy_handle->state.connc = NULL;
|
||||||
|
|
||||||
|
/* Since we return the connection back to the communal connection pool
|
||||||
|
we mark the last connection as inaccessible */
|
||||||
|
easy->easy_handle->state.lastconnect = -1;
|
||||||
|
|
||||||
/* Modify the connectindex since this handle can't point to the
|
/* Modify the connectindex since this handle can't point to the
|
||||||
connection cache anymore.
|
connection cache anymore.
|
||||||
|
|
||||||
@@ -693,8 +692,6 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||||||
|
|
||||||
/* NOTE NOTE NOTE
|
/* NOTE NOTE NOTE
|
||||||
We do not touch the easy handle here! */
|
We do not touch the easy handle here! */
|
||||||
if(easy->msg)
|
|
||||||
free(easy->msg);
|
|
||||||
free(easy);
|
free(easy);
|
||||||
|
|
||||||
multi->num_easy--; /* one less to care about now */
|
multi->num_easy--; /* one less to care about now */
|
||||||
@@ -1307,7 +1304,6 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||||||
|
|
||||||
case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
|
case CURLM_STATE_TOOFAST: /* limit-rate exceeded in either direction */
|
||||||
/* if both rates are within spec, resume transfer */
|
/* if both rates are within spec, resume transfer */
|
||||||
Curl_pgrsUpdate(easy->easy_conn);
|
|
||||||
if( ( ( easy->easy_handle->set.max_send_speed == 0 ) ||
|
if( ( ( easy->easy_handle->set.max_send_speed == 0 ) ||
|
||||||
( easy->easy_handle->progress.ulspeed <
|
( easy->easy_handle->progress.ulspeed <
|
||||||
easy->easy_handle->set.max_send_speed ) ) &&
|
easy->easy_handle->set.max_send_speed ) ) &&
|
||||||
@@ -1528,28 +1524,26 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||||||
|
|
||||||
multistate(easy, CURLM_STATE_COMPLETED);
|
multistate(easy, CURLM_STATE_COMPLETED);
|
||||||
}
|
}
|
||||||
|
/* if there's still a connection to use, call the progress function */
|
||||||
|
else if(easy->easy_conn && Curl_pgrsUpdate(easy->easy_conn))
|
||||||
|
easy->result = CURLE_ABORTED_BY_CALLBACK;
|
||||||
}
|
}
|
||||||
} while(0);
|
} while(0);
|
||||||
if((CURLM_STATE_COMPLETED == easy->state) && !easy->msg) {
|
if((CURLM_STATE_COMPLETED == easy->state) && !easy->msg_stored) {
|
||||||
if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
|
if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
|
||||||
/* clear out the usage of the shared DNS cache */
|
/* clear out the usage of the shared DNS cache */
|
||||||
easy->easy_handle->dns.hostcache = NULL;
|
easy->easy_handle->dns.hostcache = NULL;
|
||||||
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
|
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now add a node to the Curl_message linked list with this info */
|
/* now fill in the Curl_message with this info */
|
||||||
msg = malloc(sizeof(struct Curl_message));
|
msg = &easy->msg;
|
||||||
|
|
||||||
if(!msg)
|
|
||||||
return CURLM_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
msg->extmsg.msg = CURLMSG_DONE;
|
msg->extmsg.msg = CURLMSG_DONE;
|
||||||
msg->extmsg.easy_handle = easy->easy_handle;
|
msg->extmsg.easy_handle = easy->easy_handle;
|
||||||
msg->extmsg.data.result = easy->result;
|
msg->extmsg.data.result = easy->result;
|
||||||
msg->next = NULL;
|
|
||||||
|
|
||||||
easy->msg = msg;
|
easy->msg_stored = 1; /* there is an unread message here */
|
||||||
easy->msg_num = 1; /* there is one unread message here */
|
|
||||||
|
|
||||||
multi->num_msgs++; /* increase message counter */
|
multi->num_msgs++; /* increase message counter */
|
||||||
}
|
}
|
||||||
@@ -1564,6 +1558,7 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
|||||||
struct Curl_one_easy *easy;
|
struct Curl_one_easy *easy;
|
||||||
CURLMcode returncode=CURLM_OK;
|
CURLMcode returncode=CURLM_OK;
|
||||||
struct Curl_tree *t;
|
struct Curl_tree *t;
|
||||||
|
struct timeval now = Curl_tvnow();
|
||||||
|
|
||||||
if(!GOOD_MULTI_HANDLE(multi))
|
if(!GOOD_MULTI_HANDLE(multi))
|
||||||
return CURLM_BAD_HANDLE;
|
return CURLM_BAD_HANDLE;
|
||||||
@@ -1601,10 +1596,13 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
|
|||||||
* Simply remove all expired timers from the splay since handles are dealt
|
* Simply remove all expired timers from the splay since handles are dealt
|
||||||
* with unconditionally by this function and curl_multi_timeout() requires
|
* with unconditionally by this function and curl_multi_timeout() requires
|
||||||
* that already passed/handled expire times are removed from the splay.
|
* that already passed/handled expire times are removed from the splay.
|
||||||
|
*
|
||||||
|
* It is important that the 'now' value is set at the entry of this function
|
||||||
|
* and not for the current time as it may have ticked a little while since
|
||||||
|
* then and then we risk this loop to remove timers that actually have not
|
||||||
|
* been handled!
|
||||||
*/
|
*/
|
||||||
do {
|
do {
|
||||||
struct timeval now = Curl_tvnow();
|
|
||||||
|
|
||||||
multi->timetree = Curl_splaygetbest(now, multi->timetree, &t);
|
multi->timetree = Curl_splaygetbest(now, multi->timetree, &t);
|
||||||
if(t) {
|
if(t) {
|
||||||
struct SessionHandle *d = t->payload;
|
struct SessionHandle *d = t->payload;
|
||||||
@@ -1689,8 +1687,6 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
|
|||||||
|
|
||||||
Curl_easy_addmulti(easy->easy_handle, NULL); /* clear the association */
|
Curl_easy_addmulti(easy->easy_handle, NULL); /* clear the association */
|
||||||
|
|
||||||
if(easy->msg)
|
|
||||||
free(easy->msg);
|
|
||||||
free(easy);
|
free(easy);
|
||||||
easy = nexteasy;
|
easy = nexteasy;
|
||||||
}
|
}
|
||||||
@@ -1717,8 +1713,8 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
|
|||||||
|
|
||||||
easy=multi->easy.next;
|
easy=multi->easy.next;
|
||||||
while(easy != &multi->easy) {
|
while(easy != &multi->easy) {
|
||||||
if(easy->msg_num) {
|
if(easy->msg_stored) {
|
||||||
easy->msg_num--;
|
easy->msg_stored = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
easy = easy->next;
|
easy = easy->next;
|
||||||
@@ -1729,7 +1725,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue)
|
|||||||
multi->num_msgs--;
|
multi->num_msgs--;
|
||||||
*msgs_in_queue = multi->num_msgs;
|
*msgs_in_queue = multi->num_msgs;
|
||||||
|
|
||||||
return &easy->msg->extmsg;
|
return &easy->msg.extmsg;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -2168,7 +2164,9 @@ static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
|
|||||||
struct connectdata *conn)
|
struct connectdata *conn)
|
||||||
{
|
{
|
||||||
size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
|
size_t pipeLen = conn->send_pipe->size + conn->recv_pipe->size;
|
||||||
|
struct curl_llist_element *sendhead = conn->send_pipe->head;
|
||||||
struct curl_llist *pipeline;
|
struct curl_llist *pipeline;
|
||||||
|
CURLcode rc;
|
||||||
|
|
||||||
if(!Curl_isPipeliningEnabled(handle) ||
|
if(!Curl_isPipeliningEnabled(handle) ||
|
||||||
pipeLen == 0)
|
pipeLen == 0)
|
||||||
@@ -2181,7 +2179,17 @@ static CURLcode addHandleToSendOrPendPipeline(struct SessionHandle *handle,
|
|||||||
pipeline = conn->pend_pipe;
|
pipeline = conn->pend_pipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Curl_addHandleToPipeline(handle, pipeline);
|
rc = Curl_addHandleToPipeline(handle, pipeline);
|
||||||
|
|
||||||
|
if (pipeline == conn->send_pipe && sendhead != conn->send_pipe->head) {
|
||||||
|
/* this is a new one as head, expire it */
|
||||||
|
conn->writechannel_inuse = FALSE; /* not in use yet */
|
||||||
|
infof(conn->data, "%p is at send pipe head!\n",
|
||||||
|
conn->send_pipe->head->ptr);
|
||||||
|
Curl_expire(conn->send_pipe->head->ptr, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int checkPendPipeline(struct connectdata *conn)
|
static int checkPendPipeline(struct connectdata *conn)
|
||||||
|
124
lib/nss.c
124
lib/nss.c
@@ -891,6 +891,57 @@ isTLSIntoleranceError(PRInt32 err)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static CURLcode init_nss(struct SessionHandle *data)
|
||||||
|
{
|
||||||
|
char *cert_dir;
|
||||||
|
struct_stat st;
|
||||||
|
if(initialized)
|
||||||
|
return CURLE_OK;
|
||||||
|
|
||||||
|
/* First we check if $SSL_DIR points to a valid dir */
|
||||||
|
cert_dir = getenv("SSL_DIR");
|
||||||
|
if(cert_dir) {
|
||||||
|
if((stat(cert_dir, &st) != 0) ||
|
||||||
|
(!S_ISDIR(st.st_mode))) {
|
||||||
|
cert_dir = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now we check if the default location is a valid dir */
|
||||||
|
if(!cert_dir) {
|
||||||
|
if((stat(SSL_DIR, &st) == 0) &&
|
||||||
|
(S_ISDIR(st.st_mode))) {
|
||||||
|
cert_dir = (char *)SSL_DIR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!NSS_IsInitialized()) {
|
||||||
|
SECStatus rv;
|
||||||
|
initialized = 1;
|
||||||
|
infof(data, "Initializing NSS with certpath: %s\n",
|
||||||
|
cert_dir ? cert_dir : "none");
|
||||||
|
if(!cert_dir) {
|
||||||
|
rv = NSS_NoDB_Init(NULL);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
char *certpath =
|
||||||
|
PR_smprintf("%s%s", NSS_VersionCheck("3.12.0") ? "sql:" : "", cert_dir);
|
||||||
|
rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
|
||||||
|
PR_smprintf_free(certpath);
|
||||||
|
}
|
||||||
|
if(rv != SECSuccess) {
|
||||||
|
infof(data, "Unable to initialize NSS database\n");
|
||||||
|
initialized = 0;
|
||||||
|
return CURLE_SSL_CACERT_BADFILE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(num_enabled_ciphers() == 0)
|
||||||
|
NSS_SetDomesticPolicy();
|
||||||
|
|
||||||
|
return CURLE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global SSL init
|
* Global SSL init
|
||||||
*
|
*
|
||||||
@@ -911,6 +962,21 @@ int Curl_nss_init(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CURLcode Curl_nss_force_init(struct SessionHandle *data)
|
||||||
|
{
|
||||||
|
CURLcode rv;
|
||||||
|
if(!nss_initlock) {
|
||||||
|
failf(data, "unable to initialize NSS, curl_global_init() should have been "
|
||||||
|
"called with CURL_GLOBAL_SSL or CURL_GLOBAL_ALL");
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
PR_Lock(nss_initlock);
|
||||||
|
rv = init_nss(data);
|
||||||
|
PR_Unlock(nss_initlock);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
/* Global cleanup */
|
/* Global cleanup */
|
||||||
void Curl_nss_cleanup(void)
|
void Curl_nss_cleanup(void)
|
||||||
{
|
{
|
||||||
@@ -1039,16 +1105,12 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
|
|||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
curl_socket_t sockfd = conn->sock[sockindex];
|
curl_socket_t sockfd = conn->sock[sockindex];
|
||||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||||
SECStatus rv;
|
|
||||||
char *certDir = NULL;
|
|
||||||
int curlerr;
|
int curlerr;
|
||||||
const int *cipher_to_enable;
|
const int *cipher_to_enable;
|
||||||
PRSocketOptionData sock_opt;
|
PRSocketOptionData sock_opt;
|
||||||
long time_left;
|
long time_left;
|
||||||
PRUint32 timeout;
|
PRUint32 timeout;
|
||||||
|
|
||||||
curlerr = CURLE_SSL_CONNECT_ERROR;
|
|
||||||
|
|
||||||
if (connssl->state == ssl_connection_complete)
|
if (connssl->state == ssl_connection_complete)
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
||||||
@@ -1062,51 +1124,13 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
|
|||||||
|
|
||||||
/* FIXME. NSS doesn't support multiple databases open at the same time. */
|
/* FIXME. NSS doesn't support multiple databases open at the same time. */
|
||||||
PR_Lock(nss_initlock);
|
PR_Lock(nss_initlock);
|
||||||
if(!initialized) {
|
curlerr = init_nss(conn->data);
|
||||||
struct_stat st;
|
if(CURLE_OK != curlerr) {
|
||||||
|
|
||||||
/* First we check if $SSL_DIR points to a valid dir */
|
|
||||||
certDir = getenv("SSL_DIR");
|
|
||||||
if(certDir) {
|
|
||||||
if((stat(certDir, &st) != 0) ||
|
|
||||||
(!S_ISDIR(st.st_mode))) {
|
|
||||||
certDir = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now we check if the default location is a valid dir */
|
|
||||||
if(!certDir) {
|
|
||||||
if((stat(SSL_DIR, &st) == 0) &&
|
|
||||||
(S_ISDIR(st.st_mode))) {
|
|
||||||
certDir = (char *)SSL_DIR;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!NSS_IsInitialized()) {
|
|
||||||
initialized = 1;
|
|
||||||
infof(conn->data, "Initializing NSS with certpath: %s\n",
|
|
||||||
certDir ? certDir : "none");
|
|
||||||
if(!certDir) {
|
|
||||||
rv = NSS_NoDB_Init(NULL);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
char *certpath = PR_smprintf("%s%s",
|
|
||||||
NSS_VersionCheck("3.12.0") ? "sql:" : "",
|
|
||||||
certDir);
|
|
||||||
rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
|
|
||||||
PR_smprintf_free(certpath);
|
|
||||||
}
|
|
||||||
if(rv != SECSuccess) {
|
|
||||||
infof(conn->data, "Unable to initialize NSS database\n");
|
|
||||||
curlerr = CURLE_SSL_CACERT_BADFILE;
|
|
||||||
initialized = 0;
|
|
||||||
PR_Unlock(nss_initlock);
|
PR_Unlock(nss_initlock);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(num_enabled_ciphers() == 0)
|
curlerr = CURLE_SSL_CONNECT_ERROR;
|
||||||
NSS_SetDomesticPolicy();
|
|
||||||
|
|
||||||
#ifdef HAVE_PK11_CREATEGENERICOBJECT
|
#ifdef HAVE_PK11_CREATEGENERICOBJECT
|
||||||
if(!mod) {
|
if(!mod) {
|
||||||
@@ -1130,8 +1154,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
PK11_SetPasswordFunc(nss_get_password);
|
PK11_SetPasswordFunc(nss_get_password);
|
||||||
|
|
||||||
}
|
|
||||||
PR_Unlock(nss_initlock);
|
PR_Unlock(nss_initlock);
|
||||||
|
|
||||||
model = PR_NewTCPSocket();
|
model = PR_NewTCPSocket();
|
||||||
@@ -1448,4 +1470,12 @@ size_t Curl_nss_version(char *buffer, size_t size)
|
|||||||
{
|
{
|
||||||
return snprintf(buffer, size, "NSS/%s", NSS_VERSION);
|
return snprintf(buffer, size, "NSS/%s", NSS_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Curl_nss_seed(struct SessionHandle *data)
|
||||||
|
{
|
||||||
|
/* TODO: implement? */
|
||||||
|
(void) data;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* USE_NSS */
|
#endif /* USE_NSS */
|
||||||
|
@@ -46,6 +46,9 @@ size_t Curl_nss_version(char *buffer, size_t size);
|
|||||||
int Curl_nss_check_cxn(struct connectdata *cxn);
|
int Curl_nss_check_cxn(struct connectdata *cxn);
|
||||||
int Curl_nss_seed(struct SessionHandle *data);
|
int Curl_nss_seed(struct SessionHandle *data);
|
||||||
|
|
||||||
|
/* initialize NSS library if not already */
|
||||||
|
CURLcode Curl_nss_force_init(struct SessionHandle *data);
|
||||||
|
|
||||||
/* API setup for NSS */
|
/* API setup for NSS */
|
||||||
#define curlssl_init Curl_nss_init
|
#define curlssl_init Curl_nss_init
|
||||||
#define curlssl_cleanup Curl_nss_cleanup
|
#define curlssl_cleanup Curl_nss_cleanup
|
||||||
|
@@ -322,7 +322,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd,
|
|||||||
*/
|
*/
|
||||||
DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1));
|
DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1));
|
||||||
memcpy(ptr, pp->cache, pp->cache_size);
|
memcpy(ptr, pp->cache, pp->cache_size);
|
||||||
gotbytes = pp->cache_size;
|
gotbytes = (ssize_t)pp->cache_size;
|
||||||
free(pp->cache); /* free the cache */
|
free(pp->cache); /* free the cache */
|
||||||
pp->cache = NULL; /* clear the pointer */
|
pp->cache = NULL; /* clear the pointer */
|
||||||
pp->cache_size = 0; /* zero the size just in case */
|
pp->cache_size = 0; /* zero the size just in case */
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2007, 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -56,7 +56,7 @@ struct pingpong {
|
|||||||
struct timeval response; /* set to Curl_tvnow() when a command has been sent
|
struct timeval response; /* set to Curl_tvnow() when a command has been sent
|
||||||
off, used to time-out response reading */
|
off, used to time-out response reading */
|
||||||
long response_time; /* When no timeout is given, this is the amount of
|
long response_time; /* When no timeout is given, this is the amount of
|
||||||
seconds we await for a server response. */
|
milliseconds we await for a server response. */
|
||||||
|
|
||||||
struct connectdata *conn; /* points to the connectdata struct that this
|
struct connectdata *conn; /* points to the connectdata struct that this
|
||||||
belongs to */
|
belongs to */
|
||||||
|
@@ -254,8 +254,8 @@ CURLcode Curl_write(struct connectdata *conn,
|
|||||||
bytes_written = conn->send[num](conn, num, mem, len, &curlcode);
|
bytes_written = conn->send[num](conn, num, mem, len, &curlcode);
|
||||||
|
|
||||||
*written = bytes_written;
|
*written = bytes_written;
|
||||||
if(-1 != bytes_written)
|
if(bytes_written >= 0)
|
||||||
/* we completely ignore the curlcode value when -1 is not returned */
|
/* we completely ignore the curlcode value when subzero is not returned */
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
||||||
/* handle CURLE_AGAIN or a send failure */
|
/* handle CURLE_AGAIN or a send failure */
|
||||||
@@ -577,7 +577,7 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */
|
|||||||
}
|
}
|
||||||
|
|
||||||
nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &curlcode);
|
nread = conn->recv[num](conn, num, buffertofill, bytesfromsocket, &curlcode);
|
||||||
if(nread == -1)
|
if(nread < 0)
|
||||||
return curlcode;
|
return curlcode;
|
||||||
|
|
||||||
if(pipelining) {
|
if(pipelining) {
|
||||||
|
14
lib/setup.h
14
lib/setup.h
@@ -356,6 +356,18 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Arg 2 type for gethostname in case it hasn't been defined in config file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GETHOSTNAME_TYPE_ARG2
|
||||||
|
# ifdef USE_WINSOCK
|
||||||
|
# define GETHOSTNAME_TYPE_ARG2 int
|
||||||
|
# else
|
||||||
|
# define GETHOSTNAME_TYPE_ARG2 size_t
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Below we define some functions. They should
|
/* Below we define some functions. They should
|
||||||
|
|
||||||
4. set the SIGALRM signal timeout
|
4. set the SIGALRM signal timeout
|
||||||
@@ -530,7 +542,7 @@ int netware_init(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
|
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
|
||||||
#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || defined(USE_GNUTLS)
|
#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || defined(USE_GNUTLS) || defined(USE_NSS)
|
||||||
#define USE_NTLM
|
#define USE_NTLM
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
24
lib/smtp.c
24
lib/smtp.c
@@ -91,6 +91,7 @@
|
|||||||
#include "curl_base64.h"
|
#include "curl_base64.h"
|
||||||
#include "curl_md5.h"
|
#include "curl_md5.h"
|
||||||
#include "curl_hmac.h"
|
#include "curl_hmac.h"
|
||||||
|
#include "curl_gethostname.h"
|
||||||
|
|
||||||
#define _MPRINTF_REPLACE /* use our functions only */
|
#define _MPRINTF_REPLACE /* use our functions only */
|
||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
@@ -343,7 +344,7 @@ static size_t smtp_auth_plain_data(struct connectdata * conn, char * * outptr)
|
|||||||
plen = strlen(conn->passwd);
|
plen = strlen(conn->passwd);
|
||||||
|
|
||||||
if(2 * ulen + plen + 2 > sizeof plainauth)
|
if(2 * ulen + plen + 2 > sizeof plainauth)
|
||||||
return -1;
|
return 0;
|
||||||
|
|
||||||
memcpy(plainauth, conn->user, ulen);
|
memcpy(plainauth, conn->user, ulen);
|
||||||
plainauth[ulen] = '\0';
|
plainauth[ulen] = '\0';
|
||||||
@@ -361,7 +362,7 @@ static size_t smtp_auth_login_user(struct connectdata * conn, char * * outptr)
|
|||||||
|
|
||||||
if(!ulen) {
|
if(!ulen) {
|
||||||
*outptr = strdup("=");
|
*outptr = strdup("=");
|
||||||
return *outptr? 1: -1;
|
return *outptr? 1: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Curl_base64_encode(conn->data, conn->user, ulen, outptr);
|
return Curl_base64_encode(conn->data, conn->user, ulen, outptr);
|
||||||
@@ -412,7 +413,7 @@ static CURLcode smtp_authenticate(struct connectdata *conn)
|
|||||||
result = CURLE_LOGIN_DENIED; /* Other mechanisms not supported. */
|
result = CURLE_LOGIN_DENIED; /* Other mechanisms not supported. */
|
||||||
|
|
||||||
if(!result) {
|
if(!result) {
|
||||||
if(l <= 0)
|
if(!l)
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
else if(initresp &&
|
else if(initresp &&
|
||||||
l + strlen(mech) <= 512 - 8) { /* AUTH <mech> ...<crlf> */
|
l + strlen(mech) <= 512 - 8) { /* AUTH <mech> ...<crlf> */
|
||||||
@@ -543,7 +544,7 @@ static CURLcode smtp_state_authplain_resp(struct connectdata *conn,
|
|||||||
else {
|
else {
|
||||||
l = smtp_auth_plain_data(conn, &plainauth);
|
l = smtp_auth_plain_data(conn, &plainauth);
|
||||||
|
|
||||||
if(l <= 0)
|
if(!l)
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
else {
|
else {
|
||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth);
|
||||||
@@ -576,7 +577,7 @@ static CURLcode smtp_state_authlogin_resp(struct connectdata *conn,
|
|||||||
else {
|
else {
|
||||||
l = smtp_auth_login_user(conn, &authuser);
|
l = smtp_auth_login_user(conn, &authuser);
|
||||||
|
|
||||||
if(l <= 0)
|
if(!l)
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
else {
|
else {
|
||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser);
|
||||||
@@ -599,7 +600,7 @@ static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
|
|||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
size_t plen;
|
size_t plen;
|
||||||
size_t l;
|
size_t l;
|
||||||
char * authpasswd;
|
char *authpasswd;
|
||||||
|
|
||||||
(void)instate; /* no use for this yet */
|
(void)instate; /* no use for this yet */
|
||||||
|
|
||||||
@@ -615,7 +616,7 @@ static CURLcode smtp_state_authpasswd_resp(struct connectdata *conn,
|
|||||||
else {
|
else {
|
||||||
l = Curl_base64_encode(data, conn->passwd, plen, &authpasswd);
|
l = Curl_base64_encode(data, conn->passwd, plen, &authpasswd);
|
||||||
|
|
||||||
if(l <= 0)
|
if(!l)
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
else {
|
else {
|
||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd);
|
||||||
@@ -706,7 +707,7 @@ static CURLcode smtp_state_authcram_resp(struct connectdata *conn,
|
|||||||
/* Encode it to base64 and send it. */
|
/* Encode it to base64 and send it. */
|
||||||
l = Curl_base64_encode(data, reply, 0, &rplyb64);
|
l = Curl_base64_encode(data, reply, 0, &rplyb64);
|
||||||
|
|
||||||
if(l <= 0)
|
if(!l)
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
result = CURLE_OUT_OF_MEMORY;
|
||||||
else {
|
else {
|
||||||
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
|
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", rplyb64);
|
||||||
@@ -1041,10 +1042,7 @@ static CURLcode smtp_connect(struct connectdata *conn,
|
|||||||
struct pingpong *pp=&smtpc->pp;
|
struct pingpong *pp=&smtpc->pp;
|
||||||
const char *path = conn->data->state.path;
|
const char *path = conn->data->state.path;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
#ifdef HAVE_GETHOSTNAME
|
|
||||||
char localhost[1024 + 1];
|
char localhost[1024 + 1];
|
||||||
#endif
|
|
||||||
|
|
||||||
*done = FALSE; /* default to not done yet */
|
*done = FALSE; /* default to not done yet */
|
||||||
|
|
||||||
@@ -1110,11 +1108,9 @@ static CURLcode smtp_connect(struct connectdata *conn,
|
|||||||
pp->conn = conn;
|
pp->conn = conn;
|
||||||
|
|
||||||
if(!*path) {
|
if(!*path) {
|
||||||
#ifdef HAVE_GETHOSTNAME
|
if(!Curl_gethostname(localhost, sizeof localhost))
|
||||||
if(!gethostname(localhost, sizeof localhost))
|
|
||||||
path = localhost;
|
path = localhost;
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
path = "localhost";
|
path = "localhost";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
lib/ssh.c
18
lib/ssh.c
@@ -485,6 +485,17 @@ static int sshkeycallback(CURL *easy,
|
|||||||
#define SFTP_SEEK(x,y) libssh2_sftp_seek(x, (size_t)y)
|
#define SFTP_SEEK(x,y) libssh2_sftp_seek(x, (size_t)y)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Earlier libssh2 versions didn't do SCP properly beyond 32bit sizes on 32bit
|
||||||
|
* architectures so we check of the necessary function is present.
|
||||||
|
*/
|
||||||
|
#ifndef HAVE_LIBSSH2_SCP_SEND64
|
||||||
|
#define SCP_SEND(a,b,c,d) libssh2_scp_send_ex(a, b, (int)(c), (size_t)d, 0, 0)
|
||||||
|
#else
|
||||||
|
#define SCP_SEND(a,b,c,d) libssh2_scp_send64(a, b, (int)(c), \
|
||||||
|
(libssh2_uint64_t)d, 0, 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ssh_statemach_act() runs the SSH state machine as far as it can without
|
* ssh_statemach_act() runs the SSH state machine as far as it can without
|
||||||
* blocking and without reaching the end. The data the pointer 'block' points
|
* blocking and without reaching the end. The data the pointer 'block' points
|
||||||
@@ -2083,9 +2094,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
|
|||||||
* directory in the path.
|
* directory in the path.
|
||||||
*/
|
*/
|
||||||
sshc->ssh_channel =
|
sshc->ssh_channel =
|
||||||
libssh2_scp_send_ex(sshc->ssh_session, sftp_scp->path,
|
SCP_SEND(sshc->ssh_session, sftp_scp->path, data->set.new_file_perms,
|
||||||
(int)(data->set.new_file_perms),
|
data->set.infilesize);
|
||||||
(size_t)data->set.infilesize, 0, 0);
|
|
||||||
if(!sshc->ssh_channel) {
|
if(!sshc->ssh_channel) {
|
||||||
if(libssh2_session_last_errno(sshc->ssh_session) ==
|
if(libssh2_session_last_errno(sshc->ssh_session) ==
|
||||||
LIBSSH2_ERROR_EAGAIN) {
|
LIBSSH2_ERROR_EAGAIN) {
|
||||||
@@ -2444,7 +2454,7 @@ static CURLcode ssh_easy_statemach(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
/* wait for the socket to become ready */
|
/* wait for the socket to become ready */
|
||||||
Curl_socket_ready(fd_read, fd_write,
|
Curl_socket_ready(fd_read, fd_write,
|
||||||
left>1000?1000:left); /* ignore result */
|
(int)(left>1000?1000:left)); /* ignore result */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
10
lib/ssh.h
10
lib/ssh.h
@@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -151,13 +151,17 @@ struct ssh_conn {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010000)
|
#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010000)
|
||||||
/* libssh2_sftp_seek64() has only ever been provided by libssh2 1.0 or
|
|
||||||
later */
|
|
||||||
# define HAVE_LIBSSH2_SFTP_SEEK64 1
|
# define HAVE_LIBSSH2_SFTP_SEEK64 1
|
||||||
#else
|
#else
|
||||||
# undef HAVE_LIBSSH2_SFTP_SEEK64
|
# undef HAVE_LIBSSH2_SFTP_SEEK64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(LIBSSH2_VERSION_NUM) && (LIBSSH2_VERSION_NUM >= 0x010206)
|
||||||
|
# define HAVE_LIBSSH2_SCP_SEND64 1
|
||||||
|
#else
|
||||||
|
# undef HAVE_LIBSSH2_SCP_SEND64
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern const struct Curl_handler Curl_handler_scp;
|
extern const struct Curl_handler Curl_handler_scp;
|
||||||
extern const struct Curl_handler Curl_handler_sftp;
|
extern const struct Curl_handler Curl_handler_sftp;
|
||||||
|
13
lib/ssluse.c
13
lib/ssluse.c
@@ -2430,15 +2430,14 @@ ossl_connect_common(struct connectdata *conn,
|
|||||||
/* socket is readable or writable */
|
/* socket is readable or writable */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Run transaction, and return to the caller if it failed or if
|
/* Run transaction, and return to the caller if it failed or if this
|
||||||
* this connection is part of a multi handle and this loop would
|
* connection is done nonblocking and this loop would execute again. This
|
||||||
* execute again. This permits the owner of a multi handle to
|
* permits the owner of a multi handle to abort a connection attempt
|
||||||
* abort a connection attempt before step2 has completed while
|
* before step2 has completed while ensuring that a client using select()
|
||||||
* ensuring that a client using select() or epoll() will always
|
* or epoll() will always have a valid fdset to wait on.
|
||||||
* have a valid fdset to wait on.
|
|
||||||
*/
|
*/
|
||||||
retcode = ossl_connect_step2(conn, sockindex);
|
retcode = ossl_connect_step2(conn, sockindex);
|
||||||
if(retcode || (data->state.used_interface == Curl_if_multi &&
|
if(retcode || (nonblocking &&
|
||||||
(ssl_connect_2 == connssl->connecting_state ||
|
(ssl_connect_2 == connssl->connecting_state ||
|
||||||
ssl_connect_2_reading == connssl->connecting_state ||
|
ssl_connect_2_reading == connssl->connecting_state ||
|
||||||
ssl_connect_2_writing == connssl->connecting_state)))
|
ssl_connect_2_writing == connssl->connecting_state)))
|
||||||
|
11
lib/tftp.c
11
lib/tftp.c
@@ -1171,17 +1171,18 @@ static long tftp_state_timeout(struct connectdata *conn, tftp_event_t *event)
|
|||||||
(long)current, (long)state->max_time));
|
(long)current, (long)state->max_time));
|
||||||
state->error = TFTP_ERR_TIMEOUT;
|
state->error = TFTP_ERR_TIMEOUT;
|
||||||
state->state = TFTP_STATE_FIN;
|
state->state = TFTP_STATE_FIN;
|
||||||
return(0);
|
return 0;
|
||||||
}
|
}
|
||||||
else if (current > state->rx_time+state->retry_time) {
|
else if (current > state->rx_time+state->retry_time) {
|
||||||
if (event)
|
if (event)
|
||||||
*event = TFTP_EVENT_TIMEOUT;
|
*event = TFTP_EVENT_TIMEOUT;
|
||||||
time(&state->rx_time); /* update even though we received nothing */
|
time(&state->rx_time); /* update even though we received nothing */
|
||||||
return(state->max_time-current);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return(state->max_time-current);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* there's a typecast below here since 'time_t' may in fact be larger than
|
||||||
|
'long', but we estimate that a 'long' will still be able to hold number
|
||||||
|
of seconds even if "only" 32 bit */
|
||||||
|
return (long) state->max_time-current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -811,6 +811,9 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
|
|||||||
k->keepon &= ~KEEP_SEND; /* disable writing */
|
k->keepon &= ~KEEP_SEND; /* disable writing */
|
||||||
k->start100 = Curl_tvnow(); /* timeout count starts now */
|
k->start100 = Curl_tvnow(); /* timeout count starts now */
|
||||||
*didwhat &= ~KEEP_SEND; /* we didn't write anything actually */
|
*didwhat &= ~KEEP_SEND; /* we didn't write anything actually */
|
||||||
|
|
||||||
|
/* set a timeout for the multi interface */
|
||||||
|
Curl_expire(data, CURL_TIMEOUT_EXPECT_100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2265,6 +2268,9 @@ Curl_setup_transfer(
|
|||||||
/* wait with write until we either got 100-continue or a timeout */
|
/* wait with write until we either got 100-continue or a timeout */
|
||||||
k->exp100 = EXP100_AWAITING_CONTINUE;
|
k->exp100 = EXP100_AWAITING_CONTINUE;
|
||||||
k->start100 = k->start;
|
k->start100 = k->start;
|
||||||
|
|
||||||
|
/* set a timeout for the multi interface */
|
||||||
|
Curl_expire(data, CURL_TIMEOUT_EXPECT_100);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(data->state.expect100header)
|
if(data->state.expect100header)
|
||||||
|
58
lib/url.c
58
lib/url.c
@@ -1404,19 +1404,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
data->set.httpversion = va_arg(param, long);
|
data->set.httpversion = va_arg(param, long);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CURLOPT_CUSTOMREQUEST:
|
|
||||||
/*
|
|
||||||
* Set a custom string to use as request
|
|
||||||
*/
|
|
||||||
result = setstropt(&data->set.str[STRING_CUSTOMREQUEST],
|
|
||||||
va_arg(param, char *));
|
|
||||||
|
|
||||||
/* we don't set
|
|
||||||
data->set.httpreq = HTTPREQ_CUSTOM;
|
|
||||||
here, we continue as if we were using the already set type
|
|
||||||
and this just changes the actual request keyword */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case CURLOPT_HTTPAUTH:
|
case CURLOPT_HTTPAUTH:
|
||||||
/*
|
/*
|
||||||
* Set HTTP Authentication type BITMASK.
|
* Set HTTP Authentication type BITMASK.
|
||||||
@@ -1448,6 +1435,21 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#endif /* CURL_DISABLE_HTTP */
|
||||||
|
|
||||||
|
case CURLOPT_CUSTOMREQUEST:
|
||||||
|
/*
|
||||||
|
* Set a custom string to use as request
|
||||||
|
*/
|
||||||
|
result = setstropt(&data->set.str[STRING_CUSTOMREQUEST],
|
||||||
|
va_arg(param, char *));
|
||||||
|
|
||||||
|
/* we don't set
|
||||||
|
data->set.httpreq = HTTPREQ_CUSTOM;
|
||||||
|
here, we continue as if we were using the already set type
|
||||||
|
and this just changes the actual request keyword */
|
||||||
|
break;
|
||||||
|
|
||||||
#ifndef CURL_DISABLE_PROXY
|
#ifndef CURL_DISABLE_PROXY
|
||||||
case CURLOPT_HTTPPROXYTUNNEL:
|
case CURLOPT_HTTPPROXYTUNNEL:
|
||||||
/*
|
/*
|
||||||
@@ -1492,7 +1494,6 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
data->set.proxyauth = auth;
|
data->set.proxyauth = auth;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* CURL_DISABLE_HTTP */
|
|
||||||
|
|
||||||
case CURLOPT_PROXY:
|
case CURLOPT_PROXY:
|
||||||
/*
|
/*
|
||||||
@@ -1532,7 +1533,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif /* CURL_DISABLE_PROXY */
|
||||||
|
|
||||||
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
|
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
|
||||||
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
|
case CURLOPT_SOCKS5_GSSAPI_SERVICE:
|
||||||
@@ -3126,7 +3127,7 @@ ConnectionStore(struct SessionHandle *data,
|
|||||||
/* after a TCP connection to the proxy has been verified, this function does
|
/* after a TCP connection to the proxy has been verified, this function does
|
||||||
the next magic step.
|
the next magic step.
|
||||||
|
|
||||||
Note: this function (and its sub-functions) calls failf()
|
Note: this function's sub-functions call failf()
|
||||||
|
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_connected_proxy(struct connectdata *conn)
|
CURLcode Curl_connected_proxy(struct connectdata *conn)
|
||||||
@@ -3134,12 +3135,6 @@ CURLcode Curl_connected_proxy(struct connectdata *conn)
|
|||||||
CURLcode result = CURLE_OK;
|
CURLcode result = CURLE_OK;
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
|
|
||||||
if(conn->bits.tcpconnect)
|
|
||||||
/* allow this to get called again from the multi interface when TCP is
|
|
||||||
found connected in the state machine, even though it has already been
|
|
||||||
called if the connection happened "instantly" */
|
|
||||||
return CURLE_OK;
|
|
||||||
|
|
||||||
switch(data->set.proxytype) {
|
switch(data->set.proxytype) {
|
||||||
#ifndef CURL_DISABLE_PROXY
|
#ifndef CURL_DISABLE_PROXY
|
||||||
case CURLPROXY_SOCKS5:
|
case CURLPROXY_SOCKS5:
|
||||||
@@ -4264,18 +4259,23 @@ static CURLcode parse_remote_port(struct SessionHandle *data,
|
|||||||
if(conn->bits.httpproxy) {
|
if(conn->bits.httpproxy) {
|
||||||
/* we need to create new URL with the new port number */
|
/* we need to create new URL with the new port number */
|
||||||
char *url;
|
char *url;
|
||||||
/* FTPS connections have the FTP bit set too, so they match as well */
|
char type[12]="";
|
||||||
bool isftp = (bool)(0 != (conn->protocol & PROT_FTP));
|
|
||||||
|
if(conn->bits.type_set)
|
||||||
|
snprintf(type, sizeof(type), ";type=%c",
|
||||||
|
data->set.prefer_ascii?'A':
|
||||||
|
(data->set.ftp_list_only?'D':'I'));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This synthesized URL isn't always right--suffixes like ;type=A
|
* This synthesized URL isn't always right--suffixes like ;type=A are
|
||||||
* are stripped off. It would be better to work directly from the
|
* stripped off. It would be better to work directly from the original
|
||||||
* original URL and simply replace the port part of it.
|
* URL and simply replace the port part of it.
|
||||||
*/
|
*/
|
||||||
url = aprintf("%s://%s%s%s:%hu%s%s", conn->handler->scheme,
|
url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->handler->scheme,
|
||||||
conn->bits.ipv6_ip?"[":"", conn->host.name,
|
conn->bits.ipv6_ip?"[":"", conn->host.name,
|
||||||
conn->bits.ipv6_ip?"]":"", conn->remote_port,
|
conn->bits.ipv6_ip?"]":"", conn->remote_port,
|
||||||
isftp?"/":"", data->state.path);
|
data->state.slash_removed?"/":"", data->state.path,
|
||||||
|
type);
|
||||||
if(!url)
|
if(!url)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
|
||||||
|
@@ -418,6 +418,7 @@ struct ConnectBits {
|
|||||||
that libcurl should reconnect and continue. */
|
that libcurl should reconnect and continue. */
|
||||||
bool bound; /* set true if bind() has already been done on this socket/
|
bool bound; /* set true if bind() has already been done on this socket/
|
||||||
connection */
|
connection */
|
||||||
|
bool type_set; /* type= was used in the URL */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hostname {
|
struct hostname {
|
||||||
@@ -1127,7 +1128,8 @@ struct UrlState {
|
|||||||
char *pathbuffer;/* allocated buffer to store the URL's path part in */
|
char *pathbuffer;/* allocated buffer to store the URL's path part in */
|
||||||
char *path; /* path to use, points to somewhere within the pathbuffer
|
char *path; /* path to use, points to somewhere within the pathbuffer
|
||||||
area */
|
area */
|
||||||
|
bool slash_removed; /* set TRUE if the 'path' points to a path where the
|
||||||
|
initial URL slash separator has been taken off */
|
||||||
bool use_range;
|
bool use_range;
|
||||||
bool rangestringalloc; /* the range string is malloc()'ed */
|
bool rangestringalloc; /* the range string is malloc()'ed */
|
||||||
|
|
||||||
|
82
log2changes.pl
Executable file
82
log2changes.pl
Executable file
@@ -0,0 +1,82 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# git log --pretty=fuller --no-color --date=short --decorate=full
|
||||||
|
|
||||||
|
my @mname = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
||||||
|
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
|
||||||
|
|
||||||
|
sub nicedate {
|
||||||
|
my ($date)=$_;
|
||||||
|
|
||||||
|
if($date =~ /(\d\d\d\d)-(\d\d)-(\d\d)/) {
|
||||||
|
return sprintf("%d %s %4d", $3, $mname[$2-1], $1);
|
||||||
|
}
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
|
||||||
|
print
|
||||||
|
' _ _ ____ _
|
||||||
|
___| | | | _ \| |
|
||||||
|
/ __| | | | |_) | |
|
||||||
|
| (__| |_| | _ <| |___
|
||||||
|
\___|\___/|_| \_\_____|
|
||||||
|
|
||||||
|
Changelog
|
||||||
|
';
|
||||||
|
|
||||||
|
my $line;
|
||||||
|
my $tag;
|
||||||
|
while(<STDIN>) {
|
||||||
|
my $l = $_;
|
||||||
|
|
||||||
|
if($l =~/^commit ([[:xdigit:]]*) ?(.*)/) {
|
||||||
|
$co = $1;
|
||||||
|
my $ref = $2;
|
||||||
|
if ($ref =~ /refs\/tags\/curl-([0-9_]*)/) {
|
||||||
|
$tag = $1;
|
||||||
|
$tag =~ tr/_/./;
|
||||||
|
} else {
|
||||||
|
$tag = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elsif($l =~ /^Author: *(.*) +</) {
|
||||||
|
$a = $1;
|
||||||
|
}
|
||||||
|
elsif($l =~ /^Commit: *(.*) +</) {
|
||||||
|
$c = $1;
|
||||||
|
}
|
||||||
|
elsif($l =~ /^CommitDate: (.*)/) {
|
||||||
|
$date = nicedate($1);
|
||||||
|
}
|
||||||
|
elsif($l =~ /^( )(.*)/) {
|
||||||
|
my $extra;
|
||||||
|
if ($tag) {
|
||||||
|
# Version entries have a special format
|
||||||
|
print "\nVersion " . $tag." ($date)\n";
|
||||||
|
$oldc = "";
|
||||||
|
}
|
||||||
|
if($a ne $c) {
|
||||||
|
$extra=sprintf("\n- [%s brought this change]\n\n ", $a);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$extra="\n- ";
|
||||||
|
}
|
||||||
|
if($co ne $oldco) {
|
||||||
|
if($c ne $oldc) {
|
||||||
|
print "\n$c ($date)$extra";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print "$extra";
|
||||||
|
}
|
||||||
|
$line =0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$oldco = $co;
|
||||||
|
$oldc = $c;
|
||||||
|
$olddate = $date;
|
||||||
|
if($line++) {
|
||||||
|
print " ";
|
||||||
|
}
|
||||||
|
print $2."\n";
|
||||||
|
}
|
||||||
|
}
|
@@ -21,12 +21,12 @@
|
|||||||
#***************************************************************************
|
#***************************************************************************
|
||||||
|
|
||||||
# File version for 'aclocal' use. Keep it a single number.
|
# File version for 'aclocal' use. Keep it a single number.
|
||||||
# serial 12
|
# serial 13
|
||||||
|
|
||||||
dnl CURL_CHECK_OPTION_THREADED_RESOLVER
|
dnl CURL_CHECK_OPTION_THREADED_RESOLVER
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verify if configure has been invoked with option
|
dnl Verify if configure has been invoked with option
|
||||||
dnl --enable-threaded-resolver or --disable-threaded-resover, and
|
dnl --enable-threaded-resolver or --disable-threaded-resolver, and
|
||||||
dnl set shell variable want_thres as appropriate.
|
dnl set shell variable want_thres as appropriate.
|
||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_OPTION_THREADED_RESOLVER], [
|
AC_DEFUN([CURL_CHECK_OPTION_THREADED_RESOLVER], [
|
||||||
@@ -34,7 +34,7 @@ AC_DEFUN([CURL_CHECK_OPTION_THREADED_RESOLVER], [
|
|||||||
OPT_THRES="default"
|
OPT_THRES="default"
|
||||||
AC_ARG_ENABLE(threaded_resolver,
|
AC_ARG_ENABLE(threaded_resolver,
|
||||||
AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver])
|
AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver])
|
||||||
AC_HELP_STRING([--disable-threaded-resover],[Disable threaded resolver]),
|
AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]),
|
||||||
OPT_THRES=$enableval)
|
OPT_THRES=$enableval)
|
||||||
case "$OPT_THRES" in
|
case "$OPT_THRES" in
|
||||||
yes)
|
yes)
|
||||||
@@ -314,6 +314,7 @@ dnl shell variable want_warnings as appropriate.
|
|||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_OPTION_WARNINGS], [
|
AC_DEFUN([CURL_CHECK_OPTION_WARNINGS], [
|
||||||
AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
|
AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
|
||||||
|
AC_BEFORE([$0],[CURL_CHECK_OPTION_WERROR])dnl
|
||||||
AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
|
AC_BEFORE([$0],[CURL_CHECK_PROG_CC])dnl
|
||||||
AC_MSG_CHECKING([whether to enable strict compiler warnings])
|
AC_MSG_CHECKING([whether to enable strict compiler warnings])
|
||||||
OPT_COMPILER_WARNINGS="default"
|
OPT_COMPILER_WARNINGS="default"
|
||||||
@@ -339,6 +340,37 @@ AC_HELP_STRING([--disable-warnings],[Disable strict compiler warnings]),
|
|||||||
AC_MSG_RESULT([$want_warnings])
|
AC_MSG_RESULT([$want_warnings])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl CURL_CHECK_OPTION_WERROR
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Verify if configure has been invoked with option
|
||||||
|
dnl --enable-werror or --disable-werror, and set
|
||||||
|
dnl shell variable want_werror as appropriate.
|
||||||
|
|
||||||
|
AC_DEFUN([CURL_CHECK_OPTION_WERROR], [
|
||||||
|
AC_BEFORE([$0],[CURL_CHECK_COMPILER])dnl
|
||||||
|
AC_MSG_CHECKING([whether to enable compiler warnings as errors])
|
||||||
|
OPT_COMPILER_WERROR="default"
|
||||||
|
AC_ARG_ENABLE(werror,
|
||||||
|
AC_HELP_STRING([--enable-werror],[Enable compiler warnings as errors])
|
||||||
|
AC_HELP_STRING([--disable-werror],[Disable compiler warnings as errors]),
|
||||||
|
OPT_COMPILER_WERROR=$enableval)
|
||||||
|
case "$OPT_COMPILER_WERROR" in
|
||||||
|
no)
|
||||||
|
dnl --disable-werror option used
|
||||||
|
want_werror="no"
|
||||||
|
;;
|
||||||
|
default)
|
||||||
|
dnl configure option not specified
|
||||||
|
want_werror="no"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
dnl --enable-werror option used
|
||||||
|
want_werror="yes"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$want_werror])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl CURL_CHECK_NONBLOCKING_SOCKET
|
dnl CURL_CHECK_NONBLOCKING_SOCKET
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
|
3
maketgz
3
maketgz
@@ -126,6 +126,9 @@ make -s html
|
|||||||
echo "make pdf"
|
echo "make pdf"
|
||||||
make -s pdf
|
make -s pdf
|
||||||
|
|
||||||
|
echo "produce CHANGES"
|
||||||
|
git log --pretty=fuller --no-color --date=short --decorate=full -1000 | ./log2changes.pl > CHANGES.dist
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Now run make dist to generate a tar.gz archive
|
# Now run make dist to generate a tar.gz archive
|
||||||
|
@@ -34,7 +34,8 @@ SOURCE \
|
|||||||
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
|
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
|
||||||
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c \
|
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c \
|
||||||
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c warnless.c \
|
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c warnless.c \
|
||||||
curl_threads.c hmac.c polarssl.c curl_rtmp.c openldap.c
|
curl_threads.c hmac.c polarssl.c curl_rtmp.c openldap.c md4.c \
|
||||||
|
curl_gethostname.c
|
||||||
|
|
||||||
USERINCLUDE ../../../lib ../../../include/curl
|
USERINCLUDE ../../../lib ../../../include/curl
|
||||||
#ifdef ENABLE_SSL
|
#ifdef ENABLE_SSL
|
||||||
|
@@ -36,6 +36,7 @@ C_SRC += content_encoding.c
|
|||||||
C_SRC += cookie.c
|
C_SRC += cookie.c
|
||||||
C_SRC += curl_addrinfo.c
|
C_SRC += curl_addrinfo.c
|
||||||
C_SRC += curl_fnmatch.c
|
C_SRC += curl_fnmatch.c
|
||||||
|
C_SRC += curl_gethostname.c
|
||||||
C_SRC += curl_memrchr.c
|
C_SRC += curl_memrchr.c
|
||||||
C_SRC += curl_rand.c
|
C_SRC += curl_rand.c
|
||||||
C_SRC += curl_rtmp.c
|
C_SRC += curl_rtmp.c
|
||||||
@@ -74,6 +75,7 @@ C_SRC += krb4.c
|
|||||||
C_SRC += krb5.c
|
C_SRC += krb5.c
|
||||||
C_SRC += ldap.c
|
C_SRC += ldap.c
|
||||||
C_SRC += llist.c
|
C_SRC += llist.c
|
||||||
|
C_SRC += md4.c
|
||||||
C_SRC += md5.c
|
C_SRC += md5.c
|
||||||
C_SRC += memdebug.c
|
C_SRC += memdebug.c
|
||||||
C_SRC += mprintf.c
|
C_SRC += mprintf.c
|
||||||
|
@@ -21,7 +21,7 @@ add_executable(
|
|||||||
)
|
)
|
||||||
|
|
||||||
source_group("cURLX source files" FILES ${CURLX_ONES})
|
source_group("cURLX source files" FILES ${CURLX_ONES})
|
||||||
source_group("cURL source files" FILES ${CURL_SOURCES})
|
source_group("cURL source files" FILES ${CURL_CFILES})
|
||||||
source_group("cURL header files" FILES ${CURL_HFILES})
|
source_group("cURL header files" FILES ${CURL_HFILES})
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@@ -3,22 +3,105 @@
|
|||||||
# G. Vanem <gvanem@broadpark.no>
|
# G. Vanem <gvanem@broadpark.no>
|
||||||
#
|
#
|
||||||
|
|
||||||
CC = wcc386
|
!ifndef %watcom
|
||||||
|
!error WATCOM environment variable not set!
|
||||||
|
!else
|
||||||
|
SYS_INCL = -I$(%watcom)\h\nt -I$(%watcom)\h
|
||||||
|
SYS_LIBS = $(%watcom)\lib386\nt;$(%watcom)\lib386
|
||||||
|
!endif
|
||||||
|
|
||||||
CFLAGS = -3r -mf -d3 -hc -zff -zgf -zq -zm -s -fr=con -w2 -fpi -oilrtfm &
|
!ifdef %libname
|
||||||
-bt=nt -d+ -dWIN32 -dHAVE_STRTOLL -dDEBUGBUILD -dENABLE_IPV6 &
|
LIBNAME = $(%libname)
|
||||||
-dHAVE_WINSOCK2_H -I..\include -I..\lib
|
!else
|
||||||
|
LIBNAME = libcurl
|
||||||
|
!endif
|
||||||
|
TARGETS = $(LIBNAME).dll $(LIBNAME)_imp.lib $(LIBNAME).lib
|
||||||
|
|
||||||
|
CC = wcc386
|
||||||
|
LD = wlink
|
||||||
|
AR = wlib
|
||||||
|
RC = wrc
|
||||||
|
|
||||||
|
!ifdef __LOADDLL__
|
||||||
|
! loaddll wcc386 wccd386
|
||||||
|
! loaddll wpp386 wppd386
|
||||||
|
! loaddll wlib wlibd
|
||||||
|
! if $(__VERSION__) > 1270
|
||||||
|
! loaddll wlink wlinkd
|
||||||
|
! else
|
||||||
|
! loaddll wlink wlink
|
||||||
|
! endif
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!if $(__VERSION__) < 1250
|
||||||
|
RM = del /q /f >NUL 2>&1
|
||||||
|
!else
|
||||||
|
RM = rm -f
|
||||||
|
!endif
|
||||||
|
MD = mkdir
|
||||||
|
RD = rmdir /q /s >NUL 2>&1
|
||||||
|
CP = copy
|
||||||
|
|
||||||
|
CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -s -fr=con -w2 -fpi -oilrtfm &
|
||||||
|
-wcd=201 -bt=nt -bc -d+ -dWIN32 -dHAVE_STRTOLL &
|
||||||
|
-I..\include -I..\lib $(SYS_INCL)
|
||||||
|
|
||||||
|
!ifdef %debug
|
||||||
|
DEBUG = -dDEBUG=1 -dDEBUGBUILD
|
||||||
|
CFLAGS += -d3 $(DEBUG)
|
||||||
|
!else
|
||||||
|
CFLAGS += -d0
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %use_ipv6
|
||||||
|
CFLAGS += -d_WIN32_WINNT=0x0501 -dENABLE_IPV6
|
||||||
|
!endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Change to suite.
|
||||||
|
#
|
||||||
|
!ifdef %zlib_root
|
||||||
|
ZLIB_ROOT = $(%zlib_root)
|
||||||
|
!else
|
||||||
|
ZLIB_ROOT = ..\..\zlib-1.2.5
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %openssl_root
|
||||||
|
OPENSSL_ROOT = $(%openssl_root)
|
||||||
|
!else
|
||||||
|
OPENSSL_ROOT = ..\..\openssl-0.9.8o
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %ares_root
|
||||||
|
ARES_ROOT = $(%ares_root)
|
||||||
|
!else
|
||||||
|
ARES_ROOT = ..\ares
|
||||||
|
!endif
|
||||||
|
|
||||||
|
!ifdef %use_ssl
|
||||||
|
CFLAGS += -wcd=138 -dUSE_OPENSSL -dUSE_SSLEAY -I$(OPENSSL_ROOT)\inc32
|
||||||
|
!endif
|
||||||
|
|
||||||
OBJ_DIR = WC_Win32.obj
|
OBJ_DIR = WC_Win32.obj
|
||||||
|
LINK_ARG = $(OBJ_DIR)\wlink.arg
|
||||||
|
|
||||||
# Unfortunately, we can't include Makefile.inc here because wmake doesn't
|
# In order to process Makefile.inc wmake must be called with -u switch!
|
||||||
# use backslash as the line continuation character by default
|
!ifndef %MAKEFLAGS
|
||||||
CURL_SOURCES = main.c hugehelp.c urlglob.c writeout.c writeenv.c &
|
!error You MUST call wmake with the -u switch!
|
||||||
getpass.c homedir.c curlutil.c os-specific.c
|
!else
|
||||||
|
!include Makefile.inc
|
||||||
|
!endif
|
||||||
|
# For now we still define the CURLX_ONES sources here unless we know how
|
||||||
|
# to split off the prefixed path.
|
||||||
|
CURLX_SOURCES = rawstr.c nonblock.c
|
||||||
|
|
||||||
CURLX_SOURCES = rawstr.c
|
OBJS = $(CURL_CFILES:.c=.obj)
|
||||||
|
!ifdef %curl_static
|
||||||
OBJS = $(CURL_SOURCES:.c=.obj) $(CURLX_SOURCES:.c=.obj)
|
CFLAGS += -DCURL_STATICLIB
|
||||||
|
!else
|
||||||
|
CFLAGS += -br
|
||||||
|
OBJS += $(CURLX_SOURCES:.c=.obj)
|
||||||
|
!endif
|
||||||
OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
|
OBJS = $OBJ_DIR\$(OBJS: = $OBJ_DIR\)
|
||||||
|
|
||||||
RESOURCE = $(OBJ_DIR)\curl.res
|
RESOURCE = $(OBJ_DIR)\curl.res
|
||||||
@@ -26,104 +109,64 @@ RESOURCE = $(OBJ_DIR)\curl.res
|
|||||||
all: hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
|
all: hugehelp.c $(OBJ_DIR) curl.exe .SYMBOLIC
|
||||||
@echo Welcome to cURL
|
@echo Welcome to cURL
|
||||||
|
|
||||||
hugehelp.c: hugehelp.c.cvs
|
|
||||||
copy hugehelp.c.cvs hugehelp.c
|
|
||||||
|
|
||||||
$(OBJ_DIR):
|
|
||||||
mkdir $(OBJ_DIR)
|
|
||||||
|
|
||||||
curl.exe: $(OBJS) $(RESOURCE)
|
|
||||||
wlink name $@ system nt file { $(OBJS) } &
|
|
||||||
option quiet, map, caseexact, eliminate, res=$(RESOURCE) &
|
|
||||||
libpath $(%watcom)\lib386;$(%watcom)\lib386\nt &
|
|
||||||
library ..\lib\libcurl_wc_imp.lib, clib3r.lib, ws2_32.lib
|
|
||||||
|
|
||||||
clean: .SYMBOLIC
|
clean: .SYMBOLIC
|
||||||
- rm -f $(OBJS) $(RESOURCE)
|
-$(RM) $(OBJS)
|
||||||
|
-$(RM) $(RESOURCE) $(LINK_ARG)
|
||||||
|
|
||||||
vclean realclean: clean .SYMBOLIC
|
vclean realclean: clean .SYMBOLIC
|
||||||
- rm -f curl.exe curl.map hugehelp.c
|
-$(RD) $(OBJ_DIR)
|
||||||
- rmdir $(OBJ_DIR)
|
-$(RM) curl.exe curl.map curl.sym hugehelp.c
|
||||||
|
|
||||||
|
hugehelp.c: hugehelp.c.cvs
|
||||||
|
$(CP) $[@ $^@
|
||||||
|
|
||||||
|
hugehelp.c.cvs: .EXISTSONLY
|
||||||
|
$(CP) hugehelp.c $^@
|
||||||
|
|
||||||
|
$(OBJ_DIR):
|
||||||
|
-$(MD) $^@
|
||||||
|
|
||||||
|
curl.exe: $(OBJS) $(RESOURCE) $(LINK_ARG)
|
||||||
|
$(LD) name $^@ @$]@
|
||||||
|
|
||||||
$(RESOURCE): curl.rc
|
$(RESOURCE): curl.rc
|
||||||
wrc -dDEBUGBUILD=1 -q -r -zm -I..\include -fo=$@ curl.rc
|
$(RC) $(DEBUG) -q -r -zm -I..\include $(SYS_INCL) $[@ -fo=$^@
|
||||||
|
|
||||||
|
# suffix search path - vpath-like hack
|
||||||
|
.c: ..\lib
|
||||||
|
|
||||||
.ERASE
|
.ERASE
|
||||||
.c{$(OBJ_DIR)}.obj:
|
.c{$(OBJ_DIR)}.obj:
|
||||||
$(CC) $[@ $(CFLAGS) -fo=$@
|
$(CC) $(CFLAGS) $[@ -fo=$^@
|
||||||
|
|
||||||
.ERASE
|
$(LINK_ARG): $(__MAKEFILES__)
|
||||||
$(OBJ_DIR)\rawstr.obj: ..\lib\rawstr.c
|
%create $^@
|
||||||
$(CC) $[@ $(CFLAGS) -fo=$@
|
@%append $^@ system nt
|
||||||
|
@%append $^@ file { $(OBJS) }
|
||||||
|
!ifdef %debug
|
||||||
|
@%append $^@ debug all
|
||||||
|
@%append $^@ option symfile
|
||||||
|
!endif
|
||||||
|
@%append $^@ option quiet, map, caseexact, eliminate,
|
||||||
|
@%append $^@ res=$(RESOURCE) libpath $(SYS_LIBS)
|
||||||
|
!ifdef %curl_static
|
||||||
|
@%append $^@ library wldap32.lib
|
||||||
|
@%append $^@ library ..\lib\$(LIBNAME).lib
|
||||||
|
!ifdef %use_zlib
|
||||||
|
@%append $^@ library $(ZLIB_ROOT)\zlib.lib
|
||||||
|
!endif
|
||||||
|
!ifdef %use_ssl
|
||||||
|
@%append $^@ library $(OPENSSL_ROOT)\out32\libeay32.lib, $(OPENSSL_ROOT)\out32\ssleay32.lib
|
||||||
|
!endif
|
||||||
|
!ifdef %use_ares
|
||||||
|
@%append $^@ library $(ARES_ROOT)\cares.lib
|
||||||
|
!endif
|
||||||
|
!else
|
||||||
|
@%append $^@ library ..\lib\$(LIBNAME)_imp.lib
|
||||||
|
!endif
|
||||||
|
!ifeq USE_WATT32 1
|
||||||
|
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
|
||||||
|
!else
|
||||||
|
@%append $^@ library ws2_32.lib
|
||||||
|
!endif
|
||||||
|
|
||||||
.ERASE
|
|
||||||
$(OBJ_DIR)\nonblock.obj: ..\lib\nonblock.c
|
|
||||||
$(CC) $[@ $(CFLAGS) -fo=$@
|
|
||||||
|
|
||||||
#
|
|
||||||
# Dependencies based on "gcc -MM .."
|
|
||||||
#
|
|
||||||
$(OBJ_DIR)\getpass.obj: getpass.c setup.h config-win32.h ..\lib\setup_once.h getpass.h &
|
|
||||||
..\lib\memdebug.h ..\lib\setup.h ..\lib\config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\homedir.obj: homedir.c setup.h config-win32.h ..\lib\setup_once.h homedir.h &
|
|
||||||
..\lib\memdebug.h ..\lib\setup.h ..\lib\config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlrules.h ..\include\curl\easy.h &
|
|
||||||
..\include\curl\multi.h ..\include\curl\curl.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\hugehelp.obj: hugehelp.c
|
|
||||||
|
|
||||||
$(OBJ_DIR)\main.obj: main.c setup.h config-win32.h ..\lib\setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
urlglob.h writeout.h getpass.h homedir.h curlutil.h hugehelp.h &
|
|
||||||
version.h ..\include\curl\curlver.h ..\lib\curlx.h &
|
|
||||||
..\include\curl\mprintf.h ..\lib\strequal.h ..\lib\strtoofft.h &
|
|
||||||
..\lib\setup.h ..\lib\config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h ..\lib\timeval.h ..\lib\memdebug.h &
|
|
||||||
os-specific.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\urlglob.obj: urlglob.c setup.h config-win32.h ..\lib\setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\mprintf.h urlglob.h ..\lib\memdebug.h ..\lib\setup.h &
|
|
||||||
..\lib\config-win32.h ..\include\curl\curlbuild.h &
|
|
||||||
..\include\curl\curlrules.h os-specific.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\writeenv.obj: writeenv.c setup.h config-win32.h ..\lib\setup_once.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\writeout.obj: writeout.c setup.h config-win32.h ..\lib\setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
..\include\curl\mprintf.h writeout.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\curlutil.obj: curlutil.c setup.h config-win32.h ..\lib\setup_once.h &
|
|
||||||
curlutil.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\os-specific.obj: os-specific.c os-specific.h setup.h config-win32.h &
|
|
||||||
..\lib\setup_once.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\rawstr.obj: ..\lib\rawstr.c ..\lib\setup.h ..\lib\config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h ..\lib\setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
..\lib\strerror.h ..\lib\urldata.h ..\lib\cookie.h ..\lib\formdata.h &
|
|
||||||
..\lib\timeval.h ..\lib\http_chunks.h ..\lib\hostip.h ..\lib\hash.h &
|
|
||||||
..\lib\llist.h ..\lib\splay.h ..\include\curl\mprintf.h
|
|
||||||
|
|
||||||
$(OBJ_DIR)\nonblock.obj: ..\lib\nonblock.c ..\lib\setup.h ..\lib\config-win32.h &
|
|
||||||
..\include\curl\curlbuild.h ..\include\curl\curlrules.h ..\lib\setup_once.h &
|
|
||||||
..\include\curl\curl.h ..\include\curl\curlver.h ..\include\curl\curlrules.h &
|
|
||||||
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
|
|
||||||
..\lib\strerror.h ..\lib\urldata.h ..\lib\cookie.h ..\lib\formdata.h &
|
|
||||||
..\lib\timeval.h ..\lib\http_chunks.h ..\lib\hostip.h ..\lib\hash.h &
|
|
||||||
..\lib\llist.h ..\lib\splay.h ..\include\curl\mprintf.h ..\lib\nonblock.h
|
|
||||||
|
@@ -46,6 +46,9 @@ bin_PROGRAMS = curl
|
|||||||
|
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
|
# This might hold -Werror
|
||||||
|
CFLAGS += @CURL_CFLAG_EXTRAS@
|
||||||
|
|
||||||
curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
|
curl_LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@
|
||||||
curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
|
curl_DEPENDENCIES = $(top_builddir)/lib/libcurl.la
|
||||||
BUILT_SOURCES = hugehelp.c
|
BUILT_SOURCES = hugehelp.c
|
||||||
|
@@ -65,7 +65,7 @@ LINKLIB = $(LINKLIB) $(OPENSSL_PATH)/out32/ssleay32.lib $(OPENSSL_PATH)/out32/l
|
|||||||
top_srcdir = ..
|
top_srcdir = ..
|
||||||
!include Makefile.inc
|
!include Makefile.inc
|
||||||
|
|
||||||
CSOURCES = $(CURL_SOURCES) $(CURLX_ONES)
|
CSOURCES = $(CURL_CFILES) $(CURLX_ONES)
|
||||||
OBJECTS = $(CSOURCES:.c=.obj)
|
OBJECTS = $(CSOURCES:.c=.obj)
|
||||||
|
|
||||||
.c.obj:
|
.c.obj:
|
||||||
|
@@ -1,4 +1,11 @@
|
|||||||
# ./src/Makefile.inc
|
# ./src/Makefile.inc
|
||||||
|
# Using the backslash as line continuation character might be problematic
|
||||||
|
# with some make flavours, as Watcom's wmake showed us already. If we
|
||||||
|
# ever want to change this in a portable manner then we should consider
|
||||||
|
# this idea (posted to the libcurl list by Adam Kellas):
|
||||||
|
# CSRC1 = file1.c file2.c file3.c
|
||||||
|
# CSRC2 = file4.c file5.c file6.c
|
||||||
|
# CSOURCES = $(CSRC1) $(CSRC2)
|
||||||
|
|
||||||
# libcurl has sources that provide functions named curlx_* that aren't part of
|
# libcurl has sources that provide functions named curlx_* that aren't part of
|
||||||
# the official API, but we re-use the code here to avoid duplication.
|
# the official API, but we re-use the code here to avoid duplication.
|
||||||
@@ -7,13 +14,12 @@ CURLX_ONES = $(top_srcdir)/lib/strtoofft.c \
|
|||||||
$(top_srcdir)/lib/rawstr.c \
|
$(top_srcdir)/lib/rawstr.c \
|
||||||
$(top_srcdir)/lib/nonblock.c
|
$(top_srcdir)/lib/nonblock.c
|
||||||
|
|
||||||
CURL_SOURCES = main.c hugehelp.c urlglob.c writeout.c writeenv.c \
|
CURL_CFILES = main.c hugehelp.c urlglob.c writeout.c writeenv.c \
|
||||||
getpass.c homedir.c curlutil.c os-specific.c
|
getpass.c homedir.c curlutil.c os-specific.c
|
||||||
|
|
||||||
CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
|
CURL_HFILES = hugehelp.h setup.h config-win32.h config-mac.h \
|
||||||
config-riscos.h urlglob.h version.h os-specific.h \
|
config-riscos.h urlglob.h version.h os-specific.h \
|
||||||
writeout.h writeenv.h getpass.h homedir.h curlutil.h
|
writeout.h writeenv.h getpass.h homedir.h curlutil.h
|
||||||
|
|
||||||
curl_SOURCES = $(CURL_SOURCES) $(CURLX_ONES) $(CURL_HFILES)
|
curl_SOURCES = $(CURL_CFILES) $(CURLX_ONES) $(CURL_HFILES)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
## Makefile for building curl.exe with MingW32 (GCC-3.2 or later)
|
## Makefile for building curl.exe with MingW32 (GCC-3.2 or later)
|
||||||
## and optionally OpenSSL (0.9.8), libssh2 (1.1), zlib (1.2.3)
|
## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5)
|
||||||
##
|
##
|
||||||
## Usage:
|
## Usage:
|
||||||
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [DYN=1]
|
## mingw32-make -f Makefile.m32 [SSL=1] [SSH2=1] [ZLIB=1] [IDN=1] [SSPI=1] [IPV6=1] [LDAPS=1] [DYN=1]
|
||||||
##
|
##
|
||||||
## Hint: you can also set environment vars to control the build, f.e.:
|
## Hint: you can also set environment vars to control the build, f.e.:
|
||||||
## set ZLIB_PATH=c:/zlib-1.2.3
|
## set ZLIB_PATH=c:/zlib-1.2.5
|
||||||
## set ZLIB=1
|
## set ZLIB=1
|
||||||
##
|
##
|
||||||
## Comments to: Troy Engel <tengel@sonic.net> or
|
## Comments to: Troy Engel <tengel@sonic.net> or
|
||||||
@@ -20,11 +20,11 @@ ZLIB_PATH = ../../zlib-1.2.5
|
|||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your OpenSSL package.
|
# Edit the path below to point to the base of your OpenSSL package.
|
||||||
ifndef OPENSSL_PATH
|
ifndef OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8n
|
OPENSSL_PATH = ../../openssl-0.9.8o
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
LIBSSH2_PATH = ../../libssh2-1.2.5
|
LIBSSH2_PATH = ../../libssh2-1.2.6
|
||||||
endif
|
endif
|
||||||
# Edit the path below to point to the base of your libidn package.
|
# Edit the path below to point to the base of your libidn package.
|
||||||
ifndef LIBIDN_PATH
|
ifndef LIBIDN_PATH
|
||||||
@@ -121,7 +121,7 @@ COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
|
|||||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_SOURCES)))
|
curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_CFILES)))
|
||||||
ifdef DYN
|
ifdef DYN
|
||||||
curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
|
curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
|
||||||
curl_OBJECTS += $(curlx_OBJECTS)
|
curl_OBJECTS += $(curlx_OBJECTS)
|
||||||
|
@@ -19,12 +19,12 @@ endif
|
|||||||
|
|
||||||
# Edit the path below to point to the base of your OpenSSL package.
|
# Edit the path below to point to the base of your OpenSSL package.
|
||||||
ifndef OPENSSL_PATH
|
ifndef OPENSSL_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8n
|
OPENSSL_PATH = ../../openssl-0.9.8o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Edit the path below to point to the base of your LibSSH2 package.
|
# Edit the path below to point to the base of your LibSSH2 package.
|
||||||
ifndef LIBSSH2_PATH
|
ifndef LIBSSH2_PATH
|
||||||
LIBSSH2_PATH = ../../libssh2-1.2.5
|
LIBSSH2_PATH = ../../libssh2-1.2.6
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Edit the path below to point to the base of your libidn package.
|
# Edit the path below to point to the base of your libidn package.
|
||||||
@@ -232,7 +232,10 @@ endif
|
|||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
|
OBJX := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
|
||||||
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES))) $(OBJX)
|
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_CFILES)))
|
||||||
|
ifndef LINK_STATIC
|
||||||
|
OBJS += $(OBJX)
|
||||||
|
endif
|
||||||
|
|
||||||
vpath %.c $(CURL_LIB)
|
vpath %.c $(CURL_LIB)
|
||||||
|
|
||||||
|
@@ -14,12 +14,12 @@
|
|||||||
|
|
||||||
PROGRAM_NAME = curl.exe
|
PROGRAM_NAME = curl.exe
|
||||||
|
|
||||||
!IFNDEF ZLIB_PATH
|
!IFNDEF OPENSSL_PATH
|
||||||
ZLIB_PATH = ../../zlib-1.2.3
|
OPENSSL_PATH = ../../openssl-0.9.8o
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF OPENSSL_PATH
|
!IFNDEF ZLIB_PATH
|
||||||
OPENSSL_PATH = ../../openssl-0.9.8g
|
ZLIB_PATH = ../../zlib-1.2.5
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF MACHINE
|
!IFNDEF MACHINE
|
||||||
|
@@ -385,6 +385,10 @@
|
|||||||
# define USE_WIN32_LARGE_FILES
|
# define USE_WIN32_LARGE_FILES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
|
||||||
|
# define USE_WIN32_LARGE_FILES
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__POCC__)
|
#if defined(__POCC__)
|
||||||
# undef USE_WIN32_LARGE_FILES
|
# undef USE_WIN32_LARGE_FILES
|
||||||
#endif
|
#endif
|
||||||
|
117
src/main.c
117
src/main.c
@@ -3464,6 +3464,7 @@ static size_t my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream)
|
|||||||
const size_t err_rc = (sz * nmemb) ? 0 : 1;
|
const size_t err_rc = (sz * nmemb) ? 0 : 1;
|
||||||
|
|
||||||
if(!out->stream) {
|
if(!out->stream) {
|
||||||
|
out->bytes = 0; /* nothing written yet */
|
||||||
if (!out->filename) {
|
if (!out->filename) {
|
||||||
warnf(config, "Remote filename has no length!\n");
|
warnf(config, "Remote filename has no length!\n");
|
||||||
return err_rc; /* Failure */
|
return err_rc; /* Failure */
|
||||||
@@ -3491,10 +3492,9 @@ static size_t my_fwrite(void *buffer, size_t sz, size_t nmemb, void *stream)
|
|||||||
|
|
||||||
rc = fwrite(buffer, sz, nmemb, out->stream);
|
rc = fwrite(buffer, sz, nmemb, out->stream);
|
||||||
|
|
||||||
if((sz * nmemb) == rc) {
|
if((sz * nmemb) == rc)
|
||||||
/* we added this amount of data to the output */
|
/* we added this amount of data to the output */
|
||||||
out->bytes += (sz * nmemb);
|
out->bytes += (sz * nmemb);
|
||||||
}
|
|
||||||
|
|
||||||
if(config->readbusy) {
|
if(config->readbusy) {
|
||||||
config->readbusy = FALSE;
|
config->readbusy = FALSE;
|
||||||
@@ -4069,6 +4069,7 @@ output_expected(const char* url, const char* uploadfile)
|
|||||||
#define my_setopt_str(x,y,z) _my_setopt(x, TRUE, config, #y, y, z)
|
#define my_setopt_str(x,y,z) _my_setopt(x, TRUE, config, #y, y, z)
|
||||||
|
|
||||||
static struct curl_slist *easycode;
|
static struct curl_slist *easycode;
|
||||||
|
static struct curl_slist *easycode_remarks;
|
||||||
|
|
||||||
static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
|
static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
|
||||||
const char *name, CURLoption tag, ...);
|
const char *name, CURLoption tag, ...);
|
||||||
@@ -4081,6 +4082,7 @@ static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
|
|||||||
char *bufp;
|
char *bufp;
|
||||||
char value[256];
|
char value[256];
|
||||||
bool remark=FALSE;
|
bool remark=FALSE;
|
||||||
|
bool skip=FALSE;
|
||||||
|
|
||||||
va_start(arg, tag);
|
va_start(arg, tag);
|
||||||
|
|
||||||
@@ -4088,7 +4090,8 @@ static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
|
|||||||
long lval = va_arg(arg, long);
|
long lval = va_arg(arg, long);
|
||||||
snprintf(value, sizeof(value), "%ld", lval);
|
snprintf(value, sizeof(value), "%ld", lval);
|
||||||
ret = curl_easy_setopt(curl, tag, lval);
|
ret = curl_easy_setopt(curl, tag, lval);
|
||||||
|
if(!lval)
|
||||||
|
skip = TRUE;
|
||||||
}
|
}
|
||||||
else if(tag < CURLOPTTYPE_OFF_T) {
|
else if(tag < CURLOPTTYPE_OFF_T) {
|
||||||
void *pval = va_arg(arg, void *);
|
void *pval = va_arg(arg, void *);
|
||||||
@@ -4097,40 +4100,54 @@ static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
|
|||||||
/* function pointers are never printable */
|
/* function pointers are never printable */
|
||||||
if (tag >= CURLOPTTYPE_FUNCTIONPOINT) {
|
if (tag >= CURLOPTTYPE_FUNCTIONPOINT) {
|
||||||
if (pval) {
|
if (pval) {
|
||||||
snprintf(value, sizeof(value), "%p", pval);
|
strcpy(value, "functionpointer"); /* 'value' fits 256 bytes */
|
||||||
remark = TRUE;
|
remark = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strcpy(value, "NULL");
|
skip = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(pval && str)
|
else if(pval && str)
|
||||||
snprintf(value, sizeof(value), "\"%s\"", (char *)ptr);
|
snprintf(value, sizeof(value), "\"%s\"", (char *)ptr);
|
||||||
else if(pval) {
|
else if(pval) {
|
||||||
snprintf(value, sizeof(value), "%p", pval);
|
strcpy(value, "objectpointer"); /* 'value' fits 256 bytes */
|
||||||
remark = TRUE;
|
remark = TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
strcpy(value, "NULL"); /* value fits more than 5 bytes */
|
skip = TRUE;
|
||||||
}
|
|
||||||
ret = curl_easy_setopt(curl, tag, pval);
|
ret = curl_easy_setopt(curl, tag, pval);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
curl_off_t oval = va_arg(arg, curl_off_t);
|
curl_off_t oval = va_arg(arg, curl_off_t);
|
||||||
snprintf(value, sizeof(value), "%" CURL_FORMAT_CURL_OFF_T, oval);
|
snprintf(value, sizeof(value),
|
||||||
|
"(curl_off_t)%" CURL_FORMAT_CURL_OFF_T, oval);
|
||||||
ret = curl_easy_setopt(curl, tag, oval);
|
ret = curl_easy_setopt(curl, tag, oval);
|
||||||
|
|
||||||
|
if(!oval)
|
||||||
|
skip = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config->libcurl) {
|
if(config->libcurl && !skip) {
|
||||||
/* we only use this for real if --libcurl was used */
|
/* we only use this for real if --libcurl was used */
|
||||||
|
|
||||||
bufp = curlx_maprintf("%scurl_easy_setopt(hnd, %s, %s);%s",
|
if(remark)
|
||||||
remark?"/* ":"", name, value,
|
bufp = curlx_maprintf("%s set to a %s", name, value);
|
||||||
remark?" [REMARK] */":"");
|
else
|
||||||
|
bufp = curlx_maprintf("curl_easy_setopt(hnd, %s, %s);", name, value);
|
||||||
|
|
||||||
if (!bufp || !curl_slist_append(easycode, bufp))
|
if (!bufp)
|
||||||
ret = CURLE_OUT_OF_MEMORY;
|
ret = CURLE_OUT_OF_MEMORY;
|
||||||
|
else {
|
||||||
|
struct curl_slist *list =
|
||||||
|
curl_slist_append(remark?easycode_remarks:easycode, bufp);
|
||||||
|
|
||||||
|
if(remark)
|
||||||
|
easycode_remarks = list;
|
||||||
|
else
|
||||||
|
easycode = list;
|
||||||
|
}
|
||||||
if (bufp)
|
if (bufp)
|
||||||
curl_free(bufp);
|
curl_free(bufp);
|
||||||
}
|
}
|
||||||
@@ -4141,8 +4158,7 @@ static CURLcode _my_setopt(CURL *curl, bool str, struct Configurable *config,
|
|||||||
|
|
||||||
static const char * const srchead[]={
|
static const char * const srchead[]={
|
||||||
"/********* Sample code generated by the curl command line tool **********",
|
"/********* Sample code generated by the curl command line tool **********",
|
||||||
" * Lines with [REMARK] below might need to be modified to make this code ",
|
" * Add error code checking where appropriate!",
|
||||||
" * usable. Add error code checking where appropriate.",
|
|
||||||
" * Compile this with a suitable header include path. Then link with ",
|
" * Compile this with a suitable header include path. Then link with ",
|
||||||
" * libcurl.",
|
" * libcurl.",
|
||||||
" * If you use any *_LARGE options, make sure your compiler figure",
|
" * If you use any *_LARGE options, make sure your compiler figure",
|
||||||
@@ -4161,7 +4177,7 @@ static const char * const srchead[]={
|
|||||||
|
|
||||||
static void dumpeasycode(struct Configurable *config)
|
static void dumpeasycode(struct Configurable *config)
|
||||||
{
|
{
|
||||||
struct curl_slist *ptr = easycode;
|
struct curl_slist *ptr;
|
||||||
char *o = config->libcurl;
|
char *o = config->libcurl;
|
||||||
|
|
||||||
if(o) {
|
if(o) {
|
||||||
@@ -4191,10 +4207,27 @@ static void dumpeasycode(struct Configurable *config)
|
|||||||
fprintf(out, "%s\n", c);
|
fprintf(out, "%s\n", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ptr = easycode;
|
||||||
while(ptr) {
|
while(ptr) {
|
||||||
fprintf(out, " %s\n", ptr->data);
|
fprintf(out, " %s\n", ptr->data);
|
||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ptr = easycode_remarks;
|
||||||
|
if(ptr) {
|
||||||
|
fprintf(out,
|
||||||
|
"\n /* Here is a list of options the curl code"
|
||||||
|
" used that cannot get generated\n"
|
||||||
|
" as source easily. You may select to either"
|
||||||
|
" not use them or implement\n them yourself.\n"
|
||||||
|
"\n");
|
||||||
|
while(ptr) {
|
||||||
|
fprintf(out, " %s\n", ptr->data);
|
||||||
|
ptr = ptr->next;
|
||||||
|
}
|
||||||
|
fprintf(out, "\n */\n");
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(out,
|
fprintf(out,
|
||||||
" return (int)ret;\n"
|
" return (int)ret;\n"
|
||||||
"}\n"
|
"}\n"
|
||||||
@@ -4355,6 +4388,7 @@ header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
const char* str = (char*)ptr;
|
const char* str = (char*)ptr;
|
||||||
const size_t cb = size*nmemb;
|
const size_t cb = size*nmemb;
|
||||||
const char* end = (char*)ptr + cb;
|
const char* end = (char*)ptr + cb;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
if (cb > 20 && curlx_strnequal(str, "Content-disposition:", 20)) {
|
if (cb > 20 && curlx_strnequal(str, "Content-disposition:", 20)) {
|
||||||
char *p = (char*)str + 20;
|
char *p = (char*)str + 20;
|
||||||
@@ -4363,6 +4397,7 @@ header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
(encoded filenames (*=) are not supported) */
|
(encoded filenames (*=) are not supported) */
|
||||||
for(;;) {
|
for(;;) {
|
||||||
char *filename;
|
char *filename;
|
||||||
|
char *semi;
|
||||||
|
|
||||||
while (*p && (p < end) && !ISALPHA(*p))
|
while (*p && (p < end) && !ISALPHA(*p))
|
||||||
p++;
|
p++;
|
||||||
@@ -4376,7 +4411,13 @@ header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
p+=9;
|
p+=9;
|
||||||
filename = parse_filename(p, cb - (p - str));
|
semi = strchr(p, ';');
|
||||||
|
|
||||||
|
/* this expression below typecasts 'cb' only to avoid
|
||||||
|
warning: signed and unsigned type in conditional expression
|
||||||
|
*/
|
||||||
|
len = semi ? (semi - p) : (ssize_t)cb - (p - str);
|
||||||
|
filename = parse_filename(p, len);
|
||||||
if (filename) {
|
if (filename) {
|
||||||
outs->filename = filename;
|
outs->filename = filename;
|
||||||
break;
|
break;
|
||||||
@@ -4831,6 +4872,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
outs.stream = NULL; /* open when needed */
|
outs.stream = NULL; /* open when needed */
|
||||||
|
outs.bytes = 0; /* reset byte counter */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
infdopen=FALSE;
|
infdopen=FALSE;
|
||||||
@@ -4887,6 +4929,31 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
|
|
||||||
}
|
}
|
||||||
else if(uploadfile && stdin_upload(uploadfile)) {
|
else if(uploadfile && stdin_upload(uploadfile)) {
|
||||||
|
/* count to see if there are more than one auth bit set
|
||||||
|
in the authtype field */
|
||||||
|
int authbits = 0;
|
||||||
|
int bitcheck = 0;
|
||||||
|
while(bitcheck < 32) {
|
||||||
|
if(config->authtype & (1 << bitcheck++)) {
|
||||||
|
authbits++;
|
||||||
|
if(authbits > 1) {
|
||||||
|
/* more than one, we're done! */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the user has also selected --anyauth or --proxy-anyauth
|
||||||
|
* we should warn him/her.
|
||||||
|
*/
|
||||||
|
if(config->proxyanyauth || (authbits>1)) {
|
||||||
|
warnf(config,
|
||||||
|
"Using --anyauth or --proxy-anyauth with upload from stdin"
|
||||||
|
" involves a big risk of it not working. Use a temporary"
|
||||||
|
" file or a fixed auth type instead!\n");
|
||||||
|
}
|
||||||
|
|
||||||
SET_BINMODE(stdin);
|
SET_BINMODE(stdin);
|
||||||
infd = STDIN_FILENO;
|
infd = STDIN_FILENO;
|
||||||
if (curlx_strequal(uploadfile, ".")) {
|
if (curlx_strequal(uploadfile, ".")) {
|
||||||
@@ -5002,6 +5069,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
my_setopt(curl, CURLOPT_BUFFERSIZE, config->recvpersecond);
|
my_setopt(curl, CURLOPT_BUFFERSIZE, config->recvpersecond);
|
||||||
|
|
||||||
/* size of uploaded file: */
|
/* size of uploaded file: */
|
||||||
|
if(uploadfilesize != -1)
|
||||||
my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
|
my_setopt(curl, CURLOPT_INFILESIZE_LARGE, uploadfilesize);
|
||||||
my_setopt_str(curl, CURLOPT_URL, url); /* what to fetch */
|
my_setopt_str(curl, CURLOPT_URL, url); /* what to fetch */
|
||||||
my_setopt_str(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
|
my_setopt_str(curl, CURLOPT_PROXY, config->proxy); /* proxy to use */
|
||||||
@@ -5081,7 +5149,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
config->hostpubmd5);
|
config->hostpubmd5);
|
||||||
|
|
||||||
/* default to strict verifyhost */
|
/* default to strict verifyhost */
|
||||||
my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
|
/* my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2); */
|
||||||
if(config->cacert || config->capath) {
|
if(config->cacert || config->capath) {
|
||||||
if (config->cacert)
|
if (config->cacert)
|
||||||
my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
|
my_setopt_str(curl, CURLOPT_CAINFO, config->cacert);
|
||||||
@@ -5295,6 +5363,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
config->ftp_alternative_to_user);
|
config->ftp_alternative_to_user);
|
||||||
|
|
||||||
/* curl 7.16.0 */
|
/* curl 7.16.0 */
|
||||||
|
if(config->disable_sessionid)
|
||||||
my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE,
|
my_setopt(curl, CURLOPT_SSL_SESSIONID_CACHE,
|
||||||
!config->disable_sessionid);
|
!config->disable_sessionid);
|
||||||
|
|
||||||
@@ -5370,8 +5439,12 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|||||||
if(CURLE_OPERATION_TIMEDOUT == res)
|
if(CURLE_OPERATION_TIMEDOUT == res)
|
||||||
/* retry timeout always */
|
/* retry timeout always */
|
||||||
retry = RETRY_TIMEOUT;
|
retry = RETRY_TIMEOUT;
|
||||||
else if(CURLE_OK == res) {
|
else if((CURLE_OK == res) ||
|
||||||
/* Check for HTTP transient errors */
|
(config->failonerror &&
|
||||||
|
(CURLE_HTTP_RETURNED_ERROR == res))) {
|
||||||
|
/* If it returned OK. _or_ failonerror was enabled and it
|
||||||
|
returned due to such an error, check for HTTP transient
|
||||||
|
errors to retry on. */
|
||||||
char *this_url=NULL;
|
char *this_url=NULL;
|
||||||
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &this_url);
|
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &this_url);
|
||||||
if(this_url &&
|
if(this_url &&
|
||||||
|
@@ -12,7 +12,7 @@ TOPDIR = ..
|
|||||||
include ../packages/DOS/common.dj
|
include ../packages/DOS/common.dj
|
||||||
include Makefile.inc
|
include Makefile.inc
|
||||||
|
|
||||||
CSOURCES = $(CURL_SOURCES)
|
CSOURCES = $(CURL_CFILES)
|
||||||
|
|
||||||
ifeq ($(USE_SSL),1)
|
ifeq ($(USE_SSL),1)
|
||||||
EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
|
EX_LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -75,8 +75,6 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
|
|||||||
++glob->size;
|
++glob->size;
|
||||||
|
|
||||||
while (!done) {
|
while (!done) {
|
||||||
bool skip;
|
|
||||||
|
|
||||||
switch (*pattern) {
|
switch (*pattern) {
|
||||||
case '\0': /* URL ended while set was still open */
|
case '\0': /* URL ended while set was still open */
|
||||||
snprintf(glob->errormsg, sizeof(glob->errormsg),
|
snprintf(glob->errormsg, sizeof(glob->errormsg),
|
||||||
@@ -127,24 +125,7 @@ static GlobCode glob_set(URLGlob *glob, char *pattern,
|
|||||||
return GLOB_ERROR;
|
return GLOB_ERROR;
|
||||||
|
|
||||||
case '\\': /* escaped character, skip '\' */
|
case '\\': /* escaped character, skip '\' */
|
||||||
switch(pattern[1]) {
|
if(pattern[1]) {
|
||||||
case '[':
|
|
||||||
case ']':
|
|
||||||
case '{':
|
|
||||||
case '}':
|
|
||||||
case ',':
|
|
||||||
skip = TRUE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
skip = FALSE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(skip) {
|
|
||||||
if (*(buf+1) == '\0') { /* but no escaping of '\0'! */
|
|
||||||
snprintf(glob->errormsg, sizeof(glob->errormsg),
|
|
||||||
"illegal pattern at pos %zu\n", pos);
|
|
||||||
return GLOB_ERROR;
|
|
||||||
}
|
|
||||||
++pattern;
|
++pattern;
|
||||||
++pos;
|
++pos;
|
||||||
}
|
}
|
||||||
|
@@ -2,5 +2,4 @@
|
|||||||
# test cases are run by runtests.pl. Just add the plain test case numbers, one
|
# test cases are run by runtests.pl. Just add the plain test case numbers, one
|
||||||
# per line.
|
# per line.
|
||||||
# Lines starting with '#' letters are treated as comments.
|
# Lines starting with '#' letters are treated as comments.
|
||||||
563
|
|
||||||
564
|
564
|
||||||
|
@@ -86,9 +86,18 @@ NTLM
|
|||||||
<name>
|
<name>
|
||||||
HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response
|
HTTP proxy CONNECT auth NTLM with chunked-encoded 407 response
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
|
http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -96,11 +105,6 @@ http://test.remote.haxx.se:1008/path/10080002 --proxy http://%HOSTIP:%HTTPPORT -
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent: curl/.*
|
^User-Agent: curl/.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
CONNECT test.remote.haxx.se:1008 HTTP/1.1
|
CONNECT test.remote.haxx.se:1008 HTTP/1.1
|
||||||
Host: test.remote.haxx.se:1008
|
Host: test.remote.haxx.se:1008
|
||||||
@@ -109,7 +113,7 @@ Proxy-Connection: Keep-Alive
|
|||||||
|
|
||||||
CONNECT test.remote.haxx.se:1008 HTTP/1.1
|
CONNECT test.remote.haxx.se:1008 HTTP/1.1
|
||||||
Host: test.remote.haxx.se:1008
|
Host: test.remote.haxx.se:1008
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
|
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
|
||||||
Proxy-Connection: Keep-Alive
|
Proxy-Connection: Keep-Alive
|
||||||
|
|
||||||
GET /path/10080002 HTTP/1.1
|
GET /path/10080002 HTTP/1.1
|
||||||
|
@@ -95,9 +95,18 @@ NTLM
|
|||||||
<name>
|
<name>
|
||||||
HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
|
HTTP proxy CONNECT with any proxyauth and proxy offers NTLM and close
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
|
http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-anyauth --proxytunnel
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -105,11 +114,6 @@ http://test.remote.haxx.se:1021/path/10210002 --proxy http://%HOSTIP:%HTTPPORT -
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent: curl/.*
|
^User-Agent: curl/.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
CONNECT test.remote.haxx.se:1021 HTTP/1.1
|
CONNECT test.remote.haxx.se:1021 HTTP/1.1
|
||||||
Host: test.remote.haxx.se:1021
|
Host: test.remote.haxx.se:1021
|
||||||
@@ -122,7 +126,7 @@ Proxy-Connection: Keep-Alive
|
|||||||
|
|
||||||
CONNECT test.remote.haxx.se:1021 HTTP/1.1
|
CONNECT test.remote.haxx.se:1021 HTTP/1.1
|
||||||
Host: test.remote.haxx.se:1021
|
Host: test.remote.haxx.se:1021
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
|
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
|
||||||
Proxy-Connection: Keep-Alive
|
Proxy-Connection: Keep-Alive
|
||||||
|
|
||||||
GET /path/10210002 HTTP/1.1
|
GET /path/10210002 HTTP/1.1
|
||||||
|
@@ -35,7 +35,7 @@ http://%HOSTIP:%HTTPPORT/1084 --interface non-existing-host.haxx.se.
|
|||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
<verify>
|
<verify>
|
||||||
<errorcode>
|
<errorcode>
|
||||||
7
|
45
|
||||||
</errorcode>
|
</errorcode>
|
||||||
</verify>
|
</verify>
|
||||||
</testcase>
|
</testcase>
|
||||||
|
@@ -42,7 +42,7 @@ HTTP-IPv6 GET with invalid --interface
|
|||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
<verify>
|
<verify>
|
||||||
<errorcode>
|
<errorcode>
|
||||||
7
|
45
|
||||||
</errorcode>
|
</errorcode>
|
||||||
</verify>
|
</verify>
|
||||||
</testcase>
|
</testcase>
|
||||||
|
@@ -70,9 +70,18 @@ http
|
|||||||
<name>
|
<name>
|
||||||
HTTP POST with NTLM authorization and following a 302 redirect
|
HTTP POST with NTLM authorization and following a 302 redirect
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away"
|
http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send away"
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -80,11 +89,6 @@ http://%HOSTIP:%HTTPPORT/1100 -u testuser:testpass --ntlm -L -d "stuff to send a
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent:.*
|
^User-Agent:.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
POST /1100 HTTP/1.1
|
POST /1100 HTTP/1.1
|
||||||
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
@@ -95,7 +99,7 @@ Content-Length: 0
|
|||||||
Content-Type: application/x-www-form-urlencoded
|
Content-Type: application/x-www-form-urlencoded
|
||||||
|
|
||||||
POST /1100 HTTP/1.1
|
POST /1100 HTTP/1.1
|
||||||
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
|
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
|
||||||
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
@@ -57,9 +57,18 @@ http
|
|||||||
<name>
|
<name>
|
||||||
HTTP with NTLM authorization and --fail
|
HTTP with NTLM authorization and --fail
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail
|
http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -67,11 +76,6 @@ http://%HOSTIP:%HTTPPORT/150 -u testuser:testpass --ntlm --fail
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent:.*
|
^User-Agent:.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
GET /150 HTTP/1.1
|
GET /150 HTTP/1.1
|
||||||
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
@@ -80,7 +84,7 @@ Host: %HOSTIP:%HTTPPORT
|
|||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
||||||
GET /150 HTTP/1.1
|
GET /150 HTTP/1.1
|
||||||
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
|
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
|
||||||
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
@@ -75,9 +75,18 @@ http
|
|||||||
<name>
|
<name>
|
||||||
HTTP PUT with --anyauth authorization (picking NTLM)
|
HTTP PUT with --anyauth authorization (picking NTLM)
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth
|
http://%HOSTIP:%HTTPPORT/155 -T log/put155 -u testuser:testpass --anyauth
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
<file name="log/put155">
|
<file name="log/put155">
|
||||||
This is data we upload with PUT
|
This is data we upload with PUT
|
||||||
a second line
|
a second line
|
||||||
@@ -91,11 +100,6 @@ four is the number of lines
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent:.*
|
^User-Agent:.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
PUT /155 HTTP/1.1
|
PUT /155 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
@@ -111,7 +115,7 @@ Content-Length: 0
|
|||||||
Expect: 100-continue
|
Expect: 100-continue
|
||||||
|
|
||||||
PUT /155 HTTP/1.1
|
PUT /155 HTTP/1.1
|
||||||
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
|
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
|
||||||
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
@@ -56,9 +56,18 @@ http
|
|||||||
<name>
|
<name>
|
||||||
HTTP with NTLM authorization when talking HTTP/1.0
|
HTTP with NTLM authorization when talking HTTP/1.0
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
|
http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -66,11 +75,6 @@ http://%HOSTIP:%HTTPPORT/159 -u testuser:testpass --ntlm -0
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent:.*
|
^User-Agent:.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
GET /159 HTTP/1.0
|
GET /159 HTTP/1.0
|
||||||
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
@@ -79,7 +83,7 @@ Host: %HOSTIP:%HTTPPORT
|
|||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
||||||
GET /159 HTTP/1.0
|
GET /159 HTTP/1.0
|
||||||
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAA
|
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=
|
||||||
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
@@ -81,9 +81,18 @@ NTLM
|
|||||||
<name>
|
<name>
|
||||||
HTTP with proxy-requiring-NTLM to site-requiring-Digest
|
HTTP with proxy-requiring-NTLM to site-requiring-Digest
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot
|
http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user foo:bar --proxy-ntlm --digest --user digest:alot
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -91,11 +100,6 @@ http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent: curl/.*
|
^User-Agent: curl/.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
|
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
@@ -105,7 +109,7 @@ Accept: */*
|
|||||||
Proxy-Connection: Keep-Alive
|
Proxy-Connection: Keep-Alive
|
||||||
|
|
||||||
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
|
GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAA
|
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAAAwADAHAAAAAIAAgAcwAAAAAAAAAAAAAABoKBAIP6B+XVQ6vQsx3DfDXUVhd9436GAxPu0IYcl2Z7LxHmNeOAWQ+vxUmhuCFJBUgXCWZvb2N1cmxob3N0
|
||||||
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
|
User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
|
||||||
Host: data.from.server.requiring.digest.hohoho.com
|
Host: data.from.server.requiring.digest.hohoho.com
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
@@ -79,9 +79,18 @@ NTLM
|
|||||||
<name>
|
<name>
|
||||||
HTTP proxy CONNECT auth NTLM
|
HTTP proxy CONNECT auth NTLM
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
|
http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -89,11 +98,6 @@ http://test.remote.haxx.se:209/path/2090002 --proxy http://%HOSTIP:%HTTPPORT --p
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent: curl/.*
|
^User-Agent: curl/.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol>
|
<protocol>
|
||||||
CONNECT test.remote.haxx.se:209 HTTP/1.1
|
CONNECT test.remote.haxx.se:209 HTTP/1.1
|
||||||
Host: test.remote.haxx.se:209
|
Host: test.remote.haxx.se:209
|
||||||
@@ -102,7 +106,7 @@ Proxy-Connection: Keep-Alive
|
|||||||
|
|
||||||
CONNECT test.remote.haxx.se:209 HTTP/1.1
|
CONNECT test.remote.haxx.se:209 HTTP/1.1
|
||||||
Host: test.remote.haxx.se:209
|
Host: test.remote.haxx.se:209
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
|
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
|
||||||
Proxy-Connection: Keep-Alive
|
Proxy-Connection: Keep-Alive
|
||||||
|
|
||||||
GET /path/2090002 HTTP/1.1
|
GET /path/2090002 HTTP/1.1
|
||||||
|
@@ -79,9 +79,18 @@ NTLM
|
|||||||
<name>
|
<name>
|
||||||
HTTP 1.0 proxy CONNECT auth NTLM and then POST
|
HTTP 1.0 proxy CONNECT auth NTLM and then POST
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
|
http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm --proxytunnel -d "postit"
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -89,11 +98,6 @@ http://test.remote.haxx.se:213/path/2130002 --proxy1.0 http://%HOSTIP:%HTTPPORT
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent: curl/.*
|
^User-Agent: curl/.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol nonewline="yes">
|
<protocol nonewline="yes">
|
||||||
CONNECT test.remote.haxx.se:213 HTTP/1.0
|
CONNECT test.remote.haxx.se:213 HTTP/1.0
|
||||||
Host: test.remote.haxx.se:213
|
Host: test.remote.haxx.se:213
|
||||||
@@ -102,7 +106,7 @@ Proxy-Connection: Keep-Alive
|
|||||||
|
|
||||||
CONNECT test.remote.haxx.se:213 HTTP/1.0
|
CONNECT test.remote.haxx.se:213 HTTP/1.0
|
||||||
Host: test.remote.haxx.se:213
|
Host: test.remote.haxx.se:213
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
|
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
|
||||||
Proxy-Connection: Keep-Alive
|
Proxy-Connection: Keep-Alive
|
||||||
|
|
||||||
POST /path/2130002 HTTP/1.1
|
POST /path/2130002 HTTP/1.1
|
||||||
|
@@ -56,9 +56,18 @@ NTLM
|
|||||||
<name>
|
<name>
|
||||||
HTTP proxy-auth NTLM and then POST
|
HTTP proxy-auth NTLM and then POST
|
||||||
</name>
|
</name>
|
||||||
|
<setenv>
|
||||||
|
# we force our own host name, in order to make the test machine independent
|
||||||
|
CURL_GETHOSTNAME=curlhost
|
||||||
|
# we try to use the LD_PRELOAD hack, if not a debug build
|
||||||
|
LD_PRELOAD=./libtest/.libs/libhostname.so
|
||||||
|
</setenv>
|
||||||
<command>
|
<command>
|
||||||
http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm -d "postit"
|
http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly:person --proxy-ntlm -d "postit"
|
||||||
</command>
|
</command>
|
||||||
|
<precheck>
|
||||||
|
chkhostname curlhost
|
||||||
|
</precheck>
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
@@ -66,11 +75,6 @@ http://%HOSTIP:%HTTPPORT/239 --proxy http://%HOSTIP:%HTTPPORT --proxy-user silly
|
|||||||
<strip>
|
<strip>
|
||||||
^User-Agent: curl/.*
|
^User-Agent: curl/.*
|
||||||
</strip>
|
</strip>
|
||||||
# We strip off a large chunk of the type-2 NTLM message since it depends on
|
|
||||||
# the local host name and thus differs on different machines!
|
|
||||||
<strippart>
|
|
||||||
s/^(Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA).*/$1/
|
|
||||||
</strippart>
|
|
||||||
<protocol nonewline="yes">
|
<protocol nonewline="yes">
|
||||||
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
|
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
|
||||||
@@ -82,7 +86,7 @@ Content-Length: 0
|
|||||||
Content-Type: application/x-www-form-urlencoded
|
Content-Type: application/x-www-form-urlencoded
|
||||||
|
|
||||||
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
|
POST http://%HOSTIP:%HTTPPORT/239 HTTP/1.1
|
||||||
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAA
|
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAABQAFAHAAAAAIAAgAdQAAAAAAAAAAAAAABoKBAKAeQjzKtCQ7ubW8S6MN7B59436GAxPu0CVROwwNBsgxML49gcbAXLT/bU+H5wrS9XNpbGx5Y3VybGhvc3Q=
|
||||||
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
|
User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user