diff options
author | Alessandro Ghedini <al3xbio@gmail.com> | 2012-11-20 12:29:42 +0100 |
---|---|---|
committer | Alessandro Ghedini <al3xbio@gmail.com> | 2012-11-20 12:29:42 +0100 |
commit | cc228a68fc4d70a60d371f66640e1d9ed6491886 (patch) | |
tree | 9f506f65a3c0937f7efebb50bcaad74a3ec8501a | |
parent | f4a37431131063e45779f6f3cbac0c629f8432a9 (diff) |
Imported Upstream version 7.28.1
224 files changed, 3108 insertions, 1368 deletions
@@ -6,6 +6,565 @@ Changelog +Version 7.28.1 (20 Nov 2012) + +Daniel Stenberg (20 Nov 2012) +- RELEASE-NOTES: synced with 52af6e69f079 / 7.28.1 + +Kamil Dudka (20 Nov 2012) +- [Anthony Bryan brought this change] + + RELEASE-NOTES: NSS can be used for metalink hashing + +- [Fabian Keil brought this change] + + Get test 2032 working when using valgrind + + If curl_multi_fdset() sets maxfd to -1, the socket detection + loop is skipped and thus !found_new_socket is no cause for alarm. + +- test2032: spurious failure caused by premature termination + + Bug: http://curl.haxx.se/mail/lib-2012-11/0095.html + +Daniel Stenberg (19 Nov 2012) +- [Fabian Keil brought this change] + + Fix comment typos in test 517 + +- [Fabian Keil brought this change] + + Test 92 and 194: normalize spaces in the Server headers + + It makes no difference from curl's point of view but + makes it more convenient to use the tests with a + lws-normalizing proxy between curl and the test server. + +- [Fabian Keil brought this change] + + Add a HOSTIP precheck for tests 31 and 1105 + + They currently only work for 127.0.0.1 which + is hardcoded and can't be easily changed. + +- [Fabian Keil brought this change] + + Let test 8 work as long as %HOSTIP ends with ".0.0.1" + + .. and add a precheck to skip the test otherwise. + +- [Fabian Keil brought this change] + + Add --resolve to the keywords and name of test 1318 + + This makes it easier to skip it automatically when + the test suite is used with external proxies. + +- [Fabian Keil brought this change] + + Add FTP keywords for a couple of currently keyword-less FTP tests + +- [Fabian Keil brought this change] + + Add keywords for a couple of currently keyword-less HTTP tests + +- [Fabian Keil brought this change] + + Use carriage returns in all headers in test 31 + + Trailing spaces were left unmodifed, assuming they were intentional. + +- [Fabian Keil brought this change] + + Do not mix CRLF and LF header endings in a couple of HTTP tests + + Consistently use CRLF instead. The mixed endings weren't + documented so I assume they were unintentional. + + This change doesn't matter for curl itself but makes using + the tests with a proxy between curl and the test server + more convenient. + + Tests that consistently use no carriage returns were + left unmodified as one can easily work around this. + +- fixed memory leak: CURLOPT_RESOLVE with multi interface + + DNS cache entries populated with CURLOPT_RESOLVE were not properly freed + again when done using the multi interface. + + Test case 1502 added to verify. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3575448 + Reported by: Alex Gruz + +- RELEASE-NOTES: synced with ee588fe08807778 + + 4 more bug fixes and 4 more contributors + +- mem-include-scan: verify memory #includes + + If we use memory functions (malloc, free, strdup etc) in C sources in + libcurl and we fail to include curl_memory.h or memdebug.h we either + fail to properly support user-provided memory callbacks or the memory + leak system of the test suite fails. + + After Ajit's report of a failure in the first category in http_proxy.c, + I spotted a few in the second category as well. These problems are now + tested for by test 1132 which runs a perl program that scans for and + attempts to check that we use the correct include files if a memory + related function is used in the source code. + + Reported by: Ajit Dhumale + Bug: http://curl.haxx.se/mail/lib-2012-11/0125.html + +- tftp_rx: code style cleanup + + Fixed checksrc warnings + +- [Fabian Keil brought this change] + + Fix the libauthretry changes from 7c0cbcf2f61 + + They broke the NTLM tests from 2023 to 2031. + +- [Christian Vogt brought this change] + + tftp_rx: handle resends + + Re-send ACK for block X in case we receive block X data again while + waiting for block X+1. + + Based on an earlier patch by Marcin Adamski. + +- autoconf: don't force-disable compiler debug option + + When nothing is told to configure, we should not enforce switching off + debug options with -g0 (or similar). We instead don't use -g at all in + that situaion and therefore allow the user's CFLAGS settings possibly + dictate what to do. + +- [Mark Snelling brought this change] + + winbuild: Fix PDB file output + + And fix some newlines to be proper CRLF + + Bug: http://curl.haxx.se/bug/view.cgi?id=3586741 + +- RELEASE-NOTES: synced with fa1ae0abcde + +- [Cristian Rodríguez brought this change] + + OpenSSL: Disable SSL/TLS compression + + It either causes increased memory usage or exposes users + to the "CRIME attack" (CVE-2012-4929) + +- [Sebastian Rasmussen brought this change] + + FILE: Make upload-writes unbuffered by not using FILE streams + +Kamil Dudka (13 Nov 2012) +- tool_metalink: fix error detection of hash alg initialization + + The {MD5,SHA1,SHA256}_Init functions from OpenSSL are called directly + without any wrappers and they return 1 for success, 0 otherwise. Hence, + we have to use the same approach in all the wrapper functions that are + used for the other crypto libraries. + + This commit fixes a regression introduced in commit dca8ae5f. + +Daniel Stenberg (13 Nov 2012) +- RELEASE-NOTES: synced with 7c0cbcf2f617b + +- [Sergei Nikulov brought this change] + + fixed Visual Studio 2010 compilation + +- [Anton Malov brought this change] + + ftp: EPSV-disable fix over SOCKS + + Bug: http://curl.haxx.se/bug/view.cgi?id=3586338 + +Patrick Monnerat (12 Nov 2012) +- Merge branch 'master' of github.com:bagder/curl + +- OS400: upgrade wrappers for the 7.28.1 release. + +Daniel Stenberg (12 Nov 2012) +- runtests: limit execessive logging/output + +- [Gabriel Sjoberg brought this change] + + Digst: Add microseconds into nounce calculation + + When using only 1 second precision, curl doesn't create new cnonce + values quickly enough for all uses. + + For example, issuing the following command multiple times to a recent + Tomcat causes authentication failures: + + curl --digest -utest:test http://tomcat.test.com:8080/manager/list + + This is because curl uses the same cnonce for several seconds, but + doesn't increment the nonce counter. Tomcat correctly interprets + this as a replay attack and rejects the request. + + When microsecond-precision is available, this commit causes curl to + change cnonce values much more frequently. + + With microsecond resolution, increasing the nounce length used in the + headers to 32 was made to further reduce the risk of duplication. + +- SCP/SFTP: improve error code used for send failures + + Instead of relying on the generic CURLE error for SCP or SFTP send + failures, try passing back a more suitable error if possible. + +- Curl_write: remove unneeded typecast + +Kamil Dudka (9 Nov 2012) +- tool_metalink: allow to use hash algorithms provided by NSS + + Fixes bug #3578163: + http://sourceforge.net/tracker/?func=detail&atid=100976&aid=3578163&group_id=976 + +- tool_metalink: allow to handle failure of hash alg initialization + +- tool_metalink: introduce metalink_cleanup() in the internal API + + ... to release resources allocated at global scope + +Daniel Stenberg (8 Nov 2012) +- hostcheck: only build for the actual users + + and make local function static + +- [Oscar Koeroo brought this change] + + SSL: Several SSL-backend related fixes + + axTLS: + + This will make the axTLS backend perform the RFC2818 checks, honoring + the VERIFYHOST setting similar to the OpenSSL backend. + + Generic for OpenSSL and axTLS: + + Move the hostcheck and cert_hostcheck functions from the lib/ssluse.c + files to make them genericly available for both the OpenSSL, axTLS and + other SSL backends. They are now in the new lib/hostcheck.c file. + + CyaSSL: + + CyaSSL now also has the RFC2818 checks enabled by default. There is a + limitation that the verifyhost can not be enabled exclusively on the + Subject CN field comparison. This SSL backend will thus behave like the + NSS and the GnuTLS (meaning: RFC2818 ok, or bust). In other words: + setting verifyhost to 0 or 1 will disable the Subject Alt Names checks + too. + + Schannel: + + Updated the schannel information messages: Split the IP address usage + message from the verifyhost setting and changed the message about + disabling SNI (Server Name Indication, used in HTTP virtual hosting) + into a message stating that the Subject Alternative Names checks are + being disabled when verifyhost is set to 0 or 1. As a side effect of + switching off the RFC2818 related servername checks with + SCH_CRED_NO_SERVERNAME_CHECK + (http://msdn.microsoft.com/en-us/library/aa923430.aspx) the SNI feature + is being disabled. This effect is not documented in MSDN, but Wireshark + output clearly shows the effect (details on the libcurl maillist). + + PolarSSL: + + Fix the prototype change in PolarSSL of ssl_set_session() and the move + of the peer_cert from the ssl_context to the ssl_session. Found this + change in the PolarSSL SVN between r1316 and r1317 where the + POLARSSL_VERSION_NUMBER was at 0x01010100. But to accommodate the Ubuntu + PolarSSL version 1.1.4 the check is to discriminate between lower then + PolarSSL version 1.2.0 and 1.2.0 and higher. Note: The PolarSSL SVN + trunk jumped from version 1.1.1 to 1.2.0. + + Generic: + + All the SSL backends are fixed and checked to work with the + ssl.verifyhost as a boolean, which is an internal API change. + +- libcurl: VERSIONINFO update + + Since we added the curl_multi_wait function, the VERSIONINFO needed + updating. + + Reported by: Patrick Monnerat + +Guenter Knauf (8 Nov 2012) +- Added .def file to output. + + Requested by Johnny Luong on the libcurl list. + +- Added deps for static metalink-aware MinGW builds. + +Daniel Stenberg (8 Nov 2012) +- [Fabian Keil brought this change] + + Fix compilation of lib1501 + +- Curl_readwrite: remove debug output + + The text "additional stuff not fine" text was added for debug purposes a + while ago, but it isn't really helping anyone and for some reason some + Linux distributions provide their libcurls built with debug info still + present and thus (far too many) users get to read this info. + +- RELEASE-NOTES: synced with 487538e87a3d5e + + 6 new bugfixes and 3 more contributors... + +- http_perhapsrewind: consider NTLM over proxy too + + The logic previously checked for a started NTLM negotiation only for + host and not also with proxy, leading to problems doing POSTs over a + proxy NTLM that are larger than 2000 bytes. Now it includes proxy in the + check. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3582321 + Reported by: John Suprock + +- [Lars Buitinck brought this change] + + Curl_connecthost: friendlier "couldn't connect" message + +- test1413: verify redirects to URLs with fragments + + The bug report claimed it didn't work. This problem was probably fixed + in 473003fbdf. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3581898 + +- URL parser: cut off '#' fragments from URLs (better) + + The existing logic only cut off the fragment from the separate 'path' + buffer which is used when sending HTTP to hosts. The buffer that held + the full URL used for proxies were not dealt with. It is now. + + Test case 5 was updated to use a fragment on a URL over a proxy. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3579813 + +- OpenSSL/servercert: use correct buffer size, not size of pointer + + Bug: http://curl.haxx.se/bug/view.cgi?id=3579286 + +- curl: set CURLOPT_SSL_VERIFYHOST to 0 to disable + +- test 2027/2030: take duplicate Digest requests into account + + With the reversion of ce8311c7e49eca and the new clear logic, this flaw + is present and we allow it. + +- Curl_pretransfer: clear out unwanted auth methods + + As a handle can be re-used after having done HTTP auth in a previous + request, it must make sure to clear out the HTTP types that aren't + wanted in this new request. + +- test1412: verify Digest with repeated URLs + + This test case verifies that bug 3582718 is fixed. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3582718 + Reported by: Nick Zitzmann (originally) + +- Revert "Zero out auth structs before transfer" + + This reverts commit ce8311c7e49eca93c136b58efa6763853541ec97. + + The commit made test 2024 work but caused a regression with repeated + Digest authentication. We need to fix this differently. + +- CURLOPT_SSL_VERIFYHOST: stop supporting the 1 value + + After a research team wrote a document[1] that found several live source + codes out there in the wild that misused the CURLOPT_SSL_VERIFYHOST + option thinking it was a boolean, this change now bans 1 as a value and + will make libcurl return error for it. + + 1 was never a sensible value to use in production but was introduced + back in the days to help debugging. It was always documented clearly + this way. + + 1 was never supported by all SSL backends in libcurl, so this cleanup + makes the treatment of it unified. + + The report's list of mistakes for this option were all PHP code and + while there's a binding layer between libcurl and PHP, the PHP team has + decided that they have an as thin layer as possible on top of libcurl so + they will not alter or specifically filter a 'TRUE' value for this + particular option. I sympathize with that position. + + [1] = http://daniel.haxx.se/blog/2012/10/25/libcurl-claimed-to-be-dangerous/ + +- gnutls: fix compiler warnings + +- [Alessandro Ghedini brought this change] + + gnutls: print alerts during handshake + +- [Alessandro Ghedini brought this change] + + gnutls: fix the error_is_fatal logic + +- RELEASE-NOTES: synced with fa6d78829fd30ad + +- httpcustomheader.c: free the headers after use + +- [Dave Reisner brought this change] + + uniformly use AM_CPPFLAGS, avoid deprecated INCLUDES + + Since automake 1.12.4, the warnings are issued on running automake: + + warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') + + Avoid INCLUDES and roll these flags into AM_CPPFLAGS. + + Compile tested on: + Ubuntu 10.04 (automake 1:1.11.1-1) + Ubuntu 12.04 (automake 1:1.11.3-1ubuntu2) + Arch Linux (automake 1.12.4) + +- libauthretry.c: shorten lines to fit within 80 cols + +- ftp_readresp: fix build without krb4 support + + Oops, my previous commit broke builds with krb support. + +- test/README: mention the 1500 test number range + +- FTP: prevent the multi interface from blocking + + As pointed out in Bug report #3579064, curl_multi_perform() would + wrongly use a blocking mechanism internally for some commands which + could lead to for example a very long block if the LIST response never + showed. + + The solution was to make sure to properly continue to use the multi + interface non-blocking state machine. + + The new test 1501 verifies the fix. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3579064 + Reported by: Guido Berhoerster + +Marc Hoersken (1 Nov 2012) +- winbuild: Use machine type of development environment + + This patch restores the original behavior instead of always + falling back to x86 if no MACHINE-type was specified. + +- winbuild: Additional clean up + +- [Sapien2 brought this change] + + Even more winbuild refactoring + +- [Sapien2 brought this change] + + Minor winbuild refactoring + +- [Sapien2 brought this change] + + Architecture selection for winbuild and minor makefiles refactoring + +Daniel Stenberg (1 Nov 2012) +- BUGS: fix the bug tracker URL + + The URL we used before is the one that goes directly to 'add' a bug + report, but since you can only do that after first having logged in to + sourceforge, the link often doesn't work for visitors. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3582408 + Reported by: Oscar Norlander + +- evhiperfifo: fix the pointer passed to WRITEDATA + + Bug: http://curl.haxx.se/bug/view.cgi?id=3582407 + Reported by: Oscar Norlander + +Guenter Knauf (1 Nov 2012) +- Fixed MSVC libssh2 static build. + + Since libssh2 supports now agent stuff it also depends on user32.lib. + Posted to the list by Jan Ehrhardt. + +Daniel Stenberg (23 Oct 2012) +- tlsauthtype: deal with the string case insensitively + + When given a string as 'srp' it didn't work, but required 'SRP'. + Starting now, the check disregards casing. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3578418 + Reported by: Jeff Connelly + +- asyn-ares: restore working with c-ares < 1.6.1 + + Back in those days the public ares.h header didn't include the + ares_version.h header so it needs to be included here. + + Bug: http://curl.haxx.se/bug/view.cgi?id=3577710 + +- [Nick Zitzmann brought this change] + + metalink/md5: Use CommonCrypto on Apple operating systems + + Previously the Metalink code used Apple's CommonCrypto library only if + curl was built using the --with-darwinssl option. Now we use CommonCrypto + on all Apple operating systems including Tiger or later, or iOS 5 or + later, so you don't need to build --with-darwinssl anymore. Also rolled + out this change to libcurl's md5 code. + +- href_extractor.c: fix the URL + +- [Michał Kowalczyk brought this change] + + href_extractor: example code extracting href elements + + It does so in a streaming manner using the "Streaming HTML parser". + +- [Nick Zitzmann brought this change] + + darwinssl: un-broke iOS build, fix error on server disconnect + + The iOS build was broken by a reference to a function that only existed + under OS X; fixed. Also fixed a hard-to-reproduce problem where, if the + server disconnected before libcurl got the chance to hang up first and + SecureTransport was in use, then we'd raise an error instead of failing + gracefully. + +- [Alessandro Ghedini brought this change] + + gnutls: put reset code into else block + + Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690551 + +Guenter Knauf (13 Oct 2012) +- Fix now broken libmetalink-aware OpenSSL build. + +- Revert c44e674; add OpenSSL includes/defines. + + The makefile is designed to build against a libmetalink devel package; + therefore is does not matter what will change inside libmetalink. + Add OpenSSL includes and defines for libmetalink-aware OpenSSL builds. + +Daniel Stenberg (10 Oct 2012) +- version-bump: towards 7.28.1! + +- THANKS: 14 new contributors from 7.28.0 + Version 7.28.0 (10 Oct 2012) Daniel Stenberg (10 Oct 2012) @@ -5039,518 +5598,3 @@ Daniel Stenberg (6 Dec 2011) and then run a program which uses the multi-interface. - test 815: verify POP3 dot-first-on-line unescaping - -- [Steve Holme brought this change] - - POP3: fixed escaped dot not being striped out - - Changed the eob detection to work across the whole of the buffer so that - lines that begin with a dot (which the server will have escaped) are - passed to the client application correctly. - -Yang Tse (30 Nov 2011) -- buildconf: follow-up for commit 7e02f7fd - -- buildconf: fix libtool 1.5.x warnings triggered with autoconf 2.6x or later - - Using libtool 1.5.x (x < 26) with autoconf 2.6x or later generates warnings - due to some libtool variables not following naming convention for variables - that will be cached. - - This is addressed renaming a couple of variables to make these follow expected - naming convention. - -Daniel Stenberg (30 Nov 2011) -- RELEASE-NOTES: synced with 1038d0aa1 - - 5 bugfixes and 1 new contributor - -Yang Tse (29 Nov 2011) -- pop3.c: fix compiler warning - -- configure: avoid usage of macro PKG_CHECK_MODULES - - libidn option adjusted in order to use pkg-config info when available - in a similar way as we already do for other libraries. - -Daniel Stenberg (29 Nov 2011) -- POP3: detect when LIST returns no mails - - By making sure the function can detect an "end of body" sequence - immediately on the first line, test 811 is now enabled. - -- ftpserver: output CRLF in logs - - Previously the log function would just filter out all CR and LF - occurances from the log to make it more readable. This had the downside - that it made it very hard to see CR LFs when they actually matters. - - Now, they're instead converted to "[CR]" and "[LR]" in the log to become - apparent to readers. - -- POP3: fix end of body detection - - Curl_pop3_write() now has a state machine that scans for the end of a - POP3 body so that the CR LF '.' CR LF sequence can come in everything - from one up to five subsequent packets. - - Test case 810 is modified to use SLOWDOWN which makes the server pause - between each single byte and thus makes the POP3 body get sent to curl - basically one byte at a time. - -- test: added POP3 test with dot-prefixed line - - Test 815 is disabled for now since libcurl currently doesn't unescape - such lines the way it should. See mail: - - http://curl.haxx.se/mail/lib-2011-11/0324.html - -- configure: fix to make older pkg-config play well - - configure.ac:1349: error: possibly undefined macro: PKG_CONFIG_LIBDIR - - Obviously this is not a problem with pkg-config 0.26 but older versions - seem to show this. - - Fix suggested by: Kamil Dudka - Reported by: Guenter - Bug: http://curl.haxx.se/mail/lib-2011-11/0298.html - -- test 1211: FTP test to repeat bug #3429299 - - "Active FTP hangs if server does not open data connection" - - The server first sends a 150 and then when libcurl waits for the data - transfer, the server sends a 425. - -- [Mark Brand brought this change] - - configure: add support for pkg-config detection of libidn - -- FTP tests 1206 - 1209: don't expect QUIT - - The protocol parts for these tests do not include QUIT simply because - the error is CURLE_OPERATION_TIMEDOUT (28) which is a generic timeout - error without specificly saying for which connection it concerns, and - for timeouts libcurl marks the control channel as "invalid". As this - test case times out for the data connection it could still use the - control channel. - -Yang Tse (25 Nov 2011) -- CyaSSL 2.0+ library initialization adjustment - -Daniel Stenberg (25 Nov 2011) -- [Jonas Schnelli brought this change] - - rectify comment - -- SSLSESSION_SHARED: new macro to check if session is shared - - Added convenience macro to use to check if a handle is using a shared - SSL session, and fixed so that Curl_ssl_close_all() doesn't lock when - the session isn't shared. - -Yang Tse (25 Nov 2011) -- telnet.c: fix MSVC compiler warning - -- tvdiff_secs(): sub-zero time difference adjustment - - Skip a floating point addition operation when integral part of time difference - is zero. This avoids potential floating point addition rounding problems while - preserving decimal part value. - -Daniel Stenberg (25 Nov 2011) -- telnet: fix macros to allow proper semicolon use - - Macros that look like function calls need to be made so that we can use - semicolons properly for indentation and for reducing the risk for - mistakes when using them. - -- [Laurent Rabret brought this change] - - TELNET: improved treatment of options - - 1) enables the Window Size option - 2) allows the server to enable the echo mode - 3) allows an app using libcurl to disable the default binary mode - - Signed-off-by: Laurent Rabret - -- RELEASE-NOTES: synced with 2c905fd1f82 - -- [Jonas Schnelli brought this change] - - query-part: ignore the URI part for given protocols - - By setting PROTOPT_NOURLQUERY in the protocol handler struct, the - protocol will get the "query part" of the URL cut off before the data is - handled by the protocol-specific code. This makes libcurl adhere to - RFC3986 section 2.2. - - Test 1220 is added to verify a file:// URL with query-part. - -- symbols.pl: provide LIBCURL_HAS macro for apps - - Experience has shown that the symbols-in-versions file is very useful to - applications that want to build with a wide range of libcurl versions. - It is however easy to get it wrong and the source gets a bit messy with - all the fixed numerical comparisions. - - The point of this script is to provide an easy-to-use macro for libcurl- - using applications to do preprocessor checks for specific libcurl - defines, and yet make the code clearly show what the macro is used for. - -Yang Tse (24 Nov 2011) -- lib573.c: fix double data type variable comparison with zero - -- getinfo.c: reset app connect time when clearing session-info time variables - -- Fix unreleased regression when using windows gnutls versions older than 2.8 - -Daniel Stenberg (23 Nov 2011) -- [Mark Brand brought this change] - - gnutls: only translate winsock errors for old versions - - Bugfix: https handshake fails using gnutls 3 on windows - http://sourceforge.net/tracker/index.php?func=detail&aid=3441084&group_id=976&atid=100976 - - New gnutls versions have an error handler that knows about Winsock - errors, which is why gnutls_transport_set_global_errno() was deprecated - and then removed. - - This is a correction of commit f5bb370 (blame me) which meant to - reimplement gnutls_transport_set_global_errno(), which is not necessary. - -- protocol_connect: show verbose connect and set connect time - - Regression: commit b998d95b (shipped first in release 7.22.0) made the - condition always equal false that should reset the TIMER_CONNECT timer - and call the Curl_verboseconnect() function. - - Reported by: "Captain Basil" - Bug: http://curl.haxx.se/mail/archive-2011-11/0035.html - -- -J -O: use -O name if no Content-Disposition header comes! - - A regression between 7.22.0 and 7.23.0 -- downloading a file with the - flags -O and -J results in the content being written to stdout if and - only if there was no Content-Disposition header in the http response. If - there is a C-D header with a filename attribute, the output is correctly - written. - - Reported by: Dave Reisner - Bug: http://curl.haxx.se/mail/archive-2011-11/0030.html - -- [Martin Storsjo brought this change] - - Add support for using nettle instead of gcrypt as gnutls backend - -- [Jonas Schnelli brought this change] - - test: SFTP quote commands with * prefix - - Related to the f64812ca63 commit - -- CURLOPT_QUOTE: SFTP supports the '*'-prefix now - -- [Jonas Schnelli brought this change] - - SFTP: support '*' prefix for quote operations - - prefixing a command with '*' means it is allowed to fail without - aborting the chain actions - -- getsessionid: don't ever return while locked - - Also, check for the session sharing bit instead of comparing pointers - -- Curl_ssl_getsessionid: increase the value, not the pointer - -- THANKS: one new contributor in 7.23.1 - -- [Alejandro Alvarez Ayllon brought this change] - - SSL session share: move the age counter to the share object - - Previously the age counter would be counted individually in each easy - handle that shared SSL sessions! - -- [Alejandro Alvarez Ayllon brought this change] - - libtest build: add the missing lib586 - -- [Jason Glasgow brought this change] - - CURLOPT_DNS_SERVERS: set name servers if possible - -- RELEASE-NOTES: correct the release and contributor numbers - -Version 7.23.1 (17 Nov 2011) - -Daniel Stenberg (17 Nov 2011) -- FindWin32CACert: return OK even if CA cert isn't found - - Bug: http://curl.haxx.se/mail/lib-2011-11/0180.html - Reported by: Mark Brand - -Dan Fandrich (16 Nov 2011) -- curl has been built on many Android versions - -Daniel Stenberg (15 Nov 2011) -- 7.24.0: start the work - -- THANKS: added 18 new contributors from 7.23.0 - -Version 7.23.0 (14 Nov 2011) - -Dan Fandrich (14 Nov 2011) -- curl_easy_setopt arguments should be of type long in the examples - -Daniel Stenberg (12 Nov 2011) -- RELEASE-NOTES: synced with 10120e6a - - one more bug fix and contributor - -- progress_cb: avoid buffer overflow - - The progress bar output function would blindly use the terminal width - without bounds checking. When using a very wide terminal that caused a - buffer overflow and segfault. - - We now limit the max bar with to 255 columns, and I simplified the code - to avoid an extra snprintf and buffer. - - Bug: http://curl.haxx.se/bug/view.cgi?id=3435710 - Reported by: Alexey Zakhlestin - -Yang Tse (11 Nov 2011) -- Active mode FTP test cases with server not establishing data connection - - 591 -> FTP multi PORT and 425 on upload - 592 -> FTP multi PORT and 421 on upload - 593 -> FTP multi PORT upload, no data conn and no transient neg. reply - 594 -> FTP multi PORT upload, no data conn and no positive prelim. reply - - 1206 -> FTP PORT and 425 on download - 1207 -> FTP PORT and 421 on download - 1208 -> FTP PORT download, no data conn and no transient negative reply - 1209 -> FTP PORT download, no data conn and no positive preliminary reply - -Guenter Knauf (8 Nov 2011) -- Fix to skip untrusted certs. - -Daniel Stenberg (6 Nov 2011) -- RELEASE-NOTES: synced with e3166df1bb3 - - 4 new bugfixes, 2 more contributors - -- ftp PORT: don't hang if bind() fails - - When the user requests PORT with a specific port or port range, the code - could lock up in an endless loop. There's now an extra conditional that - makes sure to special treat the error and try the local address only - once so a second failure will abort the loop correctly. - - Bug: http://curl.haxx.se/bug/view.cgi?id=3433968 - Reported by: Gokhan Sengun - -- pingpong: change two comments wrongly referring "FTP" - - Just a sign of where the code originally was ripped out from. Now it is - generic "pingpong". - -- test 590: verify the bug fix in 4851dafcf1 - - This test is created to verify Rene Bernhardt's patch which makes sure - libcurl properly _not_ deals with Negotiate if not asked to even if the - proxy says it can serve it. - -- [Rene Bernhardt brought this change] - - HTTP auth: fix proxy Negotiate bug - - If a proxy offers several Authentication schemes where NTLM and - Negotiate are offered by the proxy and you tell libcurl not to use the - Negotiate scheme then the request never returns when the proxy answers - with its HTTP 407 reply. - - It is reproducible by the following steps: - - - Use a proxy that offers NTLM and Negotiate ( CURLOPT_PROXY and - CURLOPT_PROXYPORT ) - - - Tell libcurl NOT to use Negotiate CURL_EASY_SETOPT(CURLOPT_PROXYAUTH, - CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM ) - - - Start the request - - The call to CURL_EASY_PERFORM never returns. If you switch on debug - logging you can see that libcurl issues a new request As soon as it - received the 407 reply. Instead it should return and set the response - code to 407. - - Bug: http://curl.haxx.se/mail/lib-2011-10/0323.html - -Yang Tse (4 Nov 2011) -- ssluse.c: fix calling of OpenSSL's ERR_remove_state(0) - - Move calling of ERR_remove_state(0) a.k.a ERR_remove_thread_state(NULL) - from Curl_ossl_close_all() to Curl_ossl_cleanup(). - - In this way ERR_remove_state(0) is now only called in libcurl by - curl_global_cleanup(). Previously it would get called by functions - curl_easy_cleanup(), curl_multi_cleanup and potentially each time a - connection was removed from a connection cache leading to premature - destruction of OpenSSL's thread local state hash. - - Multi-threaded apps using OpenSSL enabled libcurl should still call - function ERR_remove_state(0) or ERR_remove_thread_state(NULL) at the - very end end of threads that do not call curl_global_cleanup(). - -- tool_cb_wrt.c: disambiguate warning message - -- tool_cfgable.c: pending check done - -- url.c and file.c: fix OOM triggered segfault - -Daniel Stenberg (3 Nov 2011) -- rename ftp_ssl: the struct field is used for many protocols - - Now called 'use_ssl' instead, which better matches the current CURLOPT - name and since the option is used for all pingpong protocols (at least) - it makes sense to not use 'ftp' in the name. - -Yang Tse (2 Nov 2011) -- [Daniel Stenberg brought this change] - - gtls_connect_step1: remove use of deprecated functions - - Use gnutls_priority_set_direct() instead of gnutls_protocol_set_priority(). - - Remove the gnutls_certificate_type_set_priority() use since x509 is the - default certificate type anyway. - - Reported by: Vincent Torri - -- url.c and transfer.c: nullify connection pointer when free()'ed - -- FTP test server: NODATACONN commands follow-up - - Make NODATACONN425 and NODATACONN421 return a 150 positive preliminary reply - before 425 or 421. - - New NODATACONN150 returns 150 without further positive nor negative reply - - Now NODATACONN doesn't reply anything at all. - -- multi.c: OOM handling fix - -- FTP test server: NODATACONN commands follow-up - - Make NODATACONN custom commands apply to both active and passive FTP, - and ensure 425 and 421 are not returned unless data channel usage is - attempted. - -- tool_cb_see.h: fix compiler warning - -- setup.h: fix compiler warning - -- FTP test server: NODATACONN commands commit c761fcb0 follow-up - - Adjustments that make NODATACONN custom commands fully usable. - -Daniel Stenberg (30 Oct 2011) -- [Dave Reisner brought this change] - - doc/curl.1: fix sentence with ending for -# option - - Try to be a little more descriptive about the effect of this flag, - rather than parroting what was said in the paragraph just above. - -Yang Tse (30 Oct 2011) -- FTP test server: fix server unresponsiveness - - Some torture tests left FTP test server in an unresponsive state, resulting - in torture tests that actually completed following unexpected code paths. - - Changes in this commit solely address this issue and some adjustments for - ftpserver.pl logging relative to data channel establishment and tear down. - Pending NODATACONN relative adjustments reserved for a further commit. - -- runtests.pl: running server checks - commit 4464583a follow-up - - Ensure verification takes place with no server commands file. - Ignore verbose setting for running server precheck. - Tweak unresponsive server message, to allow detection by haxx.se scripts. - -- gtls.c: gnutls_transport_set_global_errno() deprecated in version 2.12.3 - -- runtests.pl: running server checks - commit 3676ec96 follow-up - - Fix called sub when checking TFTP server, and adjust message. - -- runtests.pl: running server checks - commit 4464583a follow-up - - Extended server checks to others in addition to pingpong when torture testing. - -- lib589.c: add CURLOPT_READDATA missing stuff - -- ftpserver.pl: three new custom FTP server commands to disable data channel - - NODATACONN421: applies only to active FTP mode, instructs server to not - establish data connection back to client and reply with FTP 421. - - NODATACONN425: applies only to active FTP mode, instructs server to not - establish data connection back to client and reply with FTP 425. - - NODATACONN: applies to both active and passive FTP modes, instructs server - to not establish nor accept a data channel and fool client into believing - that the data channel connection is possible. - - Some polishing probably required. - -- multi.c: OOM handling fix - - Fix curl_multi_cleanup() segfault when using weird cleanup sequence. - -Daniel Stenberg (27 Oct 2011) -- multi: start ftp state machine when switching to DO_MORE - - This extends the fix from commit d7934b8bd491 - - When the multi state is changed within the multi_runsingle from DOING to - DO_MORE, we didn't immediately start the FTP state machine again. That - then left the FTP state in FTP_STOP. When curl_multi_fdset() was - subsequently called, the ftp_domore_getsock() function would return the - wrong fd info. - - Reported by: Gokhan Sengun - -- libcurl-multi.3: update the list of areas still blocking - -Yang Tse (26 Oct 2011) -- test 589: active FTP upload using multi timeout and EPRT disabled server - -- multi tests: OOM handling fixes - commit 629d2e34 follow-up - -Patrick Monnerat (26 Oct 2011) -- - Prepare the ILE/RPG binding and OS400 documentation for the upcoming release - -Daniel Stenberg (25 Oct 2011) -- RELEASE-NOTES: synced with 4464583a6ed - - 5 more bug fixes, 4 additional contributors - -Yang Tse (25 Oct 2011) -- runtests.pl: running server checks - - When running torture tests, verify before each test case that required - pingpong servers which are supposed to be alive are actually responsive. - If found not responsive then restart them. - -Daniel Stenberg (24 Oct 2011) -- dist: add test 587 - - I created test 587 in commit 840eff44f2b but forgot to add the file to - the tarball. Added now. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 09cbd487..ce4002fd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -1,62 +1,51 @@ -Curl and libcurl 7.28.0 +Curl and libcurl 7.28.1 - Public curl releases: 129 + Public curl releases: 130 Command line options: 152 curl_easy_setopt() options: 199 Public functions in libcurl: 58 Known libcurl bindings: 39 - Contributors: 953 + Contributors: 979 This release includes the following changes: - o SSH: added agent based authentication - o ftp: active conn, allow application to set sockopt after accept() call - with CURLSOCKTYPE_ACCEPT - o multi: add curl_multi_wait() [12] - o metalink: Added support for Microsoft Windows CryptoAPI - o md5: Added support for Microsoft Windows CryptoAPI - o parse_proxy: treat "socks://x" as a socks4 proxy [17] - o socks: Added support for IPv6 connections through SOCKSv5 proxy + o metalink/md5: Use CommonCrypto on Apple operating systems + o href_extractor: new example code extracting href elements + o NSS can be used for metalink hashing [13] This release includes the following bugfixes: - o WSAPoll disabled on Windows builds due to its bugs [8] - o segfault on request retries [1] - o curl-config: parentheses fix [2] - o VC build: add define for openssl [3] - o globbing: fix segfault when >9 globs were used [4] - o fixed a few clang-analyzer warnings - o metalink: change code order to build with gnutls-nettle [5] - o gtls: fix build failure by including nettle-specific headers [5] - o change preferred HTTP auth on a handle previously used for another auth [9] - o file: use fdopen() to avoid race condition [6] - o Added DWANT_IDN_PROTOTYPES define for MSVC too [7] - o verbose: fixed (nil) output of hostnames in re-used connections [10] - o metalink: Un-broke the build when building --with-darwinssl - o curl man page cleanup - o Avoid leak of local device string when reusing connection - o Curl_socket_check: fix return code for timeout [11] - o nss: do not print misleading NSS error codes - o configure: remove the --enable/disable-nonblocking options - o darwinssl: add TLS 1.1 and 1.2 support, replace deprecated functions - o NTLM: re-use existing connection better - o schannel crash on multi and easy handle cleanup - o SOCKS: truly disable it if CURL_DISABLE_PROXY is defined [13] - o mk-ca-bundle: detect start of trust section better [14] - o gnutls: do not fail on non-fatal handshake errors [15] - o SMTP: only send SIZE if supported [16] - o ftpserver: respond with a 250 to SMTP EHLO - o ssh: do not crash if MD5 fingerprint is not provided by libssh2 - o winbuild: Added support for building with SPNEGO enabled - o metalink: Fixed validation of binary files containing EOF - o setup.h: fixed for MS VC10 build [18] - o cmake: use standard findxxx modules for cmake v2.8+ - o HTTP_ONLY: disable more protocols [19] - o Curl_reconnect_request: clear pointer on failure [20] - o https.c example: remember to call curl_global_init() - o metalink: Filter resource URLs by type - o multi interface: CURLOPT_LOW_SPEED_* fix during rate limitation [21] - o curl_schannel: Removed buffer limit and optimized buffer strategy + o Fix broken libmetalink-aware OpenSSL build + o gnutls: fix the error is fatal logic [1] + o darwinssl: un-broke iOS build, fix error on server disconnect + o asyn-ares: restore functionality with c-ares < 1.6.1 [2] + o tlsauthtype: deal with the string case insensitively [3] + o Fixed MSVC libssh2 static build + o evhiperfifo: fix the pointer passed to WRITEDATA [6] + o BUGS: fix the bug tracker URL [4] + o winbuild: Use machine type of development environment + o FTP: prevent the multi interface from blocking [5] + o uniformly use AM_CPPFLAGS, avoid deprecated INCLUDES + o httpcustomheader.c: free the headers after use + o fix >2000 bytes POST over NTLM-using proxy [7] + o redirects to URLs with fragments [8] + o don't send '#' fragments when using proxy [9] + o OpenSSL: show full issuer string [10] + o fix HTTP auth regression [11] + o CURLOPT_SSL_VERIFYHOST: stop supporting the 1 value [12] + o ftp: EPSV-disable fix over SOCKS [14] + o Digest: Add microseconds into nounce calculation [15] + o SCP/SFTP: improve error code used for send failures + o SSL: Several SSL-backend related fixes + o removed the notorious "additional stuff not fine" debug output + o OpenSSL: Disable SSL/TLS compression - avoid the "CRIME" attack + o FILE: Make upload-writes unbuffered + o custom memory callbacks failure with HTTP proxy (and more) [16] + o TFTP: handle resends + o autoconf: don't force-disable compiler debug option + o winbuild: Fix PDB file output [17] + o test2032: spurious failure caused by premature termination [18] + o memory leak: CURLOPT_RESOLVE with multi interface [19] This release includes the following known bugs: @@ -65,35 +54,34 @@ This release includes the following known bugs: This release would not have looked like this without help, code, reports and advice from friends like these: - Guenter Knauf, Joe Mason, Kamil Dudka, Steve Holme, Anthony G. Basile, - Edward Sheldrake, Jan Koen Annot, Maxime Larocque, Mike Crowe, Anthony Bryan, - Nick Zitzmann, Gisle Vanem, Armel Asselin, Dan Fandrich, Dave Reisner, - Gokhan Sengun, Sara Golemon, Olivier Berger, Marc Hoersken, David Blaikie, - Alessandro Ghedini, František Kučera, Marcel Raad, Scott Bailey, Ho-chi Chen, - Tomas Mlcoch, Jie He, Tatsuhiro Tsujikawa, Sergei Nikulov, Mark Tully + Guenter Knauf, Alessandro Ghedini, Nick Zitzmann, Michal Kowalczyk, + Jeff Connelly, Oscar Norlander, Guido Berhoerster, Marc Hoersken, + Dave Reisner, Jan Ehrhardt, John Suprock, Alessandro Ghedini, + Lars Buitinck, Anton Malov, Sergei Nikulov, Patrick Monnerat, + Gabriel Sjoberg, Oscar Koeroo, Fabian Keil, Johnny Luong, Cristian Rodríguez, + Sebastian Rasmussen, Mark Snelling, Christian Vogt, Marcin Adamski, + Ajit Dhumale, Alex Gruz Thanks! (and sorry if I forgot to mention someone) References to bug reports and discussions on issues: - [1] = http://curl.haxx.se/bug/view.cgi?id=3544688 - [2] = http://curl.haxx.se/bug/view.cgi?id=3551460 - [3] = http://curl.haxx.se/bug/view.cgi?id=3552997 - [4] = http://curl.haxx.se/bug/view.cgi?id=3546353 - [5] = http://curl.haxx.se/bug/view.cgi?id=3554668 - [6] = https://bugzilla.redhat.com/844385 - [7] = http://curl.haxx.se/mail/lib-2012-07/0271.html - [8] = http://curl.haxx.se/mail/lib-2012-07/0310.html - [9] = http://curl.haxx.se/bug/view.cgi?id=3545398 - [10] = http://curl.haxx.se/mail/lib-2012-07/0111.html - [11] = http://curl.haxx.se/mail/lib-2012-07/0122.html - [12] = http://daniel.haxx.se/blog/2012/09/03/introducing-curl_multi_wait/ - [13] = http://curl.haxx.se/bug/view.cgi?id=3561305 - [14] = http://curl.haxx.se/mail/lib-2012-09/0019.html - [15] = http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685402 - [16] = http://curl.haxx.se/bug/view.cgi?id=3564114 - [17] = http://curl.haxx.se/bug/view.cgi?id=3566860 - [18] = http://curl.haxx.se/bug/view.cgi?id=3568327 - [19] = http://curl.haxx.se/mail/lib-2012-09/0127.html - [20] = http://curl.haxx.se/mail/lib-2012-09/0188.html - [21] = http://curl.haxx.se/mail/lib-2012-09/0081.html + [1] = http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=690551 + [2] = http://curl.haxx.se/bug/view.cgi?id=3577710 + [3] = http://curl.haxx.se/bug/view.cgi?id=3578418 + [4] = http://curl.haxx.se/bug/view.cgi?id=3582408 + [5] = http://curl.haxx.se/bug/view.cgi?id=3579064 + [6] = http://curl.haxx.se/bug/view.cgi?id=3582407 + [7] = http://curl.haxx.se/bug/view.cgi?id=3582321 + [8] = http://curl.haxx.se/bug/view.cgi?id=3581898 + [9] = http://curl.haxx.se/bug/view.cgi?id=3579813 + [10] = http://curl.haxx.se/bug/view.cgi?id=3579286 + [11] = http://curl.haxx.se/bug/view.cgi?id=3582718 + [12] = http://daniel.haxx.se/blog/2012/10/25/libcurl-claimed-to-be-dangerous/ + [13] = http://curl.haxx.se/bug/view.cgi?id=3578163 + [14] = http://curl.haxx.se/bug/view.cgi?id=3586338 + [15] = https://github.com/bagder/curl/pull/50 + [16] = http://curl.haxx.se/mail/lib-2012-11/0125.html + [17] = http://curl.haxx.se/bug/view.cgi?id=3586741 + [18] = http://curl.haxx.se/mail/lib-2012-11/0095.html + [19] = http://curl.haxx.se/bug/view.cgi?id=3575448 @@ -14720,7 +14720,7 @@ $as_echo "yes" >&6; } compiler_id="DEC_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g2" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -O4" flags_opt_yes="-O1" flags_opt_off="-O0" @@ -14944,7 +14944,7 @@ rm -f conftest.err conftest.$ac_ext compiler_id="INTEL_UNIX_C" flags_dbg_all="-g -g0" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -15029,7 +15029,7 @@ $as_echo "yes" >&6; } flags_dbg_all="$flags_dbg_all -gdwarf-2" flags_dbg_all="$flags_dbg_all -gvms" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4" flags_opt_yes="-Os" flags_opt_off="-O0" @@ -15099,7 +15099,7 @@ $as_echo "yes" >&6; } flags_dbg_all="$flags_dbg_all -gdwarf-2" flags_dbg_all="$flags_dbg_all -gvms" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -15337,7 +15337,7 @@ $as_echo "yes" >&6; } compiler_id="SGI_MIPSPRO_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -15437,7 +15437,7 @@ $as_echo "yes" >&6; } compiler_id="SGI_MIPS_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -35,9 +35,11 @@ BUGS have a go at a solution. You can optionally also post your bug/problem at curl's bug tracking system over at - http://sourceforge.net/bugs/?group_id=976 + http://sourceforge.net/tracker/?group_id=976&atid=100976 - (but please read the sections below first before doing that) + Please read the rest of this document below first before doing that! Also, + you need to login to your sourceforge account before being able to submit a + bug report (necessary evil done to avoid spam). If you feel you need to ask around first, find a suitable mailing list and post there. The lists are available on http://curl.haxx.se/mail/ diff --git a/docs/THANKS b/docs/THANKS index 38278138..dee940be 100644 --- a/docs/THANKS +++ b/docs/THANKS @@ -207,6 +207,7 @@ Dave Reisner Dave Vasilevsky David Bau David Binderman +David Blaikie David Byron David Cohen David Eriksson @@ -263,6 +264,7 @@ Early Ehlinger Ebenezer Ikonne Edin Kadribasic Eduard Bloch +Edward Sheldrake Eelco Dolstra Eetu Ojanen Ellis Pritchard @@ -302,6 +304,7 @@ Frank McGeough Frank Meier Frank Ticheler Frank Van Uffelen +František Kučera Fred Machado Fred New Fred Noz @@ -360,6 +363,7 @@ Henrik Storner Henry Ludemann Herve Amblard Hidemoto Nakada +Ho-chi Chen Hoi-Ho Chan Hongli Lai Howard Chu @@ -397,6 +401,7 @@ Jamie Lokier Jamie Newton Jamie Wilkinson Jan Ehrhardt +Jan Koen Annot Jan Kunder Jan Schaumann Jan Van Boghout @@ -428,6 +433,7 @@ Jerry Wu Jes Badwal Jesper Jensen Jesse Noller +Jie He Jim Drash Jim Freeman Jim Hollinger @@ -435,6 +441,7 @@ Jim Meyering Jocelyn Jaubert Joe Halpin Joe Malicki +Joe Mason Joel Chen Jofell Gallardo Johan Anderson @@ -579,6 +586,7 @@ Mark Incley Mark Karpeles Mark Lentczner Mark Salisbury +Mark Tully Markus Duft Markus Koetter Markus Moeller @@ -612,6 +620,7 @@ Max Katsev Maxim Ivanov Maxim Perenesenko Maxim Prohorov +Maxime Larocque Mehmet Bozkurt Mekonikum Mettgut Jamalla @@ -680,6 +689,7 @@ Ofer Olaf Flebbe Olaf Stueben Olaf Stüben +Olivier Berger Oren Tirosh Ori Avtalion P R Schaffner @@ -823,13 +833,16 @@ Sander Gates Sandor Feldi Santhana Todatry Saqib Ali +Sara Golemon Saul good +Scott Bailey Scott Barrett Scott Cantor Scott Davis Scott McCreary Sebastien Willemijns Senthil Raja Velu +Sergei Nikulov Sergio Ballestrero Seshubabu Pasam Sh Diao @@ -913,6 +926,7 @@ Tom Mueller Tom Regner Tom Wright Tom Zerucha +Tomas Mlcoch Tomas Pospisek Tomas Szepe Tomasz Lacki diff --git a/docs/curl-config.pdf b/docs/curl-config.pdf Binary files differindex 87b5ea48..e51f1772 100644 --- a/docs/curl-config.pdf +++ b/docs/curl-config.pdf diff --git a/docs/curl.pdf b/docs/curl.pdf Binary files differindex 4fb95132..f5821bfd 100644 --- a/docs/curl.pdf +++ b/docs/curl.pdf diff --git a/docs/examples/Makefile.am b/docs/examples/Makefile.am index 27d20dfb..eb4e7c76 100644 --- a/docs/examples/Makefile.am +++ b/docs/examples/Makefile.am @@ -34,14 +34,13 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \ # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h # $(top_srcdir)/include is for libcurl's external include files -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -DCURL_NO_OLDIES LIBDIR = $(top_builddir)/lib -AM_CPPFLAGS = -DCURL_NO_OLDIES - # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB AM_CPPFLAGS += -DCURL_STATICLIB diff --git a/docs/examples/Makefile.in b/docs/examples/Makefile.in index 9f17a983..008c01b1 100644 --- a/docs/examples/Makefile.in +++ b/docs/examples/Makefile.in @@ -533,12 +533,9 @@ EXTRA_DIST = README Makefile.example Makefile.inc Makefile.m32 \ # $(top_builddir)/include/curl for generated curlbuild.h included from curl.h # $(top_builddir)/include for generated curlbuild.h included from lib/setup.h # $(top_srcdir)/include is for libcurl's external include files -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include - +AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \ + -I$(top_srcdir)/include -DCURL_NO_OLDIES $(am__append_1) LIBDIR = $(top_builddir)/lib -AM_CPPFLAGS = -DCURL_NO_OLDIES $(am__append_1) # Dependencies LDADD = $(LIBDIR)/libcurl.la @@ -548,7 +545,7 @@ LDADD = $(LIBDIR)/libcurl.la COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \ ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \ opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ - smooth-gtk-thread.c version-check.pl + smooth-gtk-thread.c version-check.pl href_extractor.c all: all-am diff --git a/docs/examples/Makefile.inc b/docs/examples/Makefile.inc index b548ebf7..2b31f86f 100644 --- a/docs/examples/Makefile.inc +++ b/docs/examples/Makefile.inc @@ -12,4 +12,4 @@ check_PROGRAMS = 10-at-a-time anyauthput cookie_interface debug fileupload \ COMPLICATED_EXAMPLES = curlgtk.c curlx.c htmltitle.cc cacertinmem.c \ ftpuploadresume.c ghiper.c hiperfifo.c htmltidy.c multithread.c \ opensslthreadlock.c sampleconv.c synctime.c threaded-ssl.c evhiperfifo.c \ - smooth-gtk-thread.c version-check.pl + smooth-gtk-thread.c version-check.pl href_extractor.c diff --git a/docs/examples/evhiperfifo.c b/docs/examples/evhiperfifo.c index 6de4dadc..c2e87fcc 100644 --- a/docs/examples/evhiperfifo.c +++ b/docs/examples/evhiperfifo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -336,7 +336,7 @@ static void new_conn(char *url, GlobalInfo *g ) conn->url = strdup(url); curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url); curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb); - curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn); + curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn); curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L); curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error); curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn); diff --git a/docs/examples/href_extractor.c b/docs/examples/href_extractor.c new file mode 100644 index 00000000..4b307a29 --- /dev/null +++ b/docs/examples/href_extractor.c @@ -0,0 +1,86 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 2012, 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. + * + ***************************************************************************/ + +/* + * This example uses the "Streaming HTML parser" to extract the href pieces in + * a streaming manner from a downloaded HTML. Kindly donated by Michał + * Kowalczyk. + * + * The parser is found at + * http://code.google.com/p/htmlstreamparser/ + */ + +#include <stdio.h> +#include <curl/curl.h> +#include <htmlstreamparser.h> + + +static size_t write_callback(void *buffer, size_t size, size_t nmemb, + void *hsp) +{ + size_t realsize = size * nmemb, p; + for (p = 0; p < realsize; p++) { + html_parser_char_parse(hsp, ((char *)buffer)[p]); + if (html_parser_cmp_tag(hsp, "a", 1)) + if (html_parser_cmp_attr(hsp, "href", 4)) + if (html_parser_is_in(hsp, HTML_VALUE_ENDED)) { + html_parser_val(hsp)[html_parser_val_length(hsp)] = '\0'; + printf("%s\n", html_parser_val(hsp)); + } + } + return realsize; +} + +int main(int argc, char *argv[]) +{ + char tag[1], attr[4], val[128]; + CURL *curl; + HTMLSTREAMPARSER *hsp; + + if (argc != 2) { + printf("Usage: %s URL\n", argv[0]); + return EXIT_FAILURE; + } + + curl = curl_easy_init(); + + hsp = html_parser_init(); + + html_parser_set_tag_to_lower(hsp, 1); + html_parser_set_attr_to_lower(hsp, 1); + html_parser_set_tag_buffer(hsp, tag, sizeof(tag)); + html_parser_set_attr_buffer(hsp, attr, sizeof(attr)); + html_parser_set_val_buffer(hsp, val, sizeof(val)-1); + + curl_easy_setopt(curl, CURLOPT_URL, argv[1]); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, hsp); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + + curl_easy_perform(curl); + + curl_easy_cleanup(curl); + + html_parser_cleanup(hsp); + + return EXIT_SUCCESS; +} diff --git a/docs/examples/httpcustomheader.c b/docs/examples/httpcustomheader.c index 5c013750..07ff9599 100644 --- a/docs/examples/httpcustomheader.c +++ b/docs/examples/httpcustomheader.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -53,6 +53,9 @@ int main(void) /* always cleanup */ curl_easy_cleanup(curl); + + /* free the custom headers */ + curl_slist_free_all(chunk); } return 0; } diff --git a/docs/libcurl/curl_easy_cleanup.pdf b/docs/libcurl/curl_easy_cleanup.pdf Binary files differindex 9ef32755..b5eed30f 100644 --- a/docs/libcurl/curl_easy_cleanup.pdf +++ b/docs/libcurl/curl_easy_cleanup.pdf diff --git a/docs/libcurl/curl_easy_duphandle.pdf b/docs/libcurl/curl_easy_duphandle.pdf Binary files differindex 49afd457..1b3a55b1 100644 --- a/docs/libcurl/curl_easy_duphandle.pdf +++ b/docs/libcurl/curl_easy_duphandle.pdf diff --git a/docs/libcurl/curl_easy_escape.pdf b/docs/libcurl/curl_easy_escape.pdf Binary files differindex 01a99447..6dc81d5c 100644 --- a/docs/libcurl/curl_easy_escape.pdf +++ b/docs/libcurl/curl_easy_escape.pdf diff --git a/docs/libcurl/curl_easy_getinfo.pdf b/docs/libcurl/curl_easy_getinfo.pdf Binary files differindex ae0bc0de..29fff8f6 100644 --- a/docs/libcurl/curl_easy_getinfo.pdf +++ b/docs/libcurl/curl_easy_getinfo.pdf diff --git a/docs/libcurl/curl_easy_init.pdf b/docs/libcurl/curl_easy_init.pdf Binary files differindex b9a2b56a..028e9713 100644 --- a/docs/libcurl/curl_easy_init.pdf +++ b/docs/libcurl/curl_easy_init.pdf diff --git a/docs/libcurl/curl_easy_pause.pdf b/docs/libcurl/curl_easy_pause.pdf Binary files differindex 2d506dbb..ea30a88f 100644 --- a/docs/libcurl/curl_easy_pause.pdf +++ b/docs/libcurl/curl_easy_pause.pdf diff --git a/docs/libcurl/curl_easy_perform.pdf b/docs/libcurl/curl_easy_perform.pdf Binary files differindex a5ba7fd1..6fde44c6 100644 --- a/docs/libcurl/curl_easy_perform.pdf +++ b/docs/libcurl/curl_easy_perform.pdf diff --git a/docs/libcurl/curl_easy_recv.pdf b/docs/libcurl/curl_easy_recv.pdf Binary files differindex 40075546..101bbf30 100644 --- a/docs/libcurl/curl_easy_recv.pdf +++ b/docs/libcurl/curl_easy_recv.pdf diff --git a/docs/libcurl/curl_easy_reset.pdf b/docs/libcurl/curl_easy_reset.pdf Binary files differindex ba42bb3a..4f41d552 100644 --- a/docs/libcurl/curl_easy_reset.pdf +++ b/docs/libcurl/curl_easy_reset.pdf diff --git a/docs/libcurl/curl_easy_send.pdf b/docs/libcurl/curl_easy_send.pdf Binary files differindex d62d5394..9a94c6e3 100644 --- a/docs/libcurl/curl_easy_send.pdf +++ b/docs/libcurl/curl_easy_send.pdf diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 3b0dc6c9..a388c222 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -2323,8 +2323,9 @@ Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect. -When the value is 1, the certificate must contain a Common Name field, but it -doesn't matter what name it says. (This is not ordinarily a useful setting). +When the value is 1, libcurl will return a failure. It was previously (in +7.28.0 and earlier) a debug option of some sorts, but it is no longer +supported due to frequently leading to programmer mistakes. When the value is 0, the connection succeeds regardless of the names in the certificate. diff --git a/docs/libcurl/curl_easy_setopt.html b/docs/libcurl/curl_easy_setopt.html index 788876fb..27d1b889 100644 --- a/docs/libcurl/curl_easy_setopt.html +++ b/docs/libcurl/curl_easy_setopt.html @@ -845,7 +845,7 @@ p.roffit { <p class="level1">When negotiating a SSL connection, the server sends a certificate indicating its identity. <p class="level1">When <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> is 2, that certificate must indicate that the server is the server to which you meant to connect, or the connection fails. <p class="level1">Curl considers the server the intended one when the Common Name field or a Subject Alternate Name field in the certificate matches the host name in the URL to which you told Curl to connect. -<p class="level1">When the value is 1, the certificate must contain a Common Name field, but it doesn't matter what name it says. (This is not ordinarily a useful setting). +<p class="level1">When the value is 1, libcurl will return a failure. It was previously (in 7.28.0 and earlier) a debug option of some sorts, but it is no longer supported due to frequently leading to programmer mistakes. <p class="level1">When the value is 0, the connection succeeds regardless of the names in the certificate. <p class="level1">The default value for this option is 2. <p class="level1">This option controls checking the server's certificate's claimed identity. The server could be lying. To control lying, see <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a>. If libcurl is built against NSS and <a class="emphasis" href="#CURLOPTSSLVERIFYPEER">CURLOPT_SSL_VERIFYPEER</a> is zero, <a class="emphasis" href="#CURLOPTSSLVERIFYHOST">CURLOPT_SSL_VERIFYHOST</a> is ignored. diff --git a/docs/libcurl/curl_easy_setopt.pdf b/docs/libcurl/curl_easy_setopt.pdf Binary files differindex e803d7ac..8a5a5ec1 100644 --- a/docs/libcurl/curl_easy_setopt.pdf +++ b/docs/libcurl/curl_easy_setopt.pdf diff --git a/docs/libcurl/curl_easy_strerror.pdf b/docs/libcurl/curl_easy_strerror.pdf Binary files differindex 659eabd4..62d0967b 100644 --- a/docs/libcurl/curl_easy_strerror.pdf +++ b/docs/libcurl/curl_easy_strerror.pdf diff --git a/docs/libcurl/curl_easy_unescape.pdf b/docs/libcurl/curl_easy_unescape.pdf Binary files differindex 358eb12b..266c752f 100644 --- a/docs/libcurl/curl_easy_unescape.pdf +++ b/docs/libcurl/curl_easy_unescape.pdf diff --git a/docs/libcurl/curl_escape.pdf b/docs/libcurl/curl_escape.pdf Binary files differindex a50987bc..413b65b8 100644 --- a/docs/libcurl/curl_escape.pdf +++ b/docs/libcurl/curl_escape.pdf diff --git a/docs/libcurl/curl_formadd.pdf b/docs/libcurl/curl_formadd.pdf Binary files differindex 5fd0605a..4a986408 100644 --- a/docs/libcurl/curl_formadd.pdf +++ b/docs/libcurl/curl_formadd.pdf diff --git a/docs/libcurl/curl_formfree.pdf b/docs/libcurl/curl_formfree.pdf Binary files differindex c885784c..a36b12b8 100644 --- a/docs/libcurl/curl_formfree.pdf +++ b/docs/libcurl/curl_formfree.pdf diff --git a/docs/libcurl/curl_formget.pdf b/docs/libcurl/curl_formget.pdf Binary files differindex 29cb723e..7a0b1cdd 100644 --- a/docs/libcurl/curl_formget.pdf +++ b/docs/libcurl/curl_formget.pdf diff --git a/docs/libcurl/curl_free.pdf b/docs/libcurl/curl_free.pdf Binary files differindex a87dd391..48395cf1 100644 --- a/docs/libcurl/curl_free.pdf +++ b/docs/libcurl/curl_free.pdf diff --git a/docs/libcurl/curl_getdate.pdf b/docs/libcurl/curl_getdate.pdf Binary files differindex 459a1d32..676ef163 100644 --- a/docs/libcurl/curl_getdate.pdf +++ b/docs/libcurl/curl_getdate.pdf diff --git a/docs/libcurl/curl_getenv.pdf b/docs/libcurl/curl_getenv.pdf Binary files differindex 404b120a..13b2bb45 100644 --- a/docs/libcurl/curl_getenv.pdf +++ b/docs/libcurl/curl_getenv.pdf diff --git a/docs/libcurl/curl_global_cleanup.pdf b/docs/libcurl/curl_global_cleanup.pdf Binary files differindex 2892c6a7..8be97c63 100644 --- a/docs/libcurl/curl_global_cleanup.pdf +++ b/docs/libcurl/curl_global_cleanup.pdf diff --git a/docs/libcurl/curl_global_init.pdf b/docs/libcurl/curl_global_init.pdf Binary files differindex 102dfe10..133dffba 100644 --- a/docs/libcurl/curl_global_init.pdf +++ b/docs/libcurl/curl_global_init.pdf diff --git a/docs/libcurl/curl_global_init_mem.pdf b/docs/libcurl/curl_global_init_mem.pdf Binary files differindex 1618ad46..61b0c22c 100644 --- a/docs/libcurl/curl_global_init_mem.pdf +++ b/docs/libcurl/curl_global_init_mem.pdf diff --git a/docs/libcurl/curl_mprintf.pdf b/docs/libcurl/curl_mprintf.pdf Binary files differindex 9f8733c6..d733c515 100644 --- a/docs/libcurl/curl_mprintf.pdf +++ b/docs/libcurl/curl_mprintf.pdf diff --git a/docs/libcurl/curl_multi_add_handle.pdf b/docs/libcurl/curl_multi_add_handle.pdf Binary files differindex 9b8b380c..a3abb8c1 100644 --- a/docs/libcurl/curl_multi_add_handle.pdf +++ b/docs/libcurl/curl_multi_add_handle.pdf diff --git a/docs/libcurl/curl_multi_assign.pdf b/docs/libcurl/curl_multi_assign.pdf Binary files differindex b815d4b2..92244acc 100644 --- a/docs/libcurl/curl_multi_assign.pdf +++ b/docs/libcurl/curl_multi_assign.pdf diff --git a/docs/libcurl/curl_multi_cleanup.pdf b/docs/libcurl/curl_multi_cleanup.pdf Binary files differindex 7f455ad5..01ca783a 100644 --- a/docs/libcurl/curl_multi_cleanup.pdf +++ b/docs/libcurl/curl_multi_cleanup.pdf diff --git a/docs/libcurl/curl_multi_fdset.pdf b/docs/libcurl/curl_multi_fdset.pdf Binary files differindex a4db3c94..58064158 100644 --- a/docs/libcurl/curl_multi_fdset.pdf +++ b/docs/libcurl/curl_multi_fdset.pdf diff --git a/docs/libcurl/curl_multi_info_read.pdf b/docs/libcurl/curl_multi_info_read.pdf Binary files differindex 294fab01..5384c590 100644 --- a/docs/libcurl/curl_multi_info_read.pdf +++ b/docs/libcurl/curl_multi_info_read.pdf diff --git a/docs/libcurl/curl_multi_init.pdf b/docs/libcurl/curl_multi_init.pdf Binary files differindex bbf4e154..dbbf1761 100644 --- a/docs/libcurl/curl_multi_init.pdf +++ b/docs/libcurl/curl_multi_init.pdf diff --git a/docs/libcurl/curl_multi_perform.pdf b/docs/libcurl/curl_multi_perform.pdf Binary files differindex 24abc7f3..66641585 100644 --- a/docs/libcurl/curl_multi_perform.pdf +++ b/docs/libcurl/curl_multi_perform.pdf diff --git a/docs/libcurl/curl_multi_remove_handle.pdf b/docs/libcurl/curl_multi_remove_handle.pdf Binary files differindex ef3d8827..8fa5a1fe 100644 --- a/docs/libcurl/curl_multi_remove_handle.pdf +++ b/docs/libcurl/curl_multi_remove_handle.pdf diff --git a/docs/libcurl/curl_multi_setopt.pdf b/docs/libcurl/curl_multi_setopt.pdf Binary files differindex 2ccbca57..8717aab1 100644 --- a/docs/libcurl/curl_multi_setopt.pdf +++ b/docs/libcurl/curl_multi_setopt.pdf diff --git a/docs/libcurl/curl_multi_socket.pdf b/docs/libcurl/curl_multi_socket.pdf Binary files differindex bd8a4e10..c48abbdf 100644 --- a/docs/libcurl/curl_multi_socket.pdf +++ b/docs/libcurl/curl_multi_socket.pdf diff --git a/docs/libcurl/curl_multi_socket_action.pdf b/docs/libcurl/curl_multi_socket_action.pdf Binary files differindex 93c9585d..c2b223bb 100644 --- a/docs/libcurl/curl_multi_socket_action.pdf +++ b/docs/libcurl/curl_multi_socket_action.pdf diff --git a/docs/libcurl/curl_multi_strerror.pdf b/docs/libcurl/curl_multi_strerror.pdf Binary files differindex 77ea0de0..a55cd69a 100644 --- a/docs/libcurl/curl_multi_strerror.pdf +++ b/docs/libcurl/curl_multi_strerror.pdf diff --git a/docs/libcurl/curl_multi_timeout.pdf b/docs/libcurl/curl_multi_timeout.pdf Binary files differindex df3416cd..1b29f514 100644 --- a/docs/libcurl/curl_multi_timeout.pdf +++ b/docs/libcurl/curl_multi_timeout.pdf diff --git a/docs/libcurl/curl_multi_wait.pdf b/docs/libcurl/curl_multi_wait.pdf Binary files differindex 1bdf532c..00250b4d 100644 --- a/docs/libcurl/curl_multi_wait.pdf +++ b/docs/libcurl/curl_multi_wait.pdf diff --git a/docs/libcurl/curl_share_cleanup.pdf b/docs/libcurl/curl_share_cleanup.pdf Binary files differindex 650b72ae..675086c4 100644 --- a/docs/libcurl/curl_share_cleanup.pdf +++ b/docs/libcurl/curl_share_cleanup.pdf diff --git a/docs/libcurl/curl_share_init.pdf b/docs/libcurl/curl_share_init.pdf Binary files differindex 780a0ed8..fdd00b37 100644 --- a/docs/libcurl/curl_share_init.pdf +++ b/docs/libcurl/curl_share_init.pdf diff --git a/docs/libcurl/curl_share_setopt.pdf b/docs/libcurl/curl_share_setopt.pdf Binary files differindex d1897b39..4690c206 100644 --- a/docs/libcurl/curl_share_setopt.pdf +++ b/docs/libcurl/curl_share_setopt.pdf diff --git a/docs/libcurl/curl_share_strerror.pdf b/docs/libcurl/curl_share_strerror.pdf Binary files differindex 1fe80231..dd631148 100644 --- a/docs/libcurl/curl_share_strerror.pdf +++ b/docs/libcurl/curl_share_strerror.pdf diff --git a/docs/libcurl/curl_slist_append.pdf b/docs/libcurl/curl_slist_append.pdf index af25aa63..bd763268 100644 --- a/docs/libcurl/curl_slist_append.pdf +++ b/docs/libcurl/curl_slist_append.pdf @@ -71,12 +71,12 @@ endobj <?adobe-xap-filters esc="CRLF"?> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> -<rdf:Description rdf:about='uuid:aa7305f0-4b31-11ed-0000-56466e45d3dc' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.05'/> -<rdf:Description rdf:about='uuid:aa7305f0-4b31-11ed-0000-56466e45d3dc' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2012-10-10T22:00:19+02:00</xmp:ModifyDate> -<xmp:CreateDate>2012-10-10T22:00:19+02:00</xmp:CreateDate> +<rdf:Description rdf:about='uuid:45cb2c83-6afe-11ed-0000-56466e45d3dc' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.05'/> +<rdf:Description rdf:about='uuid:45cb2c83-6afe-11ed-0000-56466e45d3dc' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2012-11-20T08:13:03+01:00</xmp:ModifyDate> +<xmp:CreateDate>2012-11-20T08:13:03+01:00</xmp:CreateDate> <xmp:CreatorTool>groff version 1.21</xmp:CreatorTool></rdf:Description> -<rdf:Description rdf:about='uuid:aa7305f0-4b31-11ed-0000-56466e45d3dc' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:aa7305f0-4b31-11ed-0000-56466e45d3dc'/> -<rdf:Description rdf:about='uuid:aa7305f0-4b31-11ed-0000-56466e45d3dc' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description> +<rdf:Description rdf:about='uuid:45cb2c83-6afe-11ed-0000-56466e45d3dc' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:45cb2c83-6afe-11ed-0000-56466e45d3dc'/> +<rdf:Description rdf:about='uuid:45cb2c83-6afe-11ed-0000-56466e45d3dc' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description> </rdf:RDF> </x:xmpmeta> @@ -86,8 +86,8 @@ endstream endobj 2 0 obj <</Producer(GPL Ghostscript 9.05) -/CreationDate(D:20121010220019+02'00') -/ModDate(D:20121010220019+02'00') +/CreationDate(D:20121120081303+01'00') +/ModDate(D:20121120081303+01'00') /Creator(groff version 1.21)>>endobj xref 0 15 @@ -108,7 +108,7 @@ xref 0000001786 00000 n trailer << /Size 15 /Root 1 0 R /Info 2 0 R -/ID [<7CD203899F8516708384494A03BB0979><7CD203899F8516708384494A03BB0979>] +/ID [<9709D44003506DE970347A4DA3975767><9709D44003506DE970347A4DA3975767>] >> startxref 3359 diff --git a/docs/libcurl/curl_slist_free_all.pdf b/docs/libcurl/curl_slist_free_all.pdf index 399253c7..9d0d298a 100644 --- a/docs/libcurl/curl_slist_free_all.pdf +++ b/docs/libcurl/curl_slist_free_all.pdf @@ -63,12 +63,12 @@ endobj <?adobe-xap-filters esc="CRLF"?> <x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9.1-13, framework 1.6'> <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:iX='http://ns.adobe.com/iX/1.0/'> -<rdf:Description rdf:about='uuid:ab0b9c70-4b31-11ed-0000-cca2e83eacbc' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.05'/> -<rdf:Description rdf:about='uuid:ab0b9c70-4b31-11ed-0000-cca2e83eacbc' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2012-10-10T22:00:20+02:00</xmp:ModifyDate> -<xmp:CreateDate>2012-10-10T22:00:20+02:00</xmp:CreateDate> +<rdf:Description rdf:about='uuid:4663c303-6afe-11ed-0000-cca2e83eacbc' xmlns:pdf='http://ns.adobe.com/pdf/1.3/' pdf:Producer='GPL Ghostscript 9.05'/> +<rdf:Description rdf:about='uuid:4663c303-6afe-11ed-0000-cca2e83eacbc' xmlns:xmp='http://ns.adobe.com/xap/1.0/'><xmp:ModifyDate>2012-11-20T08:13:04+01:00</xmp:ModifyDate> +<xmp:CreateDate>2012-11-20T08:13:04+01:00</xmp:CreateDate> <xmp:CreatorTool>groff version 1.21</xmp:CreatorTool></rdf:Description> -<rdf:Description rdf:about='uuid:ab0b9c70-4b31-11ed-0000-cca2e83eacbc' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:ab0b9c70-4b31-11ed-0000-cca2e83eacbc'/> -<rdf:Description rdf:about='uuid:ab0b9c70-4b31-11ed-0000-cca2e83eacbc' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description> +<rdf:Description rdf:about='uuid:4663c303-6afe-11ed-0000-cca2e83eacbc' xmlns:xapMM='http://ns.adobe.com/xap/1.0/mm/' xapMM:DocumentID='uuid:4663c303-6afe-11ed-0000-cca2e83eacbc'/> +<rdf:Description rdf:about='uuid:4663c303-6afe-11ed-0000-cca2e83eacbc' xmlns:dc='http://purl.org/dc/elements/1.1/' dc:format='application/pdf'><dc:title><rdf:Alt><rdf:li xml:lang='x-default'>Untitled</rdf:li></rdf:Alt></dc:title></rdf:Description> </rdf:RDF> </x:xmpmeta> @@ -78,8 +78,8 @@ endstream endobj 2 0 obj <</Producer(GPL Ghostscript 9.05) -/CreationDate(D:20121010220020+02'00') -/ModDate(D:20121010220020+02'00') +/CreationDate(D:20121120081304+01'00') +/ModDate(D:20121120081304+01'00') /Creator(groff version 1.21)>>endobj xref 0 14 @@ -99,7 +99,7 @@ xref 0000001252 00000 n trailer << /Size 14 /Root 1 0 R /Info 2 0 R -/ID [<005F4348800A83F44446D2A12B397277><005F4348800A83F44446D2A12B397277>] +/ID [<EACAF7D10ABAF59517AC4CC3832D1CCE><EACAF7D10ABAF59517AC4CC3832D1CCE>] >> startxref 2825 diff --git a/docs/libcurl/curl_strequal.pdf b/docs/libcurl/curl_strequal.pdf Binary files differindex 2799b2f7..af44009f 100644 --- a/docs/libcurl/curl_strequal.pdf +++ b/docs/libcurl/curl_strequal.pdf diff --git a/docs/libcurl/curl_unescape.pdf b/docs/libcurl/curl_unescape.pdf Binary files differindex ec68e0cb..9981b7f4 100644 --- a/docs/libcurl/curl_unescape.pdf +++ b/docs/libcurl/curl_unescape.pdf diff --git a/docs/libcurl/curl_version.pdf b/docs/libcurl/curl_version.pdf Binary files differindex 44f0e430..123d03ff 100644 --- a/docs/libcurl/curl_version.pdf +++ b/docs/libcurl/curl_version.pdf diff --git a/docs/libcurl/curl_version_info.pdf b/docs/libcurl/curl_version_info.pdf Binary files differindex 763dd822..8152e59e 100644 --- a/docs/libcurl/curl_version_info.pdf +++ b/docs/libcurl/curl_version_info.pdf diff --git a/docs/libcurl/libcurl-easy.pdf b/docs/libcurl/libcurl-easy.pdf Binary files differindex c7695988..ab870af7 100644 --- a/docs/libcurl/libcurl-easy.pdf +++ b/docs/libcurl/libcurl-easy.pdf diff --git a/docs/libcurl/libcurl-errors.pdf b/docs/libcurl/libcurl-errors.pdf Binary files differindex 8ff27eef..724eed5c 100644 --- a/docs/libcurl/libcurl-errors.pdf +++ b/docs/libcurl/libcurl-errors.pdf diff --git a/docs/libcurl/libcurl-multi.pdf b/docs/libcurl/libcurl-multi.pdf Binary files differindex 66d42b52..88720b0d 100644 --- a/docs/libcurl/libcurl-multi.pdf +++ b/docs/libcurl/libcurl-multi.pdf diff --git a/docs/libcurl/libcurl-share.pdf b/docs/libcurl/libcurl-share.pdf Binary files differindex 2f9beb10..ecf25d2f 100644 --- a/docs/libcurl/libcurl-share.pdf +++ b/docs/libcurl/libcurl-share.pdf diff --git a/docs/libcurl/libcurl-tutorial.pdf b/docs/libcurl/libcurl-tutorial.pdf Binary files differindex 731e48b2..bc121fa4 100644 --- a/docs/libcurl/libcurl-tutorial.pdf +++ b/docs/libcurl/libcurl-tutorial.pdf diff --git a/docs/libcurl/libcurl.pdf b/docs/libcurl/libcurl.pdf Binary files differindex 9ebea2a1..39c5f70b 100644 --- a/docs/libcurl/libcurl.pdf +++ b/docs/libcurl/libcurl.pdf diff --git a/docs/mk-ca-bundle.pdf b/docs/mk-ca-bundle.pdf Binary files differindex c91c1e10..e056d263 100644 --- a/docs/mk-ca-bundle.pdf +++ b/docs/mk-ca-bundle.pdf diff --git a/include/curl/Makefile.in b/include/curl/Makefile.in index 45d1bba9..656e630f 100644 --- a/include/curl/Makefile.in +++ b/include/curl/Makefile.in @@ -334,9 +334,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/curl/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/curl/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign include/curl/Makefile + $(AUTOMAKE) --gnu include/curl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/include/curl/curlver.h b/include/curl/curlver.h index c6c44394..f3afbe15 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.28.0" +#define LIBCURL_VERSION "7.28.1" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 28 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier 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 comparisons with greater than and less than work. */ -#define LIBCURL_VERSION_NUM 0x071c00 +#define LIBCURL_VERSION_NUM 0x071c01 /* * This is the date and time when the full source package was created. The @@ -64,6 +64,6 @@ * * "Mon Feb 12 11:35:33 UTC 2007" */ -#define LIBCURL_TIMESTAMP "Wed Oct 10 19:59:18 UTC 2012" +#define LIBCURL_TIMESTAMP "Tue Nov 20 07:12:05 UTC 2012" #endif /* __CURL_CURLVER_H */ diff --git a/lib/Makefile.am b/lib/Makefile.am index a9f5a8e9..acfa5a61 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -64,23 +64,21 @@ CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@ # $(top_srcdir)/ares is for in-tree c-ares's external include files if USE_EMBEDDED_ARES -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - -I$(top_builddir)/ares \ - -I$(top_srcdir)/ares +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/ares \ + -I$(top_srcdir)/ares else -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib endif -AM_CPPFLAGS = - # Mostly for Windows build targets, when building libcurl library if USE_CPPFLAG_BUILDING_LIBCURL AM_CPPFLAGS += -DBUILDING_LIBCURL @@ -101,9 +99,9 @@ if SONAME_BUMP # # This conditional soname bump SHOULD be removed at next "proper" bump. # -VERSIONINFO=-version-info 7:0:2 +VERSIONINFO=-version-info 8:0:3 else -VERSIONINFO=-version-info 6:0:2 +VERSIONINFO=-version-info 7:0:3 endif # This flag accepts an argument of the form current[:revision[:age]]. So, diff --git a/lib/Makefile.in b/lib/Makefile.in index 29ef10a1..2b9d06c4 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -130,7 +130,7 @@ am__objects_1 = libcurl_la-file.lo libcurl_la-timeval.lo \ libcurl_la-curl_ntlm_wb.lo libcurl_la-curl_ntlm_core.lo \ libcurl_la-curl_ntlm_msgs.lo libcurl_la-curl_sasl.lo \ libcurl_la-curl_schannel.lo libcurl_la-curl_multibyte.lo \ - libcurl_la-curl_darwinssl.lo + libcurl_la-curl_darwinssl.lo libcurl_la-hostcheck.lo am__objects_2 = am_libcurl_la_OBJECTS = $(am__objects_1) $(am__objects_2) libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS) @@ -185,7 +185,7 @@ am__objects_3 = libcurlu_la-file.lo libcurlu_la-timeval.lo \ libcurlu_la-curl_ntlm_wb.lo libcurlu_la-curl_ntlm_core.lo \ libcurlu_la-curl_ntlm_msgs.lo libcurlu_la-curl_sasl.lo \ libcurlu_la-curl_schannel.lo libcurlu_la-curl_multibyte.lo \ - libcurlu_la-curl_darwinssl.lo + libcurlu_la-curl_darwinssl.lo libcurlu_la-hostcheck.lo am_libcurlu_la_OBJECTS = $(am__objects_3) $(am__objects_2) libcurlu_la_OBJECTS = $(am_libcurlu_la_OBJECTS) @BUILD_UNITTESTS_TRUE@am_libcurlu_la_rpath = @@ -456,12 +456,12 @@ EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 $(DSP) \ CLEANFILES = $(DSP) $(VCPROJ) lib_LTLIBRARIES = libcurl.la -@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib - +@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib $(am__append_1) \ +@USE_EMBEDDED_ARES_FALSE@ $(am__append_2) # 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 @@ -475,16 +475,15 @@ lib_LTLIBRARIES = libcurl.la # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file # $(top_srcdir)/ares is for in-tree c-ares's external include files -@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares - -AM_CPPFLAGS = $(am__append_1) $(am__append_2) -@SONAME_BUMP_FALSE@VERSIONINFO = -version-info 6:0:2 +@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares $(am__append_1) \ +@USE_EMBEDDED_ARES_TRUE@ $(am__append_2) +@SONAME_BUMP_FALSE@VERSIONINFO = -version-info 7:0:3 # # Bumping of SONAME conditionally may seem like a weird thing to do, and yeah @@ -495,7 +494,7 @@ AM_CPPFLAGS = $(am__append_1) $(am__append_2) # # This conditional soname bump SHOULD be removed at next "proper" bump. # -@SONAME_BUMP_TRUE@VERSIONINFO = -version-info 7:0:2 +@SONAME_BUMP_TRUE@VERSIONINFO = -version-info 8:0:3 # This flag accepts an argument of the form current[:revision[:age]]. So, # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to @@ -546,7 +545,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ idn_win32.c http_negotiate_sspi.c cyassl.c http_proxy.c non-ascii.c \ asyn-ares.c asyn-thread.c curl_gssapi.c curl_ntlm.c curl_ntlm_wb.c \ curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_schannel.c \ - curl_multibyte.c curl_darwinssl.c + curl_multibyte.c curl_darwinssl.c hostcheck.c 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 \ @@ -563,7 +562,8 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \ warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \ gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_ntlm.h \ curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h curl_ntlm_msgs.h \ - curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h + curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h \ + hostcheck.h # Makefile.inc provides the CSOURCES and HHEADERS defines @@ -714,6 +714,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hmac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostasyn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostip4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurl_la-hostip6.Plo@am__quote@ @@ -819,6 +820,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hmac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostasyn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostip4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-hostip6.Plo@am__quote@ @@ -1640,6 +1642,13 @@ libcurl_la-curl_darwinssl.lo: curl_darwinssl.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-curl_darwinssl.lo `test -f 'curl_darwinssl.c' || echo '$(srcdir)/'`curl_darwinssl.c +libcurl_la-hostcheck.lo: hostcheck.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -MT libcurl_la-hostcheck.lo -MD -MP -MF "$(DEPDIR)/libcurl_la-hostcheck.Tpo" -c -o libcurl_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcurl_la-hostcheck.Tpo" "$(DEPDIR)/libcurl_la-hostcheck.Plo"; else rm -f "$(DEPDIR)/libcurl_la-hostcheck.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hostcheck.c' object='libcurl_la-hostcheck.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurl_la_CPPFLAGS) $(CPPFLAGS) $(libcurl_la_CFLAGS) $(CFLAGS) -c -o libcurl_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c + libcurlu_la-file.lo: file.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-file.lo -MD -MP -MF "$(DEPDIR)/libcurlu_la-file.Tpo" -c -o libcurlu_la-file.lo `test -f 'file.c' || echo '$(srcdir)/'`file.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcurlu_la-file.Tpo" "$(DEPDIR)/libcurlu_la-file.Plo"; else rm -f "$(DEPDIR)/libcurlu_la-file.Tpo"; exit 1; fi @@ -2375,6 +2384,13 @@ libcurlu_la-curl_darwinssl.lo: curl_darwinssl.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_darwinssl.lo `test -f 'curl_darwinssl.c' || echo '$(srcdir)/'`curl_darwinssl.c +libcurlu_la-hostcheck.lo: hostcheck.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -MT libcurlu_la-hostcheck.lo -MD -MP -MF "$(DEPDIR)/libcurlu_la-hostcheck.Tpo" -c -o libcurlu_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libcurlu_la-hostcheck.Tpo" "$(DEPDIR)/libcurlu_la-hostcheck.Plo"; else rm -f "$(DEPDIR)/libcurlu_la-hostcheck.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hostcheck.c' object='libcurlu_la-hostcheck.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(libcurlu_la_CFLAGS) $(CFLAGS) -c -o libcurlu_la-hostcheck.lo `test -f 'hostcheck.c' || echo '$(srcdir)/'`hostcheck.c + mostlyclean-libtool: -rm -f *.lo diff --git a/lib/Makefile.inc b/lib/Makefile.inc index e0044ec6..fcb8c28e 100644 --- a/lib/Makefile.inc +++ b/lib/Makefile.inc @@ -24,7 +24,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \ idn_win32.c http_negotiate_sspi.c cyassl.c http_proxy.c non-ascii.c \ asyn-ares.c asyn-thread.c curl_gssapi.c curl_ntlm.c curl_ntlm_wb.c \ curl_ntlm_core.c curl_ntlm_msgs.c curl_sasl.c curl_schannel.c \ - curl_multibyte.c curl_darwinssl.c + curl_multibyte.c curl_darwinssl.c hostcheck.c 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 \ @@ -41,4 +41,5 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \ warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \ gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_ntlm.h \ curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h curl_ntlm_msgs.h \ - curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h + curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h \ + hostcheck.h diff --git a/lib/Makefile.m32 b/lib/Makefile.m32 index 661cc649..3e4e35a9 100644 --- a/lib/Makefile.m32 +++ b/lib/Makefile.m32 @@ -273,8 +273,9 @@ $(libcurl_a_LIBRARY): $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES) $(libcurl_dll_LIBRARY): $(libcurl_a_OBJECTS) $(RESOURCE) $(libcurl_dll_DEPENDENCIES) @$(call DEL, $@) - $(CC) $(LDFLAGS) -shared -Wl,--out-implib,$(libcurl_dll_a_LIBRARY) \ - -o $@ $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS) + $(CC) $(LDFLAGS) -shared -o $@ \ + -Wl,--output-def,$(@:.dll=.def),--out-implib,$(libcurl_dll_a_LIBRARY) \ + $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS) %.o: %.c $(PROOT)/include/curl/curlbuild.h $(CC) $(INCLUDES) $(CFLAGS) -c $< @@ -289,7 +290,7 @@ endif @$(call DEL, $(libcurl_a_OBJECTS) $(RESOURCE)) distclean vclean: clean - @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_a_LIBRARY)) + @$(call DEL, $(libcurl_a_LIBRARY) $(libcurl_dll_LIBRARY) $(libcurl_dll_LIBRARY:.dll=.def) $(libcurl_dll_a_LIBRARY)) $(PROOT)/include/curl/curlbuild.h: @echo Creating $@ diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 5b760128..ee8050a6 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -83,6 +83,8 @@ # define CARES_STATICLIB # endif # include <ares.h> +# include <ares_version.h> /* really old c-ares didn't include this by + itself */ #if ARES_VERSION >= 0x010500 /* c-ares 1.5.0 or later, the callback proto is modified */ diff --git a/lib/axtls.c b/lib/axtls.c index e37aed50..ea94c6cf 100644 --- a/lib/axtls.c +++ b/lib/axtls.c @@ -47,6 +47,8 @@ #include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" +#include "hostcheck.h" + /* SSL_read is opied from axTLS compat layer */ static int SSL_read(SSL *ssl, void *buf, int num) @@ -150,7 +152,11 @@ Curl_axtls_connect(struct connectdata *conn, int i, ssl_fcn_return; const uint8_t *ssl_sessionid; size_t ssl_idsize; - const char *x509; + const char *peer_CN; + uint32_t dns_altname_index; + const char *dns_altname; + int8_t found_subject_alt_names = 0; + int8_t found_subject_alt_name_matching_conn = 0; /* Assuming users will not compile in custom key/cert to axTLS */ uint32_t client_option = SSL_NO_DEFAULT_KEY|SSL_SERVER_VERIFY_LATER; @@ -296,19 +302,65 @@ Curl_axtls_connect(struct connectdata *conn, /* Here, gtls.c does issuer verification. axTLS has no straightforward * equivalent, so omitting for now.*/ - /* See if common name was set in server certificate */ - x509 = ssl_get_cert_dn(ssl, SSL_X509_CERT_COMMON_NAME); - if(x509 == NULL) - infof(data, "error fetching CN from cert\n"); - /* Here, gtls.c does the following * 1) x509 hostname checking per RFC2818. axTLS doesn't support this, but - * it seems useful. Omitting for now. + * it seems useful. This is now implemented, by Oscar Koeroo * 2) checks cert validity based on time. axTLS does this in ssl_verify_cert * 3) displays a bunch of cert information. axTLS doesn't support most of * this, but a couple fields are available. */ + + /* There is no (DNS) Altnames count in the version 1.4.8 API. There is a + risk of an inifite loop */ + for(dns_altname_index = 0; ; dns_altname_index++) { + dns_altname = ssl_get_cert_subject_alt_dnsname(ssl, dns_altname_index); + if(dns_altname == NULL) { + break; + } + found_subject_alt_names = 1; + + infof(data, "\tComparing subject alt name DNS with hostname: %s <-> %s\n", + dns_altname, conn->host.name); + if(Curl_cert_hostcheck(dns_altname, conn->host.name)) { + found_subject_alt_name_matching_conn = 1; + break; + } + } + + /* RFC2818 checks */ + if(found_subject_alt_names && !found_subject_alt_name_matching_conn) { + /* Break connection ! */ + Curl_axtls_close(conn, sockindex); + failf(data, "\tsubjectAltName(s) do not match %s\n", conn->host.dispname); + return CURLE_PEER_FAILED_VERIFICATION; + } + else if(found_subject_alt_names == 0) { + /* Per RFC2818, when no Subject Alt Names were available, examine the peer + CN as a legacy fallback */ + peer_CN = ssl_get_cert_dn(ssl, SSL_X509_CERT_COMMON_NAME); + if(peer_CN == NULL) { + /* Similar behaviour to the OpenSSL interface */ + Curl_axtls_close(conn, sockindex); + failf(data, "unable to obtain common name from peer certificate"); + return CURLE_PEER_FAILED_VERIFICATION; + } + else { + if(!Curl_cert_hostcheck((const char *)peer_CN, conn->host.name)) { + if(data->set.ssl.verifyhost) { + /* Break connection ! */ + Curl_axtls_close(conn, sockindex); + failf(data, "\tcommon name \"%s\" does not match \"%s\"\n", + peer_CN, conn->host.dispname); + return CURLE_PEER_FAILED_VERIFICATION; + } + else + infof(data, "\tcommon name \"%s\" does not match \"%s\"\n", + peer_CN, conn->host.dispname); + } + } + } + /* General housekeeping */ conn->ssl[sockindex].state = ssl_connection_complete; conn->ssl[sockindex].ssl = ssl; diff --git a/lib/connect.c b/lib/connect.c index dc6291bd..1651e6e2 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -1101,7 +1101,9 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ if(sockfd == CURL_SOCKET_BAD) { /* no good connect was made */ - failf(data, "couldn't connect to host"); + failf(data, "couldn't connect to %s at %s:%d", + conn->bits.proxy?"proxy":"host", + conn->bits.proxy?conn->proxy.name:conn->host.name, conn->port); return CURLE_COULDNT_CONNECT; } diff --git a/lib/curl_darwinssl.c b/lib/curl_darwinssl.c index d5685bed..3cc278a1 100644 --- a/lib/curl_darwinssl.c +++ b/lib/curl_darwinssl.c @@ -266,6 +266,44 @@ CF_INLINE const char *SSLCipherNameForNumber(SSLCipherSuite cipher) { case SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA: return "SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA"; break; + /* TLS 1.0 with AES (RFC 3268) + (Apparently these are used in SSLv3 implementations as well.) */ + case TLS_RSA_WITH_AES_128_CBC_SHA: + return "TLS_RSA_WITH_AES_128_CBC_SHA"; + break; + case TLS_DH_DSS_WITH_AES_128_CBC_SHA: + return "TLS_DH_DSS_WITH_AES_128_CBC_SHA"; + break; + case TLS_DH_RSA_WITH_AES_128_CBC_SHA: + return "TLS_DH_RSA_WITH_AES_128_CBC_SHA"; + break; + case TLS_DHE_DSS_WITH_AES_128_CBC_SHA: + return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"; + break; + case TLS_DHE_RSA_WITH_AES_128_CBC_SHA: + return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"; + break; + case TLS_DH_anon_WITH_AES_128_CBC_SHA: + return "TLS_DH_anon_WITH_AES_128_CBC_SHA"; + break; + case TLS_RSA_WITH_AES_256_CBC_SHA: + return "TLS_RSA_WITH_AES_256_CBC_SHA"; + break; + case TLS_DH_DSS_WITH_AES_256_CBC_SHA: + return "TLS_DH_DSS_WITH_AES_256_CBC_SHA"; + break; + case TLS_DH_RSA_WITH_AES_256_CBC_SHA: + return "TLS_DH_RSA_WITH_AES_256_CBC_SHA"; + break; + case TLS_DHE_DSS_WITH_AES_256_CBC_SHA: + return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"; + break; + case TLS_DHE_RSA_WITH_AES_256_CBC_SHA: + return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"; + break; + case TLS_DH_anon_WITH_AES_256_CBC_SHA: + return "TLS_DH_anon_WITH_AES_256_CBC_SHA"; + break; /* SSL version 2.0 */ case SSL_RSA_WITH_RC2_CBC_MD5: return "SSL_RSA_WITH_RC2_CBC_MD5"; @@ -594,7 +632,6 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, struct SessionHandle *data = conn->data; curl_socket_t sockfd = conn->sock[sockindex]; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; - bool sni = true; #ifdef ENABLE_IPV6 struct in6_addr addr; #else @@ -614,7 +651,8 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } } else { -#if TARGET_OS_EMBEDDED == 0 /* the older API does not exist on iOS */ + /* The old ST API does not exist under iOS, so don't compile it: */ +#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) if(connssl->ssl_ctx) (void)SSLDisposeContext(connssl->ssl_ctx); err = SSLNewContext(false, &(connssl->ssl_ctx)); @@ -622,7 +660,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, failf(data, "SSL: couldn't create a context: OSStatus %d", err); return CURLE_OUT_OF_MEMORY; } -#endif /* TARGET_OS_EMBEDDED == 0 */ +#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */ } #else if(connssl->ssl_ctx) @@ -656,7 +694,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } } else { -#if TARGET_OS_EMBEDDED == 0 +#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocolAll, false); @@ -697,7 +735,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, true); break; } -#endif /* TARGET_OS_EMBEDDED == 0 */ +#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */ } #else (void)SSLSetProtocolVersionEnabled(connssl->ssl_ctx, kSSLProtocolAll, false); @@ -747,14 +785,14 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } } else { -#if TARGET_OS_EMBEDDED == 0 +#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) err = SSLSetEnableCertVerify(connssl->ssl_ctx, data->set.ssl.verifypeer?true:false); if(err != noErr) { failf(data, "SSL: SSLSetEnableCertVerify() failed: OSStatus %d", err); return CURLE_SSL_CONNECT_ERROR; } -#endif /* TARGET_OS_EMBEDDED == 0 */ +#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */ } #else err = SSLSetEnableCertVerify(connssl->ssl_ctx, @@ -765,12 +803,14 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, } #endif /* defined(__MAC_10_6) || defined(__IPHONE_5_0) */ + /* If this is a domain name and not an IP address, then configure SNI. + * Also: the verifyhost setting influences SNI usage */ /* If this is a domain name and not an IP address, then configure SNI: */ if((0 == Curl_inet_pton(AF_INET, conn->host.name, &addr)) && #ifdef ENABLE_IPV6 (0 == Curl_inet_pton(AF_INET6, conn->host.name, &addr)) && #endif - sni) { + data->set.ssl.verifyhost) { err = SSLSetPeerDomainName(connssl->ssl_ctx, conn->host.name, strlen(conn->host.name)); if(err != noErr) { @@ -824,7 +864,6 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) connssl->connecting_state = connssl->ssl_direction ? ssl_connect_2_writing : ssl_connect_2_reading; return CURLE_OK; - break; case errSSLServerAuthCompleted: /* the documentation says we need to call SSLHandshake() again */ @@ -836,13 +875,16 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) case errSSLCertExpired: failf(data, "SSL certificate problem: OSStatus %d", err); return CURLE_SSL_CACERT; - break; + + case errSSLHostNameMismatch: + failf(data, "SSL certificate peer verification failed, the " + "certificate did not match \"%s\"\n", conn->host.dispname); + return CURLE_PEER_FAILED_VERIFICATION; default: failf(data, "Unknown SSL protocol error in connection to %s:%d", conn->host.name, err); return CURLE_SSL_CONNECT_ERROR; - break; } } else { @@ -902,6 +944,32 @@ darwinssl_connect_step3(struct connectdata *conn, * Well, okay, if verbose mode is on, let's print the details of the * server certificates. */ #if defined(__MAC_10_7) || defined(__IPHONE_5_0) +#if (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) +#pragma unused(server_certs) + err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust); + if(err == noErr) { + count = SecTrustGetCertificateCount(trust); + for(i = 0L ; i < count ; i++) { + server_cert = SecTrustGetCertificateAtIndex(trust, i); + server_cert_summary = SecCertificateCopySubjectSummary(server_cert); + memset(server_cert_summary_c, 0, 128); + if(CFStringGetCString(server_cert_summary, + server_cert_summary_c, + 128, + kCFStringEncodingUTF8)) { + infof(data, "Server certificate: %s\n", server_cert_summary_c); + } + CFRelease(server_cert_summary); + } + CFRelease(trust); + } +#else + /* SSLCopyPeerCertificates() is deprecated as of Mountain Lion. + The function SecTrustGetCertificateAtIndex() is officially present + in Lion, but it is unfortunately also present in Snow Leopard as + private API and doesn't work as expected. So we have to look for + a different symbol to make sure this code is only executed under + Lion or later. */ if(SecTrustEvaluateAsync != NULL) { #pragma unused(server_certs) err = SSLCopyPeerTrust(connssl->ssl_ctx, &trust); @@ -909,7 +977,8 @@ darwinssl_connect_step3(struct connectdata *conn, count = SecTrustGetCertificateCount(trust); for(i = 0L ; i < count ; i++) { server_cert = SecTrustGetCertificateAtIndex(trust, i); - server_cert_summary = SecCertificateCopySubjectSummary(server_cert); + server_cert_summary = + SecCertificateCopyLongDescription(NULL, server_cert, NULL); memset(server_cert_summary_c, 0, 128); if(CFStringGetCString(server_cert_summary, server_cert_summary_c, @@ -923,7 +992,6 @@ darwinssl_connect_step3(struct connectdata *conn, } } else { -#if TARGET_OS_EMBEDDED == 0 err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs); if(err == noErr) { count = CFArrayGetCount(server_certs); @@ -943,8 +1011,8 @@ darwinssl_connect_step3(struct connectdata *conn, } CFRelease(server_certs); } -#endif /* TARGET_OS_EMBEDDED == 0 */ } +#endif /* (TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) */ #else #pragma unused(trust) err = SSLCopyPeerCertificates(connssl->ssl_ctx, &server_certs); @@ -1120,10 +1188,10 @@ void Curl_darwinssl_close(struct connectdata *conn, int sockindex) #if defined(__MAC_10_8) || defined(__IPHONE_5_0) if(SSLCreateContext != NULL) CFRelease(connssl->ssl_ctx); -#if TARGET_OS_EMBEDDED == 0 +#if (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) else (void)SSLDisposeContext(connssl->ssl_ctx); -#endif /* TARGET_OS_EMBEDDED == 0 */ +#endif /* (TARGET_OS_MAC && !(TARGET_OS_EMBEDDED || TARGET_OS_IPHONE)) */ #else (void)SSLDisposeContext(connssl->ssl_ctx); #endif /* defined(__MAC_10_8) || defined(__IPHONE_5_0) */ @@ -1311,6 +1379,11 @@ static ssize_t darwinssl_recv(struct connectdata *conn, return -1; break; + case errSSLClosedGraceful: /* they're done; fail gracefully */ + *curlcode = CURLE_OK; + return -1; + break; + default: failf(conn->data, "SSLRead() return error %d", err); *curlcode = CURLE_RECV_ERROR; diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c index 75fa071c..8cb3af80 100644 --- a/lib/curl_schannel.c +++ b/lib/curl_schannel.c @@ -156,14 +156,22 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) infof(data, "schannel: disable server certificate revocation checks\n"); } - if(Curl_inet_pton(AF_INET, conn->host.name, &addr) || + if(Curl_inet_pton(AF_INET, conn->host.name, &addr) #ifdef ENABLE_IPV6 - Curl_inet_pton(AF_INET6, conn->host.name, &addr6) || + || Curl_inet_pton(AF_INET6, conn->host.name, &addr6) #endif - data->set.ssl.verifyhost < 2) { + ) { schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK; - infof(data, "schannel: using IP address, disable SNI servername " - "check\n"); + infof(data, "schannel: using IP address, SNI is being disabled by " + "disabling the servername check against the " + "subject names in server certificates.\n"); + } + + if(!data->set.ssl.verifyhost) { + schannel_cred.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK; + infof(data, "schannel: verifyhost setting prevents Schannel from " + "comparing the supplied target name with the subject " + "names in server certificates. Also disables SNI.\n"); } switch(data->set.ssl.version) { @@ -1238,10 +1246,7 @@ static CURLcode verify_certificate(struct connectdata *conn, int sockindex) } if(result == CURLE_OK) { - if(data->set.ssl.verifyhost == 1) { - infof(data, "warning: ignoring unsupported value (1) ssl.verifyhost\n"); - } - else if(data->set.ssl.verifyhost == 2) { + if(data->set.ssl.verifyhost) { TCHAR cert_hostname_buff[128]; xcharp_u hostname; xcharp_u cert_hostname; diff --git a/lib/cyassl.c b/lib/cyassl.c index 4c517802..3639532b 100644 --- a/lib/cyassl.c +++ b/lib/cyassl.c @@ -53,6 +53,8 @@ #include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" +#include <cyassl/ssl.h> +#include <cyassl/error.h> static Curl_recv cyassl_recv; @@ -237,6 +239,13 @@ cyassl_connect_step2(struct connectdata *conn, conn->recv[sockindex] = cyassl_recv; conn->send[sockindex] = cyassl_send; + /* Enable RFC2818 checks */ + if(data->set.ssl.verifyhost) { + ret = CyaSSL_check_domain_name(conssl->handle, conn->host.name); + if(ret == SSL_FAILURE) + return CURLE_OUT_OF_MEMORY; + } + ret = SSL_connect(conssl->handle); if(ret != 1) { char error_buffer[80]; @@ -246,15 +255,43 @@ cyassl_connect_step2(struct connectdata *conn, conssl->connecting_state = ssl_connect_2_reading; return CURLE_OK; } - - if(SSL_ERROR_WANT_WRITE == detail) { + else if(SSL_ERROR_WANT_WRITE == detail) { conssl->connecting_state = ssl_connect_2_writing; return CURLE_OK; } - - failf(data, "SSL_connect failed with error %d: %s", detail, + /* There is no easy way to override only the CN matching. + * This will enable the override of both mismatching SubjectAltNames + * as also mismatching CN fields */ + else if(DOMAIN_NAME_MISMATCH == detail) { +#if 1 + failf(data, "\tsubject alt name(s) or common name do not match \"%s\"\n", + conn->host.dispname); + return CURLE_PEER_FAILED_VERIFICATION; +#else + /* When the CyaSSL_check_domain_name() is used and you desire to continue + * on a DOMAIN_NAME_MISMATCH, i.e. 'data->set.ssl.verifyhost == 0', + * CyaSSL version 2.4.0 will fail with an INCOMPLETE_DATA error. The only + * way to do this is currently to switch the CyaSSL_check_domain_name() + * in and out based on the 'data->set.ssl.verifyhost' value. */ + if(data->set.ssl.verifyhost) { + failf(data, + "\tsubject alt name(s) or common name do not match \"%s\"\n", + conn->host.dispname); + return CURLE_PEER_FAILED_VERIFICATION; + } + else { + infof(data, + "\tsubject alt name(s) and/or common name do not match \"%s\"\n", + conn->host.dispname); + return CURLE_OK; + } +#endif + } + else { + failf(data, "SSL_connect failed with error %d: %s", detail, ERR_error_string(detail, error_buffer)); - return CURLE_SSL_CONNECT_ERROR; + return CURLE_SSL_CONNECT_ERROR; + } } conssl->connecting_state = ssl_connect_3; @@ -67,10 +67,10 @@ #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> +#include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" - /* * Forward declarations. */ @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -310,7 +310,8 @@ static CURLcode file_upload(struct connectdata *conn) { struct FILEPROTO *file = conn->data->state.proto.file; const char *dir = strchr(file->path, DIRSEP); - FILE *fp; + int fd; + int mode; CURLcode res=CURLE_OK; struct SessionHandle *data = conn->data; char *buf = data->state.buffer; @@ -333,33 +334,21 @@ static CURLcode file_upload(struct connectdata *conn) return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */ if(!dir[1]) - return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */ - - if(data->state.resume_from) - fp = fopen( file->path, "ab" ); - else { - int fd; + return CURLE_FILE_COULDNT_READ_FILE; /* fix: better error code */ -#ifdef DOS_FILESYSTEM - fd = open(file->path, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, - conn->data->set.new_file_perms); -#else - fd = open(file->path, O_WRONLY|O_CREAT|O_TRUNC, - conn->data->set.new_file_perms); -#endif - if(fd < 0) { - failf(data, "Can't open %s for writing", file->path); - return CURLE_WRITE_ERROR; - } -#ifdef HAVE_FDOPEN - fp = fdopen(fd, "wb"); +#ifdef O_BINARY +#define MODE_DEFAULT O_WRONLY|O_CREAT|O_BINARY #else - close(fd); - fp = fopen(file->path, "wb"); +#define MODE_DEFAULT O_WRONLY|O_CREAT #endif - } - if(!fp) { + if(data->state.resume_from) + mode = MODE_DEFAULT|O_APPEND; + else + mode = MODE_DEFAULT|O_TRUNC; + + fd = open(file->path, mode, conn->data->set.new_file_perms); + if(fd < 0) { failf(data, "Can't open %s for writing", file->path); return CURLE_WRITE_ERROR; } @@ -370,8 +359,8 @@ static CURLcode file_upload(struct connectdata *conn) /* treat the negative resume offset value as the case of "-" */ if(data->state.resume_from < 0) { - if(fstat(fileno(fp), &file_stat)) { - fclose(fp); + if(fstat(fd, &file_stat)) { + close(fd); failf(data, "Can't get the size of %s", file->path); return CURLE_WRITE_ERROR; } @@ -407,7 +396,7 @@ static CURLcode file_upload(struct connectdata *conn) buf2 = buf; /* write the data to the target */ - nwrite = fwrite(buf2, 1, nread, fp); + nwrite = write(fd, buf2, nread); if(nwrite != nread) { res = CURLE_SEND_ERROR; break; @@ -425,7 +414,7 @@ static CURLcode file_upload(struct connectdata *conn) if(!res && Curl_pgrsUpdate(conn)) res = CURLE_ABORTED_BY_CALLBACK; - fclose(fp); + close(fd); return res; } @@ -632,8 +632,8 @@ static CURLcode ftp_readresp(curl_socket_t sockfd, size_t *size) /* size of the response */ { struct connectdata *conn = pp->conn; -#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI) struct SessionHandle *data = conn->data; +#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI) char * const buf = data->state.buffer; #endif CURLcode result = CURLE_OK; @@ -661,16 +661,23 @@ static CURLcode ftp_readresp(curl_socket_t sockfd, #endif /* store the latest code for later retrieval */ - conn->data->info.httpcode=code; + data->info.httpcode=code; if(ftpcode) *ftpcode = code; - if(421 == code) + if(421 == code) { /* 421 means "Service not available, closing control connection." and FTP * servers use it to signal that idle session timeout has been exceeded. - * If we ignored the response, it could end up hanging in some cases. */ + * If we ignored the response, it could end up hanging in some cases. + * + * This response code can come at any point so having it treated + * generically is a good idea. + */ + infof(data, "We got a 421 - timeout!\n"); + state(conn, FTP_STOP); return CURLE_OPERATION_TIMEDOUT; + } return result; } @@ -1793,6 +1800,23 @@ static CURLcode ftp_state_quote(struct connectdata *conn, return result; } +/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV + problems */ +static CURLcode ftp_epsv_disable(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + infof(conn->data, "got positive EPSV response, but can't connect. " + "Disabling EPSV\n"); + /* disable it for next transfer */ + conn->bits.ftp_use_epsv = FALSE; + conn->data->state.errorbuf = FALSE; /* allow error message to get + rewritten */ + PPSENDF(&conn->proto.ftpc.pp, "PASV", NULL); + conn->proto.ftpc.count1++; + /* remain in the FTP_PASV state */ + return result; +} + static CURLcode ftp_state_pasv_resp(struct connectdata *conn, int ftpcode) { @@ -1975,20 +1999,12 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, Curl_resolv_unlock(data, addr); /* we're done using this address */ - if(result && ftpc->count1 == 0 && ftpcode == 229) { - infof(data, "got positive EPSV response, but can't connect. " - "Disabling EPSV\n"); - /* disable it for next transfer */ - conn->bits.ftp_use_epsv = FALSE; - data->state.errorbuf = FALSE; /* allow error message to get rewritten */ - PPSENDF(&ftpc->pp, "PASV", NULL); - ftpc->count1++; - /* remain in the FTP_PASV state */ - return result; - } + if(result) { + if(ftpc->count1 == 0 && ftpcode == 229) + return ftp_epsv_disable(conn); - if(result) return result; + } conn->bits.tcpconnect[SECONDARYSOCKET] = connected; @@ -2028,8 +2044,11 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn, break; } - if(result) + if(result) { + if(ftpc->count1 == 0 && ftpcode == 229) + return ftp_epsv_disable(conn); return result; + } if(conn->bits.tunnel_proxy && conn->bits.httpproxy) { /* FIX: this MUST wait for a proper connect first if 'connected' is @@ -2394,6 +2413,7 @@ static CURLcode ftp_state_stor_resp(struct connectdata *conn, if(ftpcode>=400) { failf(data, "Failed FTP upload: %0d", ftpcode); + state(conn, FTP_STOP); /* oops, we never close the sockets! */ return CURLE_UPLOAD_FAILED; } @@ -2411,9 +2431,6 @@ static CURLcode ftp_state_stor_resp(struct connectdata *conn, if(!connected) { struct ftp_conn *ftpc = &conn->proto.ftpc; infof(data, "Data conn was not available immediately\n"); - /* as there's not necessarily an immediate action on the control - connection now, we halt the state machine */ - state(conn, FTP_STOP); ftpc->wait_data_conn = TRUE; } @@ -3663,6 +3680,8 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete) /* the ftp struct is inited in ftp_connect() */ struct FTP *ftp = data->state.proto.ftp; + *complete = FALSE; + /* if the second connection isn't done yet, wait for it */ if(!conn->bits.tcpconnect[SECONDARYSOCKET]) { result = Curl_is_connected(conn, SECONDARYSOCKET, &connected); @@ -3675,6 +3694,18 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete) return result; } + if((data->state.used_interface == Curl_if_multi) && + ftpc->state) { + /* multi interface and already in a state so skip the intial commands. + They are only done to kickstart the do_more state */ + result = ftp_multi_statemach(conn, complete); + + /* if we got an error or if we don't wait for a data connection return + immediately */ + if(result || (ftpc->wait_data_conn != TRUE)) + return result; + } + if(ftp->transfer <= FTPTRANSFER_INFO) { /* a transfer is about to take place, or if not a file name was given so we'll do a SIZE on it later and then we need the right TYPE first */ @@ -3728,7 +3759,13 @@ static CURLcode ftp_do_more(struct connectdata *conn, bool *complete) return result; } } - result = ftp_easy_statemach(conn); + if(data->state.used_interface == Curl_if_multi) { + result = ftp_multi_statemach(conn, complete); + + return result; + } + else + result = ftp_easy_statemach(conn); } if((result == CURLE_OK) && (ftp->transfer != FTPTRANSFER_BODY)) @@ -4402,20 +4439,21 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) static CURLcode ftp_dophase_done(struct connectdata *conn, bool connected) { - CURLcode result = CURLE_OK; struct FTP *ftp = conn->data->state.proto.ftp; struct ftp_conn *ftpc = &conn->proto.ftpc; if(connected) { bool completed; - result = ftp_do_more(conn, &completed); - } + CURLcode result = ftp_do_more(conn, &completed); - if(result && (conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD)) { - /* Failure detected, close the second socket if it was created already */ - Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); - conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; - return result; + if(result) { + if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) { + /* close the second socket if it was created already */ + Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); + conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; + } + return result; + } } if(ftp->transfer != FTPTRANSFER_BODY) @@ -4427,7 +4465,7 @@ static CURLcode ftp_dophase_done(struct connectdata *conn, ftpc->ctl_valid = TRUE; /* seems good */ - return result; + return CURLE_OK; } /* called from multi.c while DOing */ diff --git a/lib/gopher.c b/lib/gopher.c index b4efae8c..ac0397fe 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -70,10 +70,10 @@ #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> +#include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" - /* * Forward declarations. */ @@ -299,14 +299,35 @@ static CURLcode handshake(struct connectdata *conn, connssl->connecting_state = gnutls_record_get_direction(session)? ssl_connect_2_writing:ssl_connect_2_reading; + continue; if(nonblocking) return CURLE_OK; } - else if((rc < 0) && gnutls_error_is_fatal(rc)) { - failf(data, "gnutls_handshake() warning: %s", gnutls_strerror(rc)); + else if((rc < 0) && !gnutls_error_is_fatal(rc)) { + const char *strerr = NULL; + + if(rc == GNUTLS_E_WARNING_ALERT_RECEIVED) { + int alert = gnutls_alert_get(session); + strerr = gnutls_alert_get_name(alert); + } + + if(strerr == NULL) + strerr = gnutls_strerror(rc); + + failf(data, "gnutls_handshake() warning: %s", strerr); } else if(rc < 0) { - failf(data, "gnutls_handshake() failed: %s", gnutls_strerror(rc)); + const char *strerr = NULL; + + if(rc == GNUTLS_E_FATAL_ALERT_RECEIVED) { + int alert = gnutls_alert_get(session); + strerr = gnutls_alert_get_name(alert); + } + + if(strerr == NULL) + strerr = gnutls_strerror(rc); + + failf(data, "gnutls_handshake() failed: %s", strerr); return CURLE_SSL_CONNECT_ERROR; } @@ -660,7 +681,7 @@ gtls_connect_step3(struct connectdata *conn, rc = gnutls_x509_crt_check_hostname(x509_cert, conn->host.name); if(!rc) { - if(data->set.ssl.verifyhost > 1) { + if(data->set.ssl.verifyhost) { failf(data, "SSL: certificate subject name (%s) does not match " "target host name '%s'", certbuf, conn->host.dispname); gnutls_x509_crt_deinit(x509_cert); diff --git a/lib/hostcheck.c b/lib/hostcheck.c new file mode 100644 index 00000000..8affce04 --- /dev/null +++ b/lib/hostcheck.c @@ -0,0 +1,96 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, 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" + +#if defined(USE_SSLEAY) || defined(USE_AXTLS) +/* these two backends use functions from this file */ + +#include "hostcheck.h" +#include "rawstr.h" + +/* + * Match a hostname against a wildcard pattern. + * E.g. + * "foo.host.com" matches "*.host.com". + * + * We use the matching rule described in RFC6125, section 6.4.3. + * http://tools.ietf.org/html/rfc6125#section-6.4.3 + */ + +static int hostmatch(const char *hostname, const char *pattern) +{ + const char *pattern_label_end, *pattern_wildcard, *hostname_label_end; + int wildcard_enabled; + size_t prefixlen, suffixlen; + pattern_wildcard = strchr(pattern, '*'); + if(pattern_wildcard == NULL) + return Curl_raw_equal(pattern, hostname) ? + CURL_HOST_MATCH : CURL_HOST_NOMATCH; + + /* We require at least 2 dots in pattern to avoid too wide wildcard + match. */ + wildcard_enabled = 1; + pattern_label_end = strchr(pattern, '.'); + if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL || + pattern_wildcard > pattern_label_end || + Curl_raw_nequal(pattern, "xn--", 4)) { + wildcard_enabled = 0; + } + if(!wildcard_enabled) + return Curl_raw_equal(pattern, hostname) ? + CURL_HOST_MATCH : CURL_HOST_NOMATCH; + + hostname_label_end = strchr(hostname, '.'); + if(hostname_label_end == NULL || + !Curl_raw_equal(pattern_label_end, hostname_label_end)) + return CURL_HOST_NOMATCH; + + /* The wildcard must match at least one character, so the left-most + label of the hostname is at least as large as the left-most label + of the pattern. */ + if(hostname_label_end - hostname < pattern_label_end - pattern) + return CURL_HOST_NOMATCH; + + prefixlen = pattern_wildcard - pattern; + suffixlen = pattern_label_end - (pattern_wildcard+1); + return Curl_raw_nequal(pattern, hostname, prefixlen) && + Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen, + suffixlen) ? + CURL_HOST_MATCH : CURL_HOST_NOMATCH; +} + +int Curl_cert_hostcheck(const char *match_pattern, const char *hostname) +{ + if(!match_pattern || !*match_pattern || + !hostname || !*hostname) /* sanity check */ + return 0; + + if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ + return 1; + + if(hostmatch(hostname,match_pattern) == CURL_HOST_MATCH) + return 1; + return 0; +} + +#endif /* SSLEAY or AXTLS */ diff --git a/lib/hostcheck.h b/lib/hostcheck.h new file mode 100644 index 00000000..51cc4aa8 --- /dev/null +++ b/lib/hostcheck.h @@ -0,0 +1,31 @@ +#ifndef __HOSTCHECK_H +#define __HOSTCHECK_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, 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 <curl/curl.h> + +#define CURL_HOST_NOMATCH 0 +#define CURL_HOST_MATCH 1 +int Curl_cert_hostcheck(const char *match_pattern, const char *hostname); + +#endif diff --git a/lib/hostip.c b/lib/hostip.c index 503ba483..ef14ce86 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -740,14 +740,18 @@ static int hostcache_inuse(void *data, void *hc) return 1; /* free all entries */ } -void Curl_hostcache_destroy(struct SessionHandle *data) +void Curl_hostcache_clean(struct SessionHandle *data) { /* Entries added to the hostcache with the CURLOPT_RESOLVE function are * still present in the cache with the inuse counter set to 1. Detect them * and cleanup! */ Curl_hash_clean_with_criterium(data->dns.hostcache, data, hostcache_inuse); +} +void Curl_hostcache_destroy(struct SessionHandle *data) +{ + Curl_hostcache_clean(data); Curl_hash_destroy(data->dns.hostcache); data->dns.hostcachetype = HCACHE_NONE; data->dns.hostcache = NULL; diff --git a/lib/hostip.h b/lib/hostip.h index 12fb80f5..de71f54f 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -201,10 +201,18 @@ extern sigjmp_buf curl_jmpenv; CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers); /* + * Clean off entries from the cache + */ +void Curl_hostcache_clean(struct SessionHandle *data); + +/* * Destroy the hostcache of this handle. */ void Curl_hostcache_destroy(struct SessionHandle *data); +/* + * Populate the cache with specified entries from CURLOPT_RESOLVE. + */ CURLcode Curl_loadhostpairs(struct SessionHandle *data); #endif /* HEADER_CURL_HOSTIP_H */ @@ -387,7 +387,8 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) (data->state.authproxy.picked == CURLAUTH_NTLM_WB) || (data->state.authhost.picked == CURLAUTH_NTLM_WB)) { if(((expectsend - bytessent) < 2000) || - (conn->ntlm.state != NTLMSTATE_NONE)) { + (conn->ntlm.state != NTLMSTATE_NONE) || + (conn->proxyntlm.state != NTLMSTATE_NONE)) { /* The NTLM-negotiation has started *OR* there is just a little (<2K) data left to send, keep on sending. */ @@ -407,7 +408,7 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) " bytes\n", (curl_off_t)(expectsend - bytessent)); } - /* This is not NTLM or NTLM with many bytes left to send: close + /* This is not NTLM or many bytes left to send: close */ conn->bits.close = TRUE; data->req.size = 0; /* don't download any more than 0 bytes */ diff --git a/lib/http_digest.c b/lib/http_digest.c index 112d8859..17cc95e8 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -280,7 +280,7 @@ CURLcode Curl_output_digest(struct connectdata *conn, unsigned char *md5this; unsigned char *ha1; unsigned char ha2[33];/* 32 digits and 1 zero byte */ - char cnoncebuf[7]; + char cnoncebuf[33]; char *cnonce = NULL; size_t cnonce_sz = 0; char *tmp = NULL; @@ -344,7 +344,8 @@ CURLcode Curl_output_digest(struct connectdata *conn, if(!d->cnonce) { /* Generate a cnonce */ now = Curl_tvnow(); - snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", (long)now.tv_sec); + snprintf(cnoncebuf, sizeof(cnoncebuf), "%32ld", + (long)now.tv_sec + now.tv_usec); rc = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce, &cnonce_sz); diff --git a/lib/http_proxy.c b/lib/http_proxy.c index 15f01184..245e1c1f 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -45,6 +45,7 @@ #include "curlx.h" +#include "curl_memory.h" /* The last #include file should be: */ #include "memdebug.h" diff --git a/lib/idn_win32.c b/lib/idn_win32.c index 68accdca..9bc9cb81 100644 --- a/lib/idn_win32.c +++ b/lib/idn_win32.c @@ -30,6 +30,10 @@ #include "curl_multibyte.h" +#include "curl_memory.h" +/* The last #include file should be: */ +#include "memdebug.h" + #ifdef WANT_IDN_PROTOTYPES WINBASEAPI int WINAPI IdnToAscii(DWORD, const WCHAR *, int, WCHAR *, int); WINBASEAPI int WINAPI IdnToUnicode(DWORD, const WCHAR *, int, WCHAR *, int); diff --git a/lib/libcurl.plist b/lib/libcurl.plist index 8f839ac9..7185f2c7 100644 --- a/lib/libcurl.plist +++ b/lib/libcurl.plist @@ -15,7 +15,7 @@ <string>com.libcurl.libcurl</string> <key>CFBundleVersion</key> - <string>7.28.0</string> + <string>7.28.1</string> <key>CFBundleName</key> <string>libcurl</string> @@ -27,9 +27,9 @@ <string>????</string> <key>CFBundleShortVersionString</key> - <string>libcurl 7.28.0</string> + <string>libcurl 7.28.1</string> <key>CFBundleGetInfoString</key> - <string>libcurl.plist 7.28.0</string> + <string>libcurl.plist 7.28.1</string> </dict> </plist> diff --git a/lib/libcurl.vcproj b/lib/libcurl.vcproj index 104a7733..fd281037 100644 --- a/lib/libcurl.vcproj +++ b/lib/libcurl.vcproj @@ -144,6 +144,7 @@ <File RelativePath="hash.c"></File>
<File RelativePath="hmac.c"></File>
<File RelativePath="hostasyn.c"></File>
+<File RelativePath="hostcheck.c"></File>
<File RelativePath="hostip4.c"></File>
<File RelativePath="hostip6.c"></File>
<File RelativePath="hostip.c"></File>
@@ -254,6 +255,7 @@ <File RelativePath="gopher.h"></File>
<File RelativePath="gtls.h"></File>
<File RelativePath="hash.h"></File>
+<File RelativePath="hostcheck.h"></File>
<File RelativePath="hostip.h"></File>
<File RelativePath="http_chunks.h"></File>
<File RelativePath="http_digest.h"></File>
@@ -28,9 +28,13 @@ #include "curl_hmac.h" #include "warnless.h" +#include "curl_memory.h" + #if defined(USE_GNUTLS_NETTLE) #include <nettle/md5.h> +/* The last #include file should be: */ +#include "memdebug.h" typedef struct md5_ctx MD5_CTX; @@ -54,6 +58,8 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx) #elif defined(USE_GNUTLS) #include <gcrypt.h> +/* The last #include file should be: */ +#include "memdebug.h" typedef gcry_md_hd_t MD5_CTX; @@ -84,6 +90,17 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX * ctx) # include <md5.h> # endif +#elif defined(__MAC_10_4) || defined(__IPHONE_5_0) + +/* For Apple operating systems: CommonCrypto has the functions we need. + The library's headers are even backward-compatible with OpenSSL's + headers as long as we define COMMON_DIGEST_FOR_OPENSSL first. + + These functions are available on Tiger and later, as well as iOS 5.0 + and later. If you're building for an older cat, well, sorry. */ +# define COMMON_DIGEST_FOR_OPENSSL +# include <CommonCrypto/CommonDigest.h> + #elif defined(_WIN32) #include <wincrypt.h> @@ -425,6 +442,9 @@ static void Decode (UINT4 *output, #endif /* CRYPTO LIBS */ +/* The last #include file should be: */ +#include "memdebug.h" + const HMAC_params Curl_HMAC_MD5[] = { { (HMAC_hinit_func) MD5_Init, /* Hash initialization function. */ diff --git a/lib/multi.c b/lib/multi.c index 93884676..b4e01bd9 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1789,12 +1789,6 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, } WHILE_FALSE; /* just to break out from! */ if(CURLM_STATE_COMPLETED == easy->state) { - if(data->dns.hostcachetype == HCACHE_MULTI) { - /* clear out the usage of the shared DNS cache */ - data->dns.hostcache = NULL; - data->dns.hostcachetype = HCACHE_NONE; - } - /* now fill in the Curl_message with this info */ msg = &easy->msg; @@ -1911,9 +1905,6 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) cl= n; } - Curl_hash_destroy(multi->hostcache); - multi->hostcache = NULL; - Curl_hash_destroy(multi->sockhash); multi->sockhash = NULL; @@ -1930,6 +1921,7 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) nexteasy=easy->next; if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) { /* clear out the usage of the shared DNS cache */ + Curl_hostcache_clean(easy->easy_handle); easy->easy_handle->dns.hostcache = NULL; easy->easy_handle->dns.hostcachetype = HCACHE_NONE; } @@ -1943,6 +1935,9 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) easy = nexteasy; } + Curl_hash_destroy(multi->hostcache); + multi->hostcache = NULL; + free(multi); return CURLM_OK; diff --git a/lib/non-ascii.c b/lib/non-ascii.c index a38680cc..8e29227c 100644 --- a/lib/non-ascii.c +++ b/lib/non-ascii.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -24,12 +24,16 @@ #ifdef CURL_DOES_CONVERSIONS +#include <curl/curl.h> + #include "non-ascii.h" #include "formdata.h" #include "sendf.h" #include "urldata.h" -#include <curl/curl.h> +#include "curl_memory.h" +/* The last #include file should be: */ +#include "memdebug.h" #ifdef HAVE_ICONV #include <iconv.h> @@ -1316,8 +1316,6 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex) if(!data->set.ssl.verifypeer && data->set.ssl.verifyhost) infof(data, "warning: ignoring value of ssl.verifyhost\n"); - else if(data->set.ssl.verifyhost == 1) - infof(data, "warning: ignoring unsupported value (1) of ssl.verifyhost\n"); /* bypass the default SSL_AuthCertificate() hook in case we do not want to * verify peer */ diff --git a/lib/nwlib.c b/lib/nwlib.c index a7ea17bb..c67342a0 100644 --- a/lib/nwlib.c +++ b/lib/nwlib.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -32,6 +32,9 @@ #include <nks/thread.h> #include <nks/synch.h> +#include "curl_memory.h" +/* The last #include file should be: */ +#include "memdebug.h" typedef struct { diff --git a/lib/pingpong.c b/lib/pingpong.c index c1089465..85a7a45a 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -424,6 +424,9 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, it may actually contain another end of response already! */ clipamount = gotbytes - i; restart = TRUE; + DEBUGF(infof(data, "Curl_pp_readresp_ %d bytes of trailing " + "server response left\n", + (int)clipamount)); } else if(keepon) { diff --git a/lib/polarssl.c b/lib/polarssl.c index a2f61d23..b20b4a39 100644 --- a/lib/polarssl.c +++ b/lib/polarssl.c @@ -212,8 +212,15 @@ polarssl_connect_step1(struct connectdata *conn, infof(data, "PolarSSL re-using session\n"); } +/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's + 1.1.4 version and the like */ +#if POLARSSL_VERSION_NUMBER<0x01020000 ssl_set_session(&connssl->ssl, 1, 600, &connssl->ssn); +#else + ssl_set_session(&connssl->ssl, + &connssl->ssn); +#endif ssl_set_ca_chain(&connssl->ssl, &connssl->cacert, @@ -306,12 +313,25 @@ polarssl_connect_step2(struct connectdata *conn, return CURLE_PEER_FAILED_VERIFICATION; } +/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's + 1.1.4 version and the like */ +#if POLARSSL_VERSION_NUMBER<0x01020000 if(conn->ssl[sockindex].ssl.peer_cert) { +#else + if(ssl_get_peer_cert(&(connssl->ssl))) { +#endif /* If the session was resumed, there will be no peer certs */ memset(buffer, 0, sizeof(buffer)); +/* PolarSSL SVN revision r1316 to r1317, matching <1.2.0 is to cover Ubuntu's + 1.1.4 version and the like */ +#if POLARSSL_VERSION_NUMBER<0x01020000 if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ", conn->ssl[sockindex].ssl.peer_cert) != -1) +#else + if(x509parse_cert_info(buffer, sizeof(buffer), (char *)"* ", + ssl_get_peer_cert(&(connssl->ssl))) != -1) +#endif infof(data, "Dumping cert info:\n%s\n", buffer); } diff --git a/lib/sendf.c b/lib/sendf.c index 847090be..1a9b63f3 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -264,7 +264,7 @@ CURLcode Curl_write(struct connectdata *conn, default: /* we got a specific curlcode, forward it */ - return (CURLcode)curlcode; + return curlcode; } } @@ -2982,6 +2982,10 @@ static ssize_t scp_send(struct connectdata *conn, int sockindex, *err = CURLE_AGAIN; nwrite = 0; } + else if(nwrite < LIBSSH2_ERROR_NONE) { + *err = libssh2_session_error_to_CURLE(nwrite); + nwrite = -1; + } return nwrite; } @@ -3126,6 +3130,10 @@ static ssize_t sftp_send(struct connectdata *conn, int sockindex, *err = CURLE_AGAIN; nwrite = 0; } + else if(nwrite < LIBSSH2_ERROR_NONE) { + *err = libssh2_session_error_to_CURLE(nwrite); + nwrite = -1; + } return nwrite; } diff --git a/lib/ssluse.c b/lib/ssluse.c index a701131f..92ae2e3e 100644 --- a/lib/ssluse.c +++ b/lib/ssluse.c @@ -50,6 +50,7 @@ #include "select.h" #include "sslgen.h" #include "rawstr.h" +#include "hostcheck.h" #define _MPRINTF_REPLACE /* use the internal *printf() functions */ #include <curl/mprintf.h> @@ -1039,71 +1040,6 @@ static int asn1_output(const ASN1_UTCTIME *tm, /* ====================================================== */ -/* - * Match a hostname against a wildcard pattern. - * E.g. - * "foo.host.com" matches "*.host.com". - * - * We use the matching rule described in RFC6125, section 6.4.3. - * http://tools.ietf.org/html/rfc6125#section-6.4.3 - */ -#define HOST_NOMATCH 0 -#define HOST_MATCH 1 - -static int hostmatch(const char *hostname, const char *pattern) -{ - const char *pattern_label_end, *pattern_wildcard, *hostname_label_end; - int wildcard_enabled; - size_t prefixlen, suffixlen; - pattern_wildcard = strchr(pattern, '*'); - if(pattern_wildcard == NULL) { - return Curl_raw_equal(pattern, hostname) ? HOST_MATCH : HOST_NOMATCH; - } - /* We require at least 2 dots in pattern to avoid too wide wildcard - match. */ - wildcard_enabled = 1; - pattern_label_end = strchr(pattern, '.'); - if(pattern_label_end == NULL || strchr(pattern_label_end+1, '.') == NULL || - pattern_wildcard > pattern_label_end || - Curl_raw_nequal(pattern, "xn--", 4)) { - wildcard_enabled = 0; - } - if(!wildcard_enabled) { - return Curl_raw_equal(pattern, hostname) ? HOST_MATCH : HOST_NOMATCH; - } - hostname_label_end = strchr(hostname, '.'); - if(hostname_label_end == NULL || - !Curl_raw_equal(pattern_label_end, hostname_label_end)) { - return HOST_NOMATCH; - } - /* The wildcard must match at least one character, so the left-most - label of the hostname is at least as large as the left-most label - of the pattern. */ - if(hostname_label_end - hostname < pattern_label_end - pattern) { - return HOST_NOMATCH; - } - prefixlen = pattern_wildcard - pattern; - suffixlen = pattern_label_end - (pattern_wildcard+1); - return Curl_raw_nequal(pattern, hostname, prefixlen) && - Curl_raw_nequal(pattern_wildcard+1, hostname_label_end - suffixlen, - suffixlen) ? - HOST_MATCH : HOST_NOMATCH; -} - -static int -cert_hostcheck(const char *match_pattern, const char *hostname) -{ - if(!match_pattern || !*match_pattern || - !hostname || !*hostname) /* sanity check */ - return 0; - - if(Curl_raw_equal(hostname, match_pattern)) /* trivial case */ - return 1; - - if(hostmatch(hostname,match_pattern) == HOST_MATCH) - return 1; - return 0; -} /* Quote from RFC2818 section 3.1 "Server Identity" @@ -1192,7 +1128,7 @@ static CURLcode verifyhost(struct connectdata *conn, if((altlen == strlen(altptr)) && /* if this isn't true, there was an embedded zero in the name string and we cannot match it. */ - cert_hostcheck(altptr, conn->host.name)) + Curl_cert_hostcheck(altptr, conn->host.name)) matched = 1; else matched = 0; @@ -1291,15 +1227,10 @@ static CURLcode verifyhost(struct connectdata *conn, "SSL: unable to obtain common name from peer certificate"); res = CURLE_PEER_FAILED_VERIFICATION; } - else if(!cert_hostcheck((const char *)peer_CN, conn->host.name)) { - if(data->set.ssl.verifyhost > 1) { - failf(data, "SSL: certificate subject name '%s' does not match " - "target host name '%s'", peer_CN, conn->host.dispname); - res = CURLE_PEER_FAILED_VERIFICATION; - } - else - infof(data, "\t common name: %s (does not match '%s')\n", - peer_CN, conn->host.dispname); + else if(!Curl_cert_hostcheck((const char *)peer_CN, conn->host.name)) { + failf(data, "SSL: certificate subject name '%s' does not match " + "target host name '%s'", peer_CN, conn->host.dispname); + res = CURLE_PEER_FAILED_VERIFICATION; } else { infof(data, "\t common name: %s (matched)\n", peer_CN); @@ -1570,6 +1501,10 @@ ossl_connect_step1(struct connectdata *conn, ctx_options |= SSL_OP_NO_TICKET; #endif +#ifdef SSL_OP_NO_COMPRESSION + ctx_options |= SSL_OP_NO_COMPRESSION; +#endif + #ifdef SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG /* mitigate CVE-2010-4180 */ ctx_options &= ~SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG; @@ -2308,11 +2243,11 @@ static CURLcode servercert(struct connectdata *conn, infof(data, "\t subject: %s\n", buffer); certdate = X509_get_notBefore(connssl->server_cert); - asn1_output(certdate, buffer, sizeof(buffer)); + asn1_output(certdate, buffer, BUFSIZE); infof(data, "\t start date: %s\n", buffer); certdate = X509_get_notAfter(connssl->server_cert); - asn1_output(certdate, buffer, sizeof(buffer)); + asn1_output(certdate, buffer, BUFSIZE); infof(data, "\t expire date: %s\n", buffer); if(data->set.ssl.verifyhost) { @@ -2325,7 +2260,7 @@ static CURLcode servercert(struct connectdata *conn, } rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert), - buffer, sizeof(buffer)); + buffer, BUFSIZE); if(rc) { if(strict) failf(data, "SSL: couldn't get X509-issuer name!"); diff --git a/lib/strdup.c b/lib/strdup.c index 02d480c2..27014354 100644 --- a/lib/strdup.c +++ b/lib/strdup.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2012, 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 @@ -19,7 +19,9 @@ * KIND, either express or implied. * ***************************************************************************/ - +/* + * This file is 'mem-include-scan' clean. See test 1132. + */ #include "setup.h" #include "strdup.h" diff --git a/lib/strerror.c b/lib/strerror.c index dd7d3756..0c82a53e 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -44,6 +44,9 @@ #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> +#include "curl_memory.h" +/* The last #include file should be: */ +#include "memdebug.h" const char * curl_easy_strerror(CURLcode error) @@ -591,16 +591,25 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event) case TFTP_EVENT_DATA: /* Is this the block we expect? */ rblock = getrpacketblock(&state->rpacket); - if(NEXT_BLOCKNUM(state->block) != rblock) { - /* No, log it */ + if(NEXT_BLOCKNUM(state->block) == rblock) { + /* This is the expected block. Reset counters and ACK it. */ + state->retries = 0; + } + else if(state->block == rblock) { + /* This is the last recently received block again. Log it and ACK it + again. */ + infof(data, "Received last DATA packet block %d again.\n", rblock); + } + else { + /* totally unexpected, just log it */ infof(data, "Received unexpected DATA packet block %d, expecting block %d\n", rblock, NEXT_BLOCKNUM(state->block)); break; } - /* This is the expected block. Reset counters and ACK it. */ + + /* ACK this block. */ state->block = (unsigned short)rblock; - state->retries = 0; setpacketevent(&state->spacket, TFTP_EVENT_ACK); setpacketblock(&state->spacket, state->block); sbytes = sendto(state->sockfd, (void *)state->spacket.data, diff --git a/lib/transfer.c b/lib/transfer.c index 2ad5fad4..51b2f775 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1030,12 +1030,6 @@ CURLcode Curl_readwrite(struct connectdata *conn, if(result || *done) return result; } - else if(k->keepon & KEEP_RECV) { - DEBUGF(infof(data, "additional stuff not fine %s:%d: %d %d\n", - __FILE__, __LINE__, - select_res & CURL_CSELECT_IN, - conn->bits.stream_was_rewound)); - } /* If we still have writing to do, we check if we have a writable socket. */ if((k->keepon & KEEP_SEND) && (select_res & CURL_CSELECT_OUT)) { @@ -1433,10 +1427,6 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) data->state.ssl_connect_retry = FALSE; - /* zero out auth state */ - memset(&data->state.authhost, 0, sizeof(struct auth)); - memset(&data->state.authproxy, 0, sizeof(struct auth)); - data->state.authproblem = FALSE; data->state.authhost.want = data->set.httpauth; data->state.authproxy.want = data->set.proxyauth; @@ -1473,6 +1463,12 @@ CURLcode Curl_pretransfer(struct SessionHandle *data) if(data->set.connecttimeout) Curl_expire(data, data->set.connecttimeout); + + /* In case the handle is re-used and an authentication method was picked + in the session we need to make sure we only use the one(s) we now + consider to be fine */ + data->state.authhost.picked &= data->state.authhost.want; + data->state.authproxy.picked &= data->state.authproxy.want; } return res; @@ -708,7 +708,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) * switched off unless wanted. */ set->ssl.verifypeer = TRUE; - set->ssl.verifyhost = 2; + set->ssl.verifyhost = TRUE; #ifdef USE_TLS_SRP set->ssl.authtype = CURL_TLSAUTH_NONE; #endif @@ -2049,13 +2049,25 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, /* * Enable peer SSL verifying. */ - data->set.ssl.verifypeer = va_arg(param, long); + data->set.ssl.verifypeer = (0 != va_arg(param, long))?TRUE:FALSE; break; case CURLOPT_SSL_VERIFYHOST: /* - * Enable verification of the CN contained in the peer certificate + * Enable verification of the host name in the peer certificate */ - data->set.ssl.verifyhost = va_arg(param, long); + arg = va_arg(param, long); + + /* Obviously people are not reading documentation and too many thought + this argument took a boolean when it wasn't and misused it. We thus ban + 1 as a sensible input and we warn about its use. Then we only have the + 2 action internally stored as TRUE. */ + + if(1 == arg) { + failf(data, "CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!"); + return CURLE_BAD_FUNCTION_ARGUMENT; + } + + data->set.ssl.verifyhost = (0 != arg)?TRUE:FALSE; break; #ifdef USE_SSLEAY /* since these two options are only possible to use on an OpenSSL- @@ -2589,7 +2601,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ break; case CURLOPT_TLSAUTH_TYPE: - if(strncmp((char *)va_arg(param, char *), "SRP", strlen("SRP")) == 0) + if(strnequal((char *)va_arg(param, char *), "SRP", strlen("SRP"))) data->set.ssl.authtype = CURL_TLSAUTH_SRP; else data->set.ssl.authtype = CURL_TLSAUTH_NONE; @@ -3975,9 +3987,17 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data, last part of the URI. We are looking for the first '#' so that we deal gracefully with non conformant URI such as http://example.com#foo#bar. */ fragment = strchr(path, '#'); - if(fragment) + if(fragment) { *fragment = 0; + /* we know the path part ended with a fragment, so we know the full URL + string does too and we need to cut it off from there so it isn't used + over proxy */ + fragment = strchr(data->change.url, '#'); + if(fragment) + *fragment = 0; + } + /* * So if the URL was A://B/C#D, * protop is A diff --git a/lib/urldata.h b/lib/urldata.h index 5f893c92..4116c341 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -332,10 +332,9 @@ struct ssl_connect_data { struct ssl_config_data { long version; /* what version the client wants to use */ long certverifyresult; /* result from the certificate verification */ - long verifypeer; /* set TRUE if this is desired */ - long verifyhost; /* 0: no verify - 1: check that CN exists - 2: CN must match hostname */ + + bool verifypeer; /* set TRUE if this is desired */ + bool verifyhost; /* set TRUE if CN/SAN must match hostname */ char *CApath; /* certificate dir (doesn't work on windows) */ char *CAfile; /* certificate to verify peer against */ const char *CRLfile; /* CRL to check certificate revocation */ @@ -994,8 +993,8 @@ struct connectdata { int socks5_gssapi_enctype; #endif - long verifypeer; - long verifyhost; + bool verifypeer; + bool verifyhost; /* When this connection is created, store the conditions for the local end bind. This is stored before the actual bind and before any connection is diff --git a/lib/vc6libcurl.dsp b/lib/vc6libcurl.dsp index ed9c1864..96798df9 100644 --- a/lib/vc6libcurl.dsp +++ b/lib/vc6libcurl.dsp @@ -314,6 +314,10 @@ SOURCE=.\hostasyn.c # End Source File
# Begin Source File
+SOURCE=.\hostcheck.c
+# End Source File
+# Begin Source File
+
SOURCE=.\hostip4.c
# End Source File
# Begin Source File
@@ -754,6 +758,10 @@ SOURCE=.\hash.h # End Source File
# Begin Source File
+SOURCE=.\hostcheck.h
+# End Source File
+# Begin Source File
+
SOURCE=.\hostip.h
# End Source File
# Begin Source File
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 0cbba7a0..819bbd9c 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -97,7 +97,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [ flags_dbg_all="$flags_dbg_all -gdwarf-2" flags_dbg_all="$flags_dbg_all -gvms" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4" flags_opt_yes="-Os" flags_opt_off="-O0" @@ -121,7 +121,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_DEC_C], [ compiler_id="DEC_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g2" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -O4" flags_opt_yes="-O1" flags_opt_off="-O0" @@ -157,7 +157,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [ flags_dbg_all="$flags_dbg_all -gdwarf-2" flags_dbg_all="$flags_dbg_all -gvms" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -236,7 +236,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_INTEL_C], [ compiler_id="INTEL_UNIX_C" flags_dbg_all="-g -g0" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Os" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -300,7 +300,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPS_C], [ compiler_id="SGI_MIPS_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" flags_opt_yes="-O2" flags_opt_off="-O0" @@ -327,7 +327,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPSPRO_C], [ compiler_id="SGI_MIPSPRO_C" flags_dbg_all="-g -g0 -g1 -g2 -g3" flags_dbg_yes="-g" - flags_dbg_off="-g0" + flags_dbg_off="" flags_opt_all="-O -O0 -O1 -O2 -O3 -Ofast" flags_opt_yes="-O2" flags_opt_off="-O0" diff --git a/packages/AIX/Makefile.in b/packages/AIX/Makefile.in index 91211dc4..c6ad1a53 100644 --- a/packages/AIX/Makefile.in +++ b/packages/AIX/Makefile.in @@ -289,9 +289,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/AIX/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/AIX/Makefile + $(AUTOMAKE) --gnu packages/AIX/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/AIX/RPM/Makefile.in b/packages/AIX/RPM/Makefile.in index c88448ec..39530d9a 100644 --- a/packages/AIX/RPM/Makefile.in +++ b/packages/AIX/RPM/Makefile.in @@ -280,9 +280,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/AIX/RPM/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/AIX/RPM/Makefile + $(AUTOMAKE) --gnu packages/AIX/RPM/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/Linux/Makefile.in b/packages/Linux/Makefile.in index 61a7af23..4000ef0c 100644 --- a/packages/Linux/Makefile.in +++ b/packages/Linux/Makefile.in @@ -288,9 +288,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Linux/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/Linux/Makefile + $(AUTOMAKE) --gnu packages/Linux/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/Linux/RPM/Makefile.in b/packages/Linux/RPM/Makefile.in index 07ce60ae..499a3159 100644 --- a/packages/Linux/RPM/Makefile.in +++ b/packages/Linux/RPM/Makefile.in @@ -280,9 +280,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Linux/RPM/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/Linux/RPM/Makefile + $(AUTOMAKE) --gnu packages/Linux/RPM/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/Makefile.in b/packages/Makefile.in index aae4f72c..f6363937 100644 --- a/packages/Makefile.in +++ b/packages/Makefile.in @@ -319,9 +319,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/Makefile + $(AUTOMAKE) --gnu packages/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400 index 8e2dc7f4..9890d067 100644 --- a/packages/OS400/README.OS400 +++ b/packages/OS400/README.OS400 @@ -73,6 +73,7 @@ options: CURLOPT_COPYPOSTFIELDS CURLOPT_CRLFILE CURLOPT_CUSTOMREQUEST + CURLOPT_DNS_SERVERS CURLOPT_EGDSOCKET CURLOPT_ENCODING CURLOPT_FTP_ACCOUNT @@ -83,6 +84,7 @@ options: CURLOPT_KEYPASSWD CURLOPT_KRBLEVEL CURLOPT_MAIL_FROM + CURLOPT_MAIL_AUTH CURLOPT_NETRC_FILE CURLOPT_NOPROXY CURLOPT_PASSWORD diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c index 2943ba62..1baff395 100644 --- a/packages/OS400/ccsidcurl.c +++ b/packages/OS400/ccsidcurl.c @@ -1032,7 +1032,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) #ifdef USE_TLS_SRP if ((int) STRING_LAST != (int) STRING_TLSAUTH_PASSWORD + 1) #else - if ((int) STRING_LAST != (int) STRING_MAIL_FROM + 1) + if ((int) STRING_LAST != (int) STRING_MAIL_AUTH + 1) #endif curl_mfprintf(stderr, "*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n"); @@ -1051,6 +1051,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_COOKIELIST: case CURLOPT_CRLFILE: case CURLOPT_CUSTOMREQUEST: + case CURLOPT_DNS_SERVERS: case CURLOPT_EGDSOCKET: case CURLOPT_ENCODING: case CURLOPT_FTP_ACCOUNT: @@ -1061,6 +1062,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...) case CURLOPT_KEYPASSWD: case CURLOPT_KRBLEVEL: case CURLOPT_MAIL_FROM: + case CURLOPT_MAIL_AUTH: case CURLOPT_NETRC_FILE: case CURLOPT_NOPROXY: case CURLOPT_PASSWORD: diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in index 836c83db..33ca12a4 100644 --- a/packages/OS400/curl.inc.in +++ b/packages/OS400/curl.inc.in @@ -173,6 +173,8 @@ d c X'00000004' d CURLSSH_AUTH_KEYBOARD... d c X'00000008' + d CURLSSH_AUTH_AGENT... + d c X'00000010' d CURLSSH_AUTH_DEFAULT... d c X'7FFFFFFF' CURLSSH_AUTH_ANY * @@ -236,8 +238,10 @@ d c 1 d CURL_REDIR_POST_302... d c 2 + d CURL_REDIR_POST_303... + d c 4 d CURL_REDIR_POST_ALL... - d c 3 + d c 7 * d CURL_POLL_NONE c 0 d CURL_POLL_IN c 1 @@ -299,6 +303,13 @@ d CURL_FNMATCHFUNC_FAIL... d c 2 * + d CURL_WAIT_POLLIN... + d c X'0001' + d CURL_WAIT_POLLPRI... + d c X'0002' + d CURL_WAIT_POLLOUT... + d c X'0004' + * ************************************************************************** * Types ************************************************************************** @@ -327,11 +338,11 @@ d c 8 d CURLE_REMOTE_ACCESS_DENIED... d c 9 - d CURLE_OBSOLETE10... + d CURLE_FTP_ACCEPT_FAILED... d c 10 d CURLE_FTP_WEIRD_PASS_REPLY... d c 11 - d CURLE_OBSOLETE12... + d CURLE_FTP_ACCEPT_TIMEOUT... d c 12 d CURLE_FTP_WEIRD_PASV_REPLY... d c 13 @@ -641,6 +652,9 @@ d CURLUSESSL_ALL... d c 3 * + d CURLSSLOPT_ALLOW_BEAST... + d c 1 + * /if not defined(CURL_NO_OLDIES) d curl_ftpssl s like(curl_usessl) d based(######ptr######) @@ -1124,6 +1138,20 @@ d c 10209 d CURLOPT_GSSAPI_DELEGATION... d c 00210 + d CURLOPT_DNS_SERVERS... + d c 10211 + d CURLOPT_ACCEPTTIMEOUT_MS... + d c 00212 + d CURLOPT_TCP_KEEPALIVE... + d c 00213 + d CURLOPT_TCP_KEEPIDLE... + d c 00214 + d CURLOPT_TCP_KEEPINTVL... + d c 00215 + d CURLOPT_SSL_OPTIONS... + d c 00216 + d CURLOPT_MAIL_AUTH... + d c 10217 * /if not defined(CURL_NO_OLDIES) d CURLOPT_SSLKEYPASSWD... @@ -1385,6 +1413,8 @@ d curlsocktype s 10i 0 based(######ptr######) Enum d CURLSOCKTYPE_IPCXN... d c 0 + d CURLSOCKTYPE_ACCEPT... + d c 1 * d CURL_SOCKOPT_OK... d c 0 @@ -1471,6 +1501,13 @@ d whatever * overlay(data) void * d result overlay(data) like(CURLcode) * + d curl_waitfd... + d ds based(######ptr######) + d qualified + d fd like(curl_socket_t) + d events 5i 0 + d revents 5i 0 + * d curl_http_post... d ds based(######ptr######) d qualified @@ -1916,6 +1953,15 @@ d exc_fd_set 65535 options(*varsize) fd_set d max_fd 10i 0 * + d curl_multi_wait... + d pr extproc('curl_multi_wait') + d like(CURLMcode) + d multi_handle * value CURLM * + d extra_fds * value curl_waitfd * + d extra_nfds 10u 0 value + d timeout_ms 10i 0 value + d ret 10i 0 options(*omit) + * d curl_multi_perform... d pr extproc('curl_multi_perform') d like(CURLMcode) diff --git a/packages/OS400/initscript.sh b/packages/OS400/initscript.sh index d28a8db1..c07355fc 100644 --- a/packages/OS400/initscript.sh +++ b/packages/OS400/initscript.sh @@ -157,11 +157,8 @@ db2_name() basename "${1}" | tr 'a-z-' 'A-Z_' | sed -e 's/\..*//' \ - -e 's/\([^_]\)[^_]*_\(.*\)/\1\2/' \ - -e 's/\([^_]\)\([^_]\)[^_]*_\(.*\)/\1\2\3/' \ - -e 's/\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\)/\1\2\3\4/' \ - -e 's/\([^_]\)\([^_]\)\([^_]\)\([^_]\)[^_]*_\(.*\)/\1\2\3\4\5/' \ - -e 's/^\(..........\).*/\1/' + -e 's/^CURL_*/C/' \ + -e 's/^\(.\).*\(.........\)$/\1\2/' } diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh index 46c479c3..a9e1c386 100644 --- a/packages/OS400/make-lib.sh +++ b/packages/OS400/make-lib.sh @@ -13,7 +13,7 @@ cd "${TOPDIR}/lib" echo '#pragma comment(user, "libcurl version '"${LIBCURL_VERSION}"'")' > os400.c echo '#pragma comment(user, __DATE__)' >> os400.c echo '#pragma comment(user, __TIME__)' >> os400.c -echo '#pragma comment(copyright, "Copyright (C) 1998-2011 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c +echo '#pragma comment(copyright, "Copyright (C) 1998-2012 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c make_module OS400 os400.c LINK= # No need to rebuild service program yet. MODULES= diff --git a/packages/Solaris/Makefile.in b/packages/Solaris/Makefile.in index ab15693f..651f6f63 100644 --- a/packages/Solaris/Makefile.in +++ b/packages/Solaris/Makefile.in @@ -286,9 +286,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Solaris/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Solaris/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/Solaris/Makefile + $(AUTOMAKE) --gnu packages/Solaris/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/Win32/Makefile.in b/packages/Win32/Makefile.in index b8e84137..4a49fc0d 100644 --- a/packages/Win32/Makefile.in +++ b/packages/Win32/Makefile.in @@ -289,9 +289,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Win32/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/Win32/Makefile + $(AUTOMAKE) --gnu packages/Win32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/Win32/cygwin/Makefile.in b/packages/Win32/cygwin/Makefile.in index 4523e7a9..9596d524 100644 --- a/packages/Win32/cygwin/Makefile.in +++ b/packages/Win32/cygwin/Makefile.in @@ -296,9 +296,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/Win32/cygwin/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/Win32/cygwin/Makefile + $(AUTOMAKE) --gnu packages/Win32/cygwin/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/packages/vms/Makefile.in b/packages/vms/Makefile.in index 9183b84b..75b33edd 100644 --- a/packages/vms/Makefile.in +++ b/packages/vms/Makefile.in @@ -295,9 +295,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/vms/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu packages/vms/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign packages/vms/Makefile + $(AUTOMAKE) --gnu packages/vms/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/src/Makefile.am b/src/Makefile.am index 6e8ce38a..b53127d2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -34,19 +34,19 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files # $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_builddir)/src \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/src +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_builddir)/src \ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/src bin_PROGRAMS = curl # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB -AM_CPPFLAGS = -DCURL_STATICLIB +AM_CPPFLAGS += -DCURL_STATICLIB endif include Makefile.inc diff --git a/src/Makefile.in b/src/Makefile.in index 6d312f4d..8a778927 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -46,6 +46,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = curl$(EXEEXT) + +# Mostly for Windows build targets, when using static libcurl +@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.inc subdir = src @@ -358,17 +361,10 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_builddir)/src is for curl's generated src/curl_config.h file # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files # $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_builddir)/src \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/src - - -# Mostly for Windows build targets, when using static libcurl -@USE_CPPFLAG_CURL_STATICLIB_TRUE@AM_CPPFLAGS = -DCURL_STATICLIB +AM_CPPFLAGS = -I$(top_builddir)/include/curl -I$(top_builddir)/include \ + -I$(top_srcdir)/include -I$(top_builddir)/lib \ + -I$(top_builddir)/src -I$(top_srcdir)/lib -I$(top_srcdir)/src \ + $(am__append_1) # 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. diff --git a/src/Makefile.m32 b/src/Makefile.m32 index 986c82dc..766fc733 100644 --- a/src/Makefile.m32 +++ b/src/Makefile.m32 @@ -32,6 +32,14 @@ endif ifndef LIBMETALINK_PATH LIBMETALINK_PATH = ../../libmetalink-0.1.2 endif +# Edit the path below to point to the base of your libexpat package. +ifndef LIBEXPAT_PATH +LIBEXPAT_PATH = ../../expat-2.1.0 +endif +# Edit the path below to point to the base of your libxml2 package. +ifndef LIBXML2_PATH +LIBXML2_PATH = ../../libxml2-2.9.0 +endif # Edit the path below to point to the base of your libidn package. ifndef LIBIDN_PATH LIBIDN_PATH = ../../libidn-1.18 @@ -67,6 +75,7 @@ CFLAGS += -D_AMD64_ endif # comment LDFLAGS below to keep debug info LDFLAGS = -s +AR = $(CROSSPREFIX)ar RC = $(CROSSPREFIX)windres RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i @@ -180,6 +189,17 @@ ifdef SSH2 curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2 endif ifdef SSL + ifndef OPENSSL_INCLUDE + ifeq "$(wildcard $(OPENSSL_PATH)/outinc)" "$(OPENSSL_PATH)/outinc" + OPENSSL_INCLUDE = $(OPENSSL_PATH)/outinc + endif + ifeq "$(wildcard $(OPENSSL_PATH)/include)" "$(OPENSSL_PATH)/include" + OPENSSL_INCLUDE = $(OPENSSL_PATH)/include + endif + endif + ifneq "$(wildcard $(OPENSSL_INCLUDE)/openssl/opensslv.h)" "$(OPENSSL_INCLUDE)/openssl/opensslv.h" + $(error Invalid path to OpenSSL package: $(OPENSSL_PATH)) + endif ifndef OPENSSL_LIBPATH OPENSSL_LIBS = -lssl -lcrypto ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out" @@ -195,7 +215,8 @@ ifdef SSL ifndef DYN OPENSSL_LIBS += -lgdi32 -lcrypt32 endif - CFLAGS += -DUSE_SSLEAY + INCLUDES += -I"$(OPENSSL_INCLUDE)" + CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS) endif ifdef ZLIB @@ -213,9 +234,16 @@ ifdef WINIDN endif endif ifdef METALINK - INCLUDES += -I"$(LIBMETALINK_PATH)/lib/includes" + INCLUDES += -I"$(LIBMETALINK_PATH)/include" CFLAGS += -DUSE_METALINK - curl_LDADD += -L"$(LIBMETALINK_PATH)/lib/.libs" -lmetalink.dll + curl_LDADD += -L"$(LIBMETALINK_PATH)/lib" -lmetalink + ifndef DYN + ifeq ($(findstring libexpat_metalink_parser.o,$(shell $(AR) t "$(LIBMETALINK_PATH)/lib/libmetalink.a")),libexpat_metalink_parser.o) + curl_LDADD += -L"$(LIBEXPAT_PATH)/lib" -lexpat + else + curl_LDADD += -L"$(LIBXML2_PATH)/lib" -lxml2 + endif + endif endif ifdef SSPI CFLAGS += -DUSE_WINDOWS_SSPI diff --git a/src/hugehelp.c b/src/hugehelp.c index 4bf30e61..3d58e0d9 100644 --- a/src/hugehelp.c +++ b/src/hugehelp.c @@ -2,7 +2,7 @@ #ifndef HAVE_LIBZ /* * NEVER EVER edit this manually, fix the mkhelp.pl script instead! - * Generation time: Sun Sep 9 23:18:09 2012 + * Generation time: Fri Nov 16 14:29:00 2012 */ #ifdef USE_MANUAL #include "hugehelp.h" @@ -3899,7 +3899,7 @@ void hugehelp(void) #else /* * NEVER EVER edit this manually, fix the mkhelp.pl script instead! - * Generation time: Sun Sep 9 23:18:09 2012 + * Generation time: Fri Nov 16 14:29:00 2012 */ #ifdef USE_MANUAL #include "hugehelp.h" diff --git a/src/tool_metalink.c b/src/tool_metalink.c index 103c8864..42b514ca 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -52,10 +52,19 @@ # define MD5_CTX gcry_md_hd_t # define SHA_CTX gcry_md_hd_t # define SHA256_CTX gcry_md_hd_t -#elif defined(USE_DARWINSSL) -/* For darwinssl: CommonCrypto has the functions we need. The library's - headers are even backward-compatible with OpenSSL's headers as long as - we define COMMON_DIGEST_FOR_OPENSSL first. +#elif defined(USE_NSS) +# include <nss.h> +# include <pk11pub.h> +# define MD5_CTX void * +# define SHA_CTX void * +# define SHA256_CTX void * +# ifdef HAVE_NSS_INITCONTEXT + static NSSInitContext *nss_context; +# endif +#elif defined(__MAC_10_4) || defined(__IPHONE_5_0) +/* For Apple operating systems: CommonCrypto has the functions we need. + The library's headers are even backward-compatible with OpenSSL's + headers as long as we define COMMON_DIGEST_FOR_OPENSSL first. These functions are available on Tiger and later, as well as iOS 5.0 and later. If you're building for an older cat, well, sorry. */ @@ -112,9 +121,10 @@ struct win32_crypto_hash { #ifdef USE_GNUTLS_NETTLE -static void MD5_Init(MD5_CTX *ctx) +static int MD5_Init(MD5_CTX *ctx) { md5_init(ctx); + return 1; } static void MD5_Update(MD5_CTX *ctx, @@ -129,9 +139,10 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) md5_digest(ctx, 16, digest); } -static void SHA1_Init(SHA_CTX *ctx) +static int SHA1_Init(SHA_CTX *ctx) { sha1_init(ctx); + return 1; } static void SHA1_Update(SHA_CTX *ctx, @@ -146,9 +157,10 @@ static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx) sha1_digest(ctx, 20, digest); } -static void SHA256_Init(SHA256_CTX *ctx) +static int SHA256_Init(SHA256_CTX *ctx) { sha256_init(ctx); + return 1; } static void SHA256_Update(SHA256_CTX *ctx, @@ -165,9 +177,10 @@ static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx) #elif defined(USE_GNUTLS) -static void MD5_Init(MD5_CTX *ctx) +static int MD5_Init(MD5_CTX *ctx) { gcry_md_open(ctx, GCRY_MD_MD5, 0); + return 1; } static void MD5_Update(MD5_CTX *ctx, @@ -183,9 +196,10 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) gcry_md_close(*ctx); } -static void SHA1_Init(SHA_CTX *ctx) +static int SHA1_Init(SHA_CTX *ctx) { gcry_md_open(ctx, GCRY_MD_SHA1, 0); + return 1; } static void SHA1_Update(SHA_CTX *ctx, @@ -201,9 +215,10 @@ static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx) gcry_md_close(*ctx); } -static void SHA256_Init(SHA256_CTX *ctx) +static int SHA256_Init(SHA256_CTX *ctx) { gcry_md_open(ctx, GCRY_MD_SHA256, 0); + return 1; } static void SHA256_Update(SHA256_CTX *ctx, @@ -219,7 +234,96 @@ static void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx) gcry_md_close(*ctx); } -#elif defined(_WIN32) +#elif defined(USE_NSS) + +static int nss_hash_init(void **pctx, SECOidTag hash_alg) +{ + PK11Context *ctx; + + /* we have to initialize NSS if not initialized alraedy */ +#ifdef HAVE_NSS_INITCONTEXT + if(!NSS_IsInitialized() && !nss_context) { + static NSSInitParameters params; + params.length = sizeof params; + nss_context = NSS_InitContext("", "", "", "", ¶ms, NSS_INIT_READONLY + | NSS_INIT_NOCERTDB | NSS_INIT_NOMODDB | NSS_INIT_FORCEOPEN + | NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE | NSS_INIT_PK11RELOAD); + } +#endif + + ctx = PK11_CreateDigestContext(hash_alg); + if(!ctx) + return /* failure */ 0; + + if(PK11_DigestBegin(ctx) != SECSuccess) { + PK11_DestroyContext(ctx, PR_TRUE); + return /* failure */ 0; + } + + *pctx = ctx; + return /* success */ 1; +} + +static void nss_hash_final(void **pctx, unsigned char *out, unsigned int len) +{ + PK11Context *ctx = *pctx; + unsigned int outlen; + PK11_DigestFinal(ctx, out, &outlen, len); + PK11_DestroyContext(ctx, PR_TRUE); +} + +static int MD5_Init(MD5_CTX *pctx) +{ + return nss_hash_init(pctx, SEC_OID_MD5); +} + +static void MD5_Update(MD5_CTX *pctx, + const unsigned char *input, + unsigned int input_len) +{ + PK11_DigestOp(*pctx, input, input_len); +} + +static void MD5_Final(unsigned char digest[16], MD5_CTX *pctx) +{ + nss_hash_final(pctx, digest, 16); +} + +static int SHA1_Init(SHA_CTX *pctx) +{ + return nss_hash_init(pctx, SEC_OID_SHA1); +} + +static void SHA1_Update(SHA_CTX *pctx, + const unsigned char *input, + unsigned int input_len) +{ + PK11_DigestOp(*pctx, input, input_len); +} + +static void SHA1_Final(unsigned char digest[20], SHA_CTX *pctx) +{ + nss_hash_final(pctx, digest, 20); +} + +static int SHA256_Init(SHA256_CTX *pctx) +{ + return nss_hash_init(pctx, SEC_OID_SHA256); +} + +static void SHA256_Update(SHA256_CTX *pctx, + const unsigned char *input, + unsigned int input_len) +{ + PK11_DigestOp(*pctx, input, input_len); +} + +static void SHA256_Final(unsigned char digest[32], SHA256_CTX *pctx) +{ + nss_hash_final(pctx, digest, 32); +} + +#elif defined(_WIN32) && !defined(USE_SSLEAY) static void win32_crypto_final(struct win32_crypto_hash *ctx, unsigned char *digest, @@ -235,12 +339,13 @@ static void win32_crypto_final(struct win32_crypto_hash *ctx, CryptReleaseContext(ctx->hCryptProv, 0); } -static void MD5_Init(MD5_CTX *ctx) +static int MD5_Init(MD5_CTX *ctx) { if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash); } + return 1; } static void MD5_Update(MD5_CTX *ctx, @@ -255,12 +360,13 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) win32_crypto_final(ctx, digest, 16); } -static void SHA1_Init(SHA_CTX *ctx) +static int SHA1_Init(SHA_CTX *ctx) { if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { CryptCreateHash(ctx->hCryptProv, CALG_SHA1, 0, 0, &ctx->hHash); } + return 1; } static void SHA1_Update(SHA_CTX *ctx, @@ -275,12 +381,13 @@ static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx) win32_crypto_final(ctx, digest, 20); } -static void SHA256_Init(SHA256_CTX *ctx) +static int SHA256_Init(SHA256_CTX *ctx) { if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) { CryptCreateHash(ctx->hCryptProv, CALG_SHA_256, 0, 0, &ctx->hHash); } + return 1; } static void SHA256_Update(SHA256_CTX *ctx, @@ -374,7 +481,10 @@ digest_context *Curl_digest_init(const digest_params *dparams) ctxt->digest_hash = dparams; - dparams->digest_init(ctxt->digest_hashctx); + if(dparams->digest_init(ctxt->digest_hashctx) != 1) { + free(ctxt); + return NULL; + } return ctxt; } @@ -425,6 +535,8 @@ static unsigned char hex_to_uint(const char *s) * Checksum didn't match. * -1: * Could not open file; or could not read data from file. + * -2: + * Hash algorithm not available. */ static int check_hash(const char *filename, const metalink_digest_def *digest_def, @@ -446,7 +558,15 @@ static int check_hash(const char *filename, digest_def->hash_name, strerror(errno)); return -1; } + dctx = Curl_digest_init(digest_def->dparams); + if(!dctx) { + fprintf(error, "Metalink: validating (%s) [%s] FAILED (%s)\n", filename, + digest_def->hash_name, "failed to initialize hash algorithm"); + close(fd); + return -2; + } + result = malloc(digest_def->dparams->digest_resultlen); while(1) { unsigned char buf[4096]; @@ -773,4 +893,14 @@ void clean_metalink(struct Configurable *config) config->metalinkfile_last = 0; } +void metalink_cleanup(void) +{ +#if defined(USE_NSS) && defined(HAVE_NSS_INITCONTEXT) + if(nss_context) { + NSS_ShutdownContext(nss_context); + nss_context = NULL; + } +#endif +} + #endif /* USE_METALINK */ diff --git a/src/tool_metalink.h b/src/tool_metalink.h index 49a6e64b..0a69c459 100644 --- a/src/tool_metalink.h +++ b/src/tool_metalink.h @@ -23,7 +23,9 @@ ***************************************************************************/ #include "tool_setup.h" -typedef void (* Curl_digest_init_func)(void *context); +/* returns 1 for success, 0 otherwise (we use OpenSSL *_Init fncs directly) */ +typedef int (* Curl_digest_init_func)(void *context); + typedef void (* Curl_digest_update_func)(void *context, const unsigned char *data, unsigned int len); @@ -137,13 +139,18 @@ int check_metalink_content_type(const char *content_type); * -1: * Could not open file; or could not read data from file. * -2: - * No checksum in Metalink supported; or Metalink does not contain - * checksum. + * No checksum in Metalink supported, hash algorithm not available, or + * Metalink does not contain checksum. */ int metalink_check_hash(struct Configurable *config, metalinkfile *mlfile, const char *filename); +/* + * Release resources allocated at global scope. + */ +void metalink_cleanup(void); + #else /* USE_METALINK */ #define count_next_metalink_resource(x) 0 diff --git a/src/tool_operate.c b/src/tool_operate.c index f864918c..826b4a5d 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -1051,7 +1051,7 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[]) if(curlinfo->features & CURL_VERSION_SSL) { if(config->insecure_ok) { my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); - my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1L); + my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); } else { my_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L); diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index e45f102f..9078b956 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -32,6 +32,11 @@ #include "tool_operhlp.h" #include "tool_version.h" +#ifdef USE_METALINK +/* import the declaration of metalink_cleanup() */ +# include "tool_metalink.h" +#endif + #include "memdebug.h" /* keep this as LAST include */ /* @@ -215,6 +220,9 @@ void main_free(void) { curl_global_cleanup(); convert_cleanup(); +#ifdef USE_METALINK + metalink_cleanup(); +#endif } #ifdef CURLDEBUG diff --git a/src/tool_version.h b/src/tool_version.h index b3b732ea..32e82fb2 100644 --- a/src/tool_version.h +++ b/src/tool_version.h @@ -25,7 +25,7 @@ #define CURL_NAME "curl" #define CURL_COPYRIGHT LIBCURL_COPYRIGHT -#define CURL_VERSION "7.28.0" +#define CURL_VERSION "7.28.1" #define CURL_VERSION_MAJOR LIBCURL_VERSION_MAJOR #define CURL_VERSION_MINOR LIBCURL_VERSION_MINOR #define CURL_VERSION_PATCH LIBCURL_VERSION_PATCH diff --git a/tests/Makefile.am b/tests/Makefile.am index c655ba23..42f89dce 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,7 +28,7 @@ EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \ sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \ CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \ serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \ - certs/srp-verifier-conf certs/srp-verifier-db + certs/srp-verifier-conf certs/srp-verifier-db mem-include-scan.pl # we have two variables here to make sure DIST_SUBDIRS won't get 'unit' # added twice as then targets such as 'distclean' misbehave and try to diff --git a/tests/Makefile.in b/tests/Makefile.in index fb8623f5..eeddacc9 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -303,7 +303,7 @@ EXTRA_DIST = ftpserver.pl httpserver.pl secureserver.pl runtests.pl getpart.pm \ sshserver.pl sshhelp.pm testcurl.1 runtests.1 $(HTMLPAGES) $(PDFPAGES) \ CMakeLists.txt certs/scripts/*.sh certs/Server* certs/EdelCurlRoot* \ serverhelp.pm tftpserver.pl rtspserver.pl directories.pm symbol-scan.pl \ - certs/srp-verifier-conf certs/srp-verifier-db + certs/srp-verifier-conf certs/srp-verifier-db mem-include-scan.pl @BUILD_UNITTESTS_FALSE@BUILD_UNIT = @@ -339,9 +339,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/Makefile + $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/tests/README b/tests/README index b1955c8a..fff618ef 100644 --- a/tests/README +++ b/tests/README @@ -207,7 +207,9 @@ The cURL Test Suite 800 - 899 POP3, IMAP, SMTP 1000 - 1299 miscellaneous* 1300 - 1399 unit tests* - 1400 - 1999 miscellaneous* + 1400 - 1499 miscellaneous* + 1500 - 1599 libcurl source code tests, not using the curl command tool + (same as 5xx) 2000 - x multiple sequential protocols per test case* Since 30-apr-2003, there's nothing in the system that requires us to keep diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index d188d190..0528a256 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -75,7 +75,7 @@ test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \ test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \ -test1126 test1127 test1128 test1129 test1130 test1131 \ +test1126 test1127 test1128 test1129 test1130 test1131 test1132 \ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ test1208 test1209 test1210 test1211 \ test1220 \ @@ -92,8 +92,8 @@ test1371 test1372 test1373 test1374 test1375 test1376 test1377 test1378 \ test1379 test1380 test1381 test1382 test1383 test1384 test1385 test1386 \ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ -test1408 test1409 test1410 test1411 \ -test1500 \ +test1408 test1409 test1410 test1411 test1412 test1413 \ +test1500 test1501 test1502 \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ test2016 test2017 test2018 test2019 test2020 test2021 test2022 \ diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in index 04a697dd..b91bb732 100644 --- a/tests/data/Makefile.in +++ b/tests/data/Makefile.in @@ -340,7 +340,7 @@ test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \ test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \ test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \ test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \ -test1126 test1127 test1128 test1129 test1130 test1131 \ +test1126 test1127 test1128 test1129 test1130 test1131 test1132 \ test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \ test1208 test1209 test1210 test1211 \ test1220 \ @@ -357,8 +357,8 @@ test1371 test1372 test1373 test1374 test1375 test1376 test1377 test1378 \ test1379 test1380 test1381 test1382 test1383 test1384 test1385 test1386 \ test1387 test1388 test1389 test1390 test1391 test1392 test1393 \ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ -test1408 test1409 test1410 test1411 \ -test1500 \ +test1408 test1409 test1410 test1411 test1412 test1413 \ +test1500 test1501 test1502 \ test2000 test2001 test2002 test2003 test2004 test2005 test2006 test2007 \ test2008 test2009 test2010 test2011 test2012 test2013 test2014 test2015 \ test2016 test2017 test2018 test2019 test2020 test2021 test2022 \ @@ -380,9 +380,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/data/Makefile'; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/data/Makefile'; \ cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign tests/data/Makefile + $(AUTOMAKE) --gnu tests/data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ diff --git a/tests/data/test1011 b/tests/data/test1011 index 59829c99..566867dd 100644 --- a/tests/data/test1011 +++ b/tests/data/test1011 @@ -17,11 +17,11 @@ Content-Length: 0 </data> <data2> -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </data2> <datacheck> @@ -30,11 +30,11 @@ Location: moo.html&testcase=/10110002 Date: Thu, 09 Nov 2010 14:49:00 GMT
Content-Length: 0
-HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </datacheck> </reply> diff --git a/tests/data/test1012 b/tests/data/test1012 index 6aa17156..4edc1731 100644 --- a/tests/data/test1012 +++ b/tests/data/test1012 @@ -17,11 +17,11 @@ Connection: close </data> <data2> -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </data2> <datacheck> @@ -30,11 +30,11 @@ Location: moo.html&testcase=/10120002 Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </datacheck> </reply> diff --git a/tests/data/test1105 b/tests/data/test1105 index 1b2bf564..922346ff 100644 --- a/tests/data/test1105 +++ b/tests/data/test1105 @@ -34,6 +34,9 @@ HTTP with cookie parser and header recording <command> "http://%HOSTIP:%HTTPPORT/we/want/1105?parm1=this*that/other/thing&parm2=foobar/1105" -c log/cookie1105.txt -d "userid=myname&password=mypassword" </command> +<precheck> +perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}' +</precheck> </client> # Verify data after the test has been "shot" diff --git a/tests/data/test1132 b/tests/data/test1132 new file mode 100644 index 00000000..366ffc77 --- /dev/null +++ b/tests/data/test1132 @@ -0,0 +1,24 @@ +<testcase> +<info> +<keywords> +memory-includes +</keywords> +</info> + +# +# Client-side +<client> +<server> +none +</server> + + <name> +Verify memory #include files in libcurl's C source files + </name> + +<command type="perl"> +%SRCDIR/mem-include-scan.pl %SRCDIR/../lib +</command> +</client> + +</testcase> diff --git a/tests/data/test13 b/tests/data/test13 index 8f997f0a..18f7f811 100644 --- a/tests/data/test13 +++ b/tests/data/test13 @@ -8,10 +8,10 @@ HTTP custom request # Server-side <reply> <data> -HTTP/1.1 200 Read you +HTTP/1.1 200 Read you
Content-Length: 29
-Deleted: suppose we got a header like this! ;-) - +Deleted: suppose we got a header like this! ;-)
+
blabla custom request result </data> </reply> diff --git a/tests/data/test1318 b/tests/data/test1318 index 709e08dc..dc182dcc 100644 --- a/tests/data/test1318 +++ b/tests/data/test1318 @@ -3,6 +3,7 @@ <keywords> HTTP HTTP GET +--resolve </keywords> </info> @@ -32,7 +33,7 @@ Content-Length: 0 http </server> <name> -HTTP with same host name using different cases +HTTP with --resolve and same host name using different cases </name> <command> --resolve MiXeDcAsE.cOm:%HTTPPORT:%HOSTIP http://MiXeDcAsE.cOm:%HTTPPORT/1318 http://mixedcase.com:%HTTPPORT/13180001 diff --git a/tests/data/test1325 b/tests/data/test1325 index 7bb62ea6..2b98d6ad 100644 --- a/tests/data/test1325 +++ b/tests/data/test1325 @@ -19,11 +19,11 @@ Connection: close </data> <data2> -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </data2> <datacheck> @@ -32,11 +32,11 @@ Location: 13250002 Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </datacheck> </reply> diff --git a/tests/data/test1412 b/tests/data/test1412 new file mode 100644 index 00000000..e88919d0 --- /dev/null +++ b/tests/data/test1412 @@ -0,0 +1,117 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +HTTP Digest auth +--anyauth +</keywords> +</info> + +# Server-side +<reply> +<servercmd> +auth_required +</servercmd> +<data> +HTTP/1.1 401 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
+Content-Type: text/html; charset=iso-8859-1
+Connection: close
+
+This is not the real page +</data> + +# This is supposed to be returned when the server gets a +# Authorization: Digest line passed-in from the client +<data1000> +HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+Connection: close
+
+This IS the real page! +</data1000> + +# This is the second request +<data1001> +HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+Connection: close
+
+This IS the second real page! +</data1001> + +<datacheck> +HTTP/1.1 401 Authorization Required swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Basic realm="gimme all yer s3cr3ts"
+WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344"
+Content-Type: text/html; charset=iso-8859-1
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Server: Apache/1.3.27 (Darwin) PHP/4.1.2
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 23
+Connection: close
+
+This IS the real page! +</datacheck> + +</reply> + +# Client-side +<client> +<server> +http +</server> +<features> +crypto +</features> + <name> +HTTP GET with --anyauth with two URLs (picking Digest) + </name> + <command> +http://%HOSTIP:%HTTPPORT/1412 -u testuser:testpass --anyauth http://%HOSTIP:%HTTPPORT/14120001 +</command> +<file name="log/put1412"> +This is data we upload with PUT +a second line +line three +four is the number of lines +</file> +</client> + +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /1412 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /1412 HTTP/1.1
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/1412", response="0390dbe89e31adca0413d11f91f30e7f"
+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
+Accept: */*
+
+GET /14120001 HTTP/1.1
+Authorization: Digest username="testuser", realm="gimme all yer s3cr3ts", nonce="11223344", uri="/14120001", response="0085df91870374c8bf4e94415e7fbf8e"
+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
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test1413 b/tests/data/test1413 new file mode 100644 index 00000000..6e889a8a --- /dev/null +++ b/tests/data/test1413 @@ -0,0 +1,73 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +followlocation +</keywords> +</info> +# +# Server-side +<reply> +<data> +HTTP/1.1 302 OK swsclose
+Location: moo.html/14130002#fragmentpart
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+</data> +<data2> +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body +</data2> +<datacheck> +HTTP/1.1 302 OK swsclose
+Location: moo.html/14130002#fragmentpart
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
+body +</datacheck> +</reply> + +# +# Client-side +<client> +<server> +http +</server> + <name> +HTTP redirect with fragment in new URL + </name> + <command> +http://%HOSTIP:%HTTPPORT/this/1413 -L +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /this/1413 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+GET /this/moo.html/14130002 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test147 b/tests/data/test147 index aaa4ca15..6651df03 100644 --- a/tests/data/test147 +++ b/tests/data/test147 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <data> diff --git a/tests/data/test148 b/tests/data/test148 index de0fa7ab..fbac10f9 100644 --- a/tests/data/test148 +++ b/tests/data/test148 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test149 b/tests/data/test149 index f7973f49..a5d14998 100644 --- a/tests/data/test149 +++ b/tests/data/test149 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> </reply> diff --git a/tests/data/test1501 b/tests/data/test1501 new file mode 100644 index 00000000..8c7e13af --- /dev/null +++ b/tests/data/test1501 @@ -0,0 +1,53 @@ +<testcase> +<info> +<keywords> +FTP +RETR +multi +LIST +</keywords> +</info> + +# Server-side +<reply> +<data> +</data> +<servercmd> +DELAY LIST 2 +DELAY TYPE 2 +</servercmd> +</reply> + +# Client-side +<client> +<server> +ftp +</server> +<tool> +lib1501 +</tool> + <name> +FTP with multi interface and slow LIST response + </name> + <command> +ftp://%HOSTIP:%FTPPORT/1501/ +</command> +</client> +# Verify data after the test has been "shot" +<verify> +<errorcode> +0 +</errorcode> +<protocol> +USER anonymous
+PASS ftp@example.com
+PWD
+CWD 1501
+EPSV
+TYPE A
+LIST
+QUIT
+</protocol> + +</verify> +</testcase> diff --git a/tests/data/test1502 b/tests/data/test1502 new file mode 100644 index 00000000..3e3b3655 --- /dev/null +++ b/tests/data/test1502 @@ -0,0 +1,58 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP GET +multi +CURLOPT_RESOLVE +</keywords> +</info> + +<reply> +<data> +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- +</data> +</reply> + +# +# Client-side +<client> +<server> +http +</server> +<tool> +lib1502 +</tool> + <name> +HTTP multi with CURLOPT_RESOLVE + </name> + <command> +http://google.com:%HTTPPORT/1502 %HTTPPORT %HOSTIP +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strip> +^User-Agent:.* +</strip> +<protocol> +GET /1502 HTTP/1.1
+Host: google.com:%HTTPPORT
+Accept: */*
+
+</protocol> +</verify> +</testcase> diff --git a/tests/data/test155 b/tests/data/test155 index 891aa35f..70ac7fd2 100644 --- a/tests/data/test155 +++ b/tests/data/test155 @@ -1,4 +1,11 @@ <testcase> +<info> +<keywords> +HTTP +HTTP PUT +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test158 b/tests/data/test158 index 417238d6..5cbc97ab 100644 --- a/tests/data/test158 +++ b/tests/data/test158 @@ -1,4 +1,11 @@ <testcase> +<info> +<keywords> +HTTP +HTTP POST +</keywords> +</info> + # Server-side <reply> <data> diff --git a/tests/data/test174 b/tests/data/test174 index fc5ccc18..9767f2f5 100644 --- a/tests/data/test174 +++ b/tests/data/test174 @@ -1,4 +1,11 @@ <testcase> +<info> +<keywords> +HTTP +HTTP POST +</keywords> +</info> + # Server-side <reply> <data> @@ -6,7 +13,7 @@ HTTP/1.1 200 beng swsclose Server: Microsoft-IIS/6.0
Authentication-Info: Passport1.4 tname=MSPAuth,tname=MSPProf,tname=MSPConsent,tname=MSPSecAuth
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 26 +Content-Length: 26
This is not the real page </data> diff --git a/tests/data/test175 b/tests/data/test175 index 2ee78d50..9e005f1f 100644 --- a/tests/data/test175 +++ b/tests/data/test175 @@ -22,7 +22,7 @@ This is not the real page HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16 +Content-Length: 16
content for you </data1> @@ -36,7 +36,7 @@ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16 +Content-Length: 16
content for you </datacheck> diff --git a/tests/data/test176 b/tests/data/test176 index d3b220b8..413c1492 100644 --- a/tests/data/test176 +++ b/tests/data/test176 @@ -1,4 +1,11 @@ <testcase> +<info> +<keywords> +HTTP +HTTP POST +</keywords> +</info> + # Server-side <reply> # the first request has NTLM type-1 included, and then the 1001 is returned @@ -15,7 +22,7 @@ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16 +Content-Length: 16
content for you </data> @@ -29,7 +36,7 @@ Content-Type: text/html; charset=iso-8859-1 HTTP/1.1 200 moo swsclose
Server: Microsoft-IIS/6.0
Content-Type: text/html; charset=iso-8859-1
-Content-Length: 16 +Content-Length: 16
content for you </datacheck> diff --git a/tests/data/test18 b/tests/data/test18 index ff65817d..43e3ab39 100644 --- a/tests/data/test18 +++ b/tests/data/test18 @@ -9,24 +9,24 @@ HTTP GET # Server-side <reply> <data nocheck="yes"> -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
- +
moo </data> <data2> -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
- +
foo </data2> <data3> -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
- +
hoo </data3> </reply> @@ -68,22 +68,22 @@ Accept: */* </protocol> <stdout> --_curl_--%HOSTIP:%HTTPPORT/18 -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
- +
moo --_curl_--%HOSTIP:%HTTPPORT/180002 -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
- +
foo --_curl_--%HOSTIP:%HTTPPORT/180003 -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 4
- +
hoo </stdout> </verify> diff --git a/tests/data/test182 b/tests/data/test182 index 272cdee2..f640a0e1 100644 --- a/tests/data/test182 +++ b/tests/data/test182 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <data sendzero="yes"> diff --git a/tests/data/test190 b/tests/data/test190 index 4789cfa7..6f5d66ad 100644 --- a/tests/data/test190 +++ b/tests/data/test190 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test191 b/tests/data/test191 index 2c56cc82..86fa29f9 100644 --- a/tests/data/test191 +++ b/tests/data/test191 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <data> diff --git a/tests/data/test194 b/tests/data/test194 index 582f197f..1010ee90 100644 --- a/tests/data/test194 +++ b/tests/data/test194 @@ -13,7 +13,7 @@ Resume <data> HTTP/1.1 416 Requested Range Not Satisfiable swsclose
Date: Fri, 24 Oct 2003 21:33:12 GMT
-Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1
+Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1
Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT
ETag: "ab57a-507-3f9968f3"
Accept-Ranges: bytes
diff --git a/tests/data/test195 b/tests/data/test195 index 788c89a0..3059e8d9 100644 --- a/tests/data/test195 +++ b/tests/data/test195 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test196 b/tests/data/test196 index b070f38a..ee9d3398 100644 --- a/tests/data/test196 +++ b/tests/data/test196 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test197 b/tests/data/test197 index 062f469f..c299a22a 100644 --- a/tests/data/test197 +++ b/tests/data/test197 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> # # Server-side <reply> diff --git a/tests/data/test198 b/tests/data/test198 index bb451b54..dca26b9a 100644 --- a/tests/data/test198 +++ b/tests/data/test198 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> # # Server-side <reply> diff --git a/tests/data/test199 b/tests/data/test199 index c9651bca..e8df66e8 100644 --- a/tests/data/test199 +++ b/tests/data/test199 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> # # Server-side <reply name="1"> diff --git a/tests/data/test2027 b/tests/data/test2027 index cd2ead5a..c84e24b0 100644 --- a/tests/data/test2027 +++ b/tests/data/test2027 @@ -9,6 +9,17 @@ HTTP Digest auth # Server-side <reply> +<!-- + + Explanation for the duplicate 400 requests: + + libcurl doesn't detect that a given Digest password is wrong already on the + first 401 response (as the data400 gives). libcurl will instead consider the + new response just as a duplicate and it sends another and detects the auth + problem on the second 401 response! + +--> + <!-- First request has Digest auth, wrong password --> <data100> HTTP/1.1 401 Need Digest auth
@@ -93,16 +104,6 @@ This is a bad password page! </data1400> <!-- Fifth request has Digest auth, right password --> -<data500> -HTTP/1.1 401 Need Digest auth (5)
-Server: Microsoft-IIS/5.0
-Content-Type: text/html; charset=iso-8859-1
-Content-Length: 27
-WWW-Authenticate: Digest realm="testrealm", nonce="8"
-
-This is not the real page! -</data500> - <data1500> HTTP/1.1 200 Things are fine in server land (2)
Server: Microsoft-IIS/5.0
@@ -151,6 +152,12 @@ Content-Type: text/html; charset=iso-8859-1 Content-Length: 29
WWW-Authenticate: Digest realm="testrealm", nonce="7"
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
This is a bad password page! HTTP/1.1 200 Things are fine in server land (2)
Server: Microsoft-IIS/5.0
@@ -222,6 +229,11 @@ Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/2 Host: %HOSTIP:%HTTPPORT
Accept: */*
+GET /20270400 HTTP/1.1
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20270400", response="f5906785511fb60a2af8b1cd53008ead"
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
GET /20270500 HTTP/1.1
Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20270500", response="8ef4d935fd964a46c3965c0863b52cf1"
Host: %HOSTIP:%HTTPPORT
diff --git a/tests/data/test2030 b/tests/data/test2030 index 18659e8d..53d3f912 100644 --- a/tests/data/test2030 +++ b/tests/data/test2030 @@ -13,6 +13,18 @@ HTTP NTLM auth <!-- Alternate the order that Digest and NTLM headers appear in responses to ensure that the order doesn't matter. --> +<!-- + + Explanation for the duplicate 400 requests: + + libcurl doesn't detect that a given Digest password is wrong already on the + first 401 response (as the data400 gives). libcurl will instead consider the + new response just as a duplicate and it sends another and detects the auth + problem on the second 401 response! + +--> + + <!-- First request has NTLM auth, wrong password --> <data100> HTTP/1.1 401 Need Digest or NTLM auth
@@ -186,6 +198,13 @@ Content-Length: 29 WWW-Authenticate: NTLM
WWW-Authenticate: Digest realm="testrealm", nonce="7"
+HTTP/1.1 401 Sorry wrong password (3)
+Server: Microsoft-IIS/5.0
+Content-Type: text/html; charset=iso-8859-1
+Content-Length: 29
+WWW-Authenticate: NTLM
+WWW-Authenticate: Digest realm="testrealm", nonce="7"
+
This is a bad password page! HTTP/1.1 200 Things are fine in server land (2)
Server: Microsoft-IIS/5.0
@@ -259,6 +278,11 @@ Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/2 Host: %HOSTIP:%HTTPPORT
Accept: */*
+GET /20300400 HTTP/1.1
+Authorization: Digest username="testuser", realm="testrealm", nonce="5", uri="/20300400", response="d6262e9147db08c62ff2f53b515861e8"
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+
GET /20300500 HTTP/1.1
Authorization: Digest username="testuser", realm="testrealm", nonce="7", uri="/20300500", response="198757e61163a779cf24ed4c49c1ad7d"
Host: %HOSTIP:%HTTPPORT
diff --git a/tests/data/test207 b/tests/data/test207 index c2eff632..85f9af6a 100644 --- a/tests/data/test207 +++ b/tests/data/test207 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> # # Server-side <reply> diff --git a/tests/data/test210 b/tests/data/test210 index 83c9b3e7..e9045675 100644 --- a/tests/data/test210 +++ b/tests/data/test210 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <data> diff --git a/tests/data/test211 b/tests/data/test211 index 0214effc..96d0573f 100644 --- a/tests/data/test211 +++ b/tests/data/test211 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <data> diff --git a/tests/data/test212 b/tests/data/test212 index 8a10abfb..8daed553 100644 --- a/tests/data/test212 +++ b/tests/data/test212 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <data> diff --git a/tests/data/test214 b/tests/data/test214 index e12dfbfe..a9b8fcd0 100644 --- a/tests/data/test214 +++ b/tests/data/test214 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> # # Server-side <reply> diff --git a/tests/data/test215 b/tests/data/test215 index 50058178..8770efbc 100644 --- a/tests/data/test215 +++ b/tests/data/test215 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> # When doing LIST, we get the default list output hard-coded in the test diff --git a/tests/data/test216 b/tests/data/test216 index a8264ce5..0c4de0a6 100644 --- a/tests/data/test216 +++ b/tests/data/test216 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> </reply> diff --git a/tests/data/test218 b/tests/data/test218 index dc146fc0..c201e77a 100644 --- a/tests/data/test218 +++ b/tests/data/test218 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP PUT +</keywords> +</info> # # Server-side <reply> diff --git a/tests/data/test22 b/tests/data/test22 index 734379e8..2e8bdec6 100644 --- a/tests/data/test22 +++ b/tests/data/test22 @@ -9,10 +9,10 @@ long URL # Server-side <reply> <data> -HTTP/1.1 200 OK -Funny-head: yesyes +HTTP/1.1 200 OK
+Funny-head: yesyes
Content-Length: 27
- +
This is the proof it works </data> </reply> diff --git a/tests/data/test235 b/tests/data/test235 index ee843f14..62502322 100644 --- a/tests/data/test235 +++ b/tests/data/test235 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> </reply> diff --git a/tests/data/test236 b/tests/data/test236 index 20d04703..9ba706f1 100644 --- a/tests/data/test236 +++ b/tests/data/test236 @@ -1,4 +1,9 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> # Server-side <reply> diff --git a/tests/data/test237 b/tests/data/test237 index 9675a1e4..9a40f1f6 100644 --- a/tests/data/test237 +++ b/tests/data/test237 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test238 b/tests/data/test238 index 6397e3b2..56f21ebf 100644 --- a/tests/data/test238 +++ b/tests/data/test238 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> <servercmd> diff --git a/tests/data/test247 b/tests/data/test247 index 66c674e9..2720144e 100644 --- a/tests/data/test247 +++ b/tests/data/test247 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + <reply> <mdtm> 213 20030409102659 diff --git a/tests/data/test248 b/tests/data/test248 index 814b1d71..d254a951 100644 --- a/tests/data/test248 +++ b/tests/data/test248 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + <reply> <mdtm> 213 20050409102659 diff --git a/tests/data/test249 b/tests/data/test249 index 69df5bec..4f99c2af 100644 --- a/tests/data/test249 +++ b/tests/data/test249 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +HTTP +HTTP GET +</keywords> +</info> # # Server-side <reply> diff --git a/tests/data/test250 b/tests/data/test250 index 2c99c46e..aeed1347 100644 --- a/tests/data/test250 +++ b/tests/data/test250 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # # Server-side <reply> diff --git a/tests/data/test251 b/tests/data/test251 index 73ee09ee..d50e1b3e 100644 --- a/tests/data/test251 +++ b/tests/data/test251 @@ -1,4 +1,10 @@ <testcase> +<info> +<keywords> +FTP +</keywords> +</info> + # Server-side <reply> # When doing LIST, we get the default list output hard-coded in the test diff --git a/tests/data/test273 b/tests/data/test273 index bb237252..dc52a105 100644 --- a/tests/data/test273 +++ b/tests/data/test273 @@ -12,7 +12,7 @@ HTTP Digest auth HTTP/1.1 401 Authorization Required swsclose
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
Content-Type: text/html; charset=iso-8859-1
This is not the real page @@ -33,7 +33,7 @@ This IS the real page! HTTP/1.1 401 Authorization Required swsclose
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604145" +WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 OK swsclose
diff --git a/tests/data/test31 b/tests/data/test31 index fa871d0e..b1171d81 100644 --- a/tests/data/test31 +++ b/tests/data/test31 @@ -21,24 +21,24 @@ Set-Cookie:ismatch=this ; domain=127.0.0.1; path=/silly/ Set-Cookie: sec1value=secure1 ; domain=127.0.0.1; path=/secure1/ ; secure
Set-Cookie: sec2value=secure2 ; domain=127.0.0.1; path=/secure2/ ; secure=
Set-Cookie: sec3value=secure3 ; domain=127.0.0.1; path=/secure3/ ; secure=
-Set-Cookie: sec4value=secure4 ; secure=; domain=127.0.0.1; path=/secure4/ ; -Set-Cookie: sec5value=secure5 ; secure; domain=127.0.0.1; path=/secure5/ ; -Set-Cookie: sec6value=secure6 ; secure ; domain=127.0.0.1; path=/secure6/ ; -Set-Cookie: sec7value=secure7 ; secure ; domain=127.0.0.1; path=/secure7/ ; -Set-Cookie: sec8value=secure8 ; secure= ; domain=127.0.0.1; path=/secure8/ ; -Set-Cookie: secure=very1 ; secure=; domain=127.0.0.1; path=/secure9/; -Set-Cookie: httpo1=value1 ; domain=127.0.0.1; path=/p1/; httponly -Set-Cookie: httpo2=value2 ; domain=127.0.0.1; path=/p2/; httponly= -Set-Cookie: httpo3=value3 ; httponly; domain=127.0.0.1; path=/p3/; -Set-Cookie: httpo4=value4 ; httponly=; domain=127.0.0.1; path=/p4/; -Set-Cookie: httponly=myvalue1 ; domain=127.0.0.1; path=/p4/; httponly -Set-Cookie: httpandsec=myvalue2 ; domain=127.0.0.1; path=/p4/; httponly; secure -Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure -Set-Cookie: httpandsec3=myvalue4 ; domain=127.0.0.1; path=/p4/; httponly; secure= -Set-Cookie: httpandsec4=myvalue5 ; domain=127.0.0.1; path=/p4/; httponly=; secure= -Set-Cookie: httpandsec5=myvalue6 ; domain=127.0.0.1; path=/p4/; secure; httponly= -Set-Cookie: httpandsec6=myvalue7 ; domain=127.0.0.1; path=/p4/; secure=; httponly= -Set-Cookie: httpandsec7=myvalue8 ; domain=127.0.0.1; path=/p4/; secure; httponly +Set-Cookie: sec4value=secure4 ; secure=; domain=127.0.0.1; path=/secure4/ ;
+Set-Cookie: sec5value=secure5 ; secure; domain=127.0.0.1; path=/secure5/ ;
+Set-Cookie: sec6value=secure6 ; secure ; domain=127.0.0.1; path=/secure6/ ;
+Set-Cookie: sec7value=secure7 ; secure ; domain=127.0.0.1; path=/secure7/ ;
+Set-Cookie: sec8value=secure8 ; secure= ; domain=127.0.0.1; path=/secure8/ ;
+Set-Cookie: secure=very1 ; secure=; domain=127.0.0.1; path=/secure9/;
+Set-Cookie: httpo1=value1 ; domain=127.0.0.1; path=/p1/; httponly
+Set-Cookie: httpo2=value2 ; domain=127.0.0.1; path=/p2/; httponly=
+Set-Cookie: httpo3=value3 ; httponly; domain=127.0.0.1; path=/p3/;
+Set-Cookie: httpo4=value4 ; httponly=; domain=127.0.0.1; path=/p4/;
+Set-Cookie: httponly=myvalue1 ; domain=127.0.0.1; path=/p4/; httponly
+Set-Cookie: httpandsec=myvalue2 ; domain=127.0.0.1; path=/p4/; httponly; secure
+Set-Cookie: httpandsec2=myvalue3; domain=127.0.0.1; path=/p4/; httponly=; secure
+Set-Cookie: httpandsec3=myvalue4 ; domain=127.0.0.1; path=/p4/; httponly; secure=
+Set-Cookie: httpandsec4=myvalue5 ; domain=127.0.0.1; path=/p4/; httponly=; secure=
+Set-Cookie: httpandsec5=myvalue6 ; domain=127.0.0.1; path=/p4/; secure; httponly=
+Set-Cookie: httpandsec6=myvalue7 ; domain=127.0.0.1; path=/p4/; secure=; httponly=
+Set-Cookie: httpandsec7=myvalue8 ; domain=127.0.0.1; path=/p4/; secure; httponly
Set-Cookie: httpandsec8=myvalue9; domain=127.0.0.1; path=/p4/; secure=; httponly
Set-Cookie: partmatch=present; domain=127.0.0.1 ; path=/;
Set-Cookie:eat=this; domain=moo.foo.moo;
@@ -49,7 +49,7 @@ Set-Cookie: novalue; domain=reallysilly Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030
Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030
Set-Cookie: magic=yessir; path=/silly/; HttpOnly
-Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; +Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad;
boo </data> @@ -72,6 +72,9 @@ TZ=GMT <command> http://%HOSTIP:%HTTPPORT/we/want/31 -b none -c log/jar31.txt </command> +<precheck> +perl -e 'if ("%HOSTIP" !~ /127\.0\.0\.1$/) {print "Test only works for HOSTIP 127.0.0.1"; exit(1)}' +</precheck> </client> # Verify data after the test has been "shot" diff --git a/tests/data/test39 b/tests/data/test39 index 2c8da336..a2e1441d 100644 --- a/tests/data/test39 +++ b/tests/data/test39 @@ -8,11 +8,11 @@ HTTP FORMPOST # Server-side <reply> <data> -HTTP/1.1 200 OK -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake +HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
Content-Length: 10
- +
blablabla </data> </reply> diff --git a/tests/data/test40 b/tests/data/test40 index b56ff758..6be0d161 100644 --- a/tests/data/test40 +++ b/tests/data/test40 @@ -17,11 +17,11 @@ Connection: close </data> <data2> -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </data2> <datacheck> @@ -30,11 +30,11 @@ Location: ../moo.html/?name=d a niel&testcase=/400002 Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </datacheck> </reply> diff --git a/tests/data/test42 b/tests/data/test42 index ec674260..e303f3a2 100644 --- a/tests/data/test42 +++ b/tests/data/test42 @@ -17,11 +17,11 @@ Connection: close </data> <data2> -HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </data2> <datacheck> @@ -30,11 +30,11 @@ Location: ../m o o.html/420002 Date: Thu, 09 Nov 2010 14:49:00 GMT
Connection: close
-HTTP/1.1 200 OK swsclose -Location: this should be ignored -Date: Thu, 09 Nov 2010 14:49:00 GMT -Connection: close - +HTTP/1.1 200 OK swsclose
+Location: this should be ignored
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Connection: close
+
body </datacheck> </reply> diff --git a/tests/data/test46 b/tests/data/test46 index 2f375fd1..f73acdee 100644 --- a/tests/data/test46 +++ b/tests/data/test46 @@ -11,18 +11,18 @@ cookiejar # Server-side <reply> <data> -HTTP/1.1 200 OK -Server: Microsoft-IIS/4.0 -Date: Tue, 25 Sep 2001 19:37:44 GMT -Content-Type: text/html -Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/ -Set-Cookie: ckySession=temporary; path=/ -Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/ -Set-Cookie: justaname=; path=/; -Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz -Cache-control: private +HTTP/1.1 200 OK
+Server: Microsoft-IIS/4.0
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Set-Cookie: ckyPersistent=permanent; expires=Fri, 02-Feb-2035 11:56:27 GMT; path=/
+Set-Cookie: ckySession=temporary; path=/
+Set-Cookie: ASPSESSIONIDQGGQQSJJ=GKNBDIFAAOFDPDAIEAKDIBKE; path=/
+Set-Cookie: justaname=; path=/;
+Set-Cookie: simplyhuge=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
+Cache-control: private
Content-Length: 41
- +
This server reply is for testing cookies </data> </reply> diff --git a/tests/data/test5 b/tests/data/test5 index 7a0ebd73..b62f1a12 100644 --- a/tests/data/test5 +++ b/tests/data/test5 @@ -29,7 +29,7 @@ http HTTP over proxy </name> <command> -http://%HOSTIP:%HTTPPORT/we/want/that/page/5 -x %HOSTIP:%HTTPPORT +http://%HOSTIP:%HTTPPORT/we/want/that/page/5#5 -x %HOSTIP:%HTTPPORT </command> </client> diff --git a/tests/data/test517 b/tests/data/test517 index 48d8122e..7b703b46 100644 --- a/tests/data/test517 +++ b/tests/data/test517 @@ -112,10 +112,10 @@ nothing 83: Wed, 31 Dec 2008 23:59:60 GMT => 1230768000 </stdout> -# This test case previously testes an overflow case ("2094 Nov 6 => +# This test case previously tested an overflow case ("2094 Nov 6 => # 2147483647") for 32bit time_t, but since some systems have 64bit time_t and # handles this (returning 3939840000), and some 64bit-time_t systems don't -# handle this and returns -1 for this, it turned very tricky to write a fine +# handle this and return -1 for this, it turned very tricky to write a fine # test case and thus it is now removed until we have a way to write test cases # for this kind of things. diff --git a/tests/data/test53 b/tests/data/test53 index 0ced2d23..679a4fa8 100644 --- a/tests/data/test53 +++ b/tests/data/test53 @@ -9,13 +9,13 @@ cookies # Server-side <reply> <data> -HTTP/1.1 200 OK -Server: Microsoft-IIS/4.0 -Date: Tue, 25 Sep 2001 19:37:44 GMT -Content-Type: text/html -Connection: close +HTTP/1.1 200 OK
+Server: Microsoft-IIS/4.0
+Date: Tue, 25 Sep 2001 19:37:44 GMT
+Content-Type: text/html
+Connection: close
Content-Length: 21
- +
This server says moo </data> </reply> diff --git a/tests/data/test591 b/tests/data/test591 index e04ae5bc..42a22711 100644 --- a/tests/data/test591 +++ b/tests/data/test591 @@ -63,8 +63,9 @@ TYPE I STOR 591
QUIT
</protocol> +# CURLE_UPLOAD_FAILED = 25 <errorcode> -10 +25 </errorcode> <upload> </upload> diff --git a/tests/data/test592 b/tests/data/test592 index 487290dd..23aa6c46 100644 --- a/tests/data/test592 +++ b/tests/data/test592 @@ -52,6 +52,7 @@ Moooooooooooo for 592 s/^PORT (.*)/PORT/ s/^EPRT \|1\|(.*)/EPRT \|1\|/ </strippart> +# a 421 response must prevent further commands from being sent <protocol> USER anonymous
PASS ftp@example.com
@@ -61,10 +62,10 @@ EPRT |1| PORT TYPE I
STOR 592
-QUIT
</protocol> +# 28 == CURLE_OPERATION_TIMEDOUT <errorcode> -10 +28 </errorcode> <upload> </upload> diff --git a/tests/data/test8 b/tests/data/test8 index 4a6e0045..c36408ac 100644 --- a/tests/data/test8 +++ b/tests/data/test8 @@ -35,8 +35,8 @@ Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Content-Type: text/html Funny-head: yesyes -Set-Cookie: foobar=name; domain=127.0.0.1; path=/; -Set-Cookie: mismatch=this; domain=127.0.0.1; path="/silly/"; +Set-Cookie: foobar=name; domain=%HOSTIP; path=/; +Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/"; Set-Cookie: partmatch=present; domain=.0.0.1; path=/w; Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; Set-Cookie: cookie=yes; path=/we; @@ -45,6 +45,9 @@ Set-Cookie: nocookie=yes; path=/WE; Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; </file> +<precheck> +perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}' +</precheck> </client> # Verify data after the test has been "shot" diff --git a/tests/data/test92 b/tests/data/test92 index 726aa791..bf782765 100644 --- a/tests/data/test92 +++ b/tests/data/test92 @@ -13,7 +13,7 @@ Resume <data> HTTP/1.1 416 Requested Range Not Satisfiable
Date: Fri, 24 Oct 2003 21:33:12 GMT
-Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1
+Server: Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 PHP/4.3.1
Last-Modified: Fri, 24 Oct 2003 18:01:23 GMT
ETag: "ab57a-507-3f9968f3"
Accept-Ranges: bytes
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index 7b8d8fc0..bc9f532a 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -35,19 +35,19 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/ares is for in-tree c-ares's external include files if USE_EMBEDDED_ARES -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - -I$(top_builddir)/ares \ - -I$(top_srcdir)/ares +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/ares \ + -I$(top_srcdir)/ares else -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib endif EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \ diff --git a/tests/libtest/Makefile.in b/tests/libtest/Makefile.in index 606d5585..b6cc7daf 100644 --- a/tests/libtest/Makefile.in +++ b/tests/libtest/Makefile.in @@ -65,7 +65,7 @@ noinst_PROGRAMS = chkhostname$(EXEEXT) lib500$(EXEEXT) lib501$(EXEEXT) \ lib586$(EXEEXT) lib587$(EXEEXT) lib590$(EXEEXT) \ lib591$(EXEEXT) lib597$(EXEEXT) lib598$(EXEEXT) \ lib599$(EXEEXT) libauthretry$(EXEEXT) libntlmconnect$(EXEEXT) \ - lib1500$(EXEEXT) + lib1500$(EXEEXT) lib1501$(EXEEXT) lib1502$(EXEEXT) subdir = tests/libtest ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \ @@ -101,9 +101,19 @@ am_lib1500_OBJECTS = lib1500.$(OBJEXT) $(am__objects_1) \ lib1500_OBJECTS = $(am_lib1500_OBJECTS) lib1500_LDADD = $(LDADD) lib1500_DEPENDENCIES = $(top_builddir)/lib/libcurl.la -am__objects_3 = testtrace.$(OBJEXT) +am__objects_3 = warnless.$(OBJEXT) +am_lib1501_OBJECTS = lib1501.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) +lib1501_OBJECTS = $(am_lib1501_OBJECTS) +lib1501_LDADD = $(LDADD) +lib1501_DEPENDENCIES = $(top_builddir)/lib/libcurl.la +am_lib1502_OBJECTS = lib1502.$(OBJEXT) $(am__objects_1) +lib1502_OBJECTS = $(am_lib1502_OBJECTS) +lib1502_LDADD = $(LDADD) +lib1502_DEPENDENCIES = $(top_builddir)/lib/libcurl.la +am__objects_4 = testtrace.$(OBJEXT) am_lib500_OBJECTS = lib500.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) + $(am__objects_4) lib500_OBJECTS = $(am_lib500_OBJECTS) lib500_LDADD = $(LDADD) lib500_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -111,19 +121,18 @@ am_lib501_OBJECTS = lib501.$(OBJEXT) $(am__objects_1) lib501_OBJECTS = $(am_lib501_OBJECTS) lib501_LDADD = $(LDADD) lib501_DEPENDENCIES = $(top_builddir)/lib/libcurl.la -am__objects_4 = warnless.$(OBJEXT) am_lib502_OBJECTS = lib502.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib502_OBJECTS = $(am_lib502_OBJECTS) lib502_LDADD = $(LDADD) lib502_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib503_OBJECTS = lib503.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib503_OBJECTS = $(am_lib503_OBJECTS) lib503_LDADD = $(LDADD) lib503_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib504_OBJECTS = lib504.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib504_OBJECTS = $(am_lib504_OBJECTS) lib504_LDADD = $(LDADD) lib504_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -136,7 +145,7 @@ lib506_OBJECTS = $(am_lib506_OBJECTS) lib506_LDADD = $(LDADD) lib506_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib507_OBJECTS = lib507.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib507_OBJECTS = $(am_lib507_OBJECTS) lib507_LDADD = $(LDADD) lib507_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -176,7 +185,7 @@ am_lib517_OBJECTS = lib517.$(OBJEXT) $(am__objects_1) lib517_OBJECTS = $(am_lib517_OBJECTS) lib517_LDADD = $(LDADD) lib517_DEPENDENCIES = $(top_builddir)/lib/libcurl.la -am_lib518_OBJECTS = lib518.$(OBJEXT) $(am__objects_1) $(am__objects_4) +am_lib518_OBJECTS = lib518.$(OBJEXT) $(am__objects_1) $(am__objects_3) lib518_OBJECTS = $(am_lib518_OBJECTS) lib518_LDADD = $(LDADD) lib518_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -201,7 +210,7 @@ lib524_OBJECTS = $(am_lib524_OBJECTS) lib524_LDADD = $(LDADD) lib524_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib525_OBJECTS = lib525.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib525_OBJECTS = $(am_lib525_OBJECTS) lib525_LDADD = $(LDADD) lib525_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -246,16 +255,16 @@ lib532_OBJECTS = $(am_lib532_OBJECTS) lib532_LDADD = $(LDADD) lib532_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib533_OBJECTS = lib533.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib533_OBJECTS = $(am_lib533_OBJECTS) lib533_LDADD = $(LDADD) lib533_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib536_OBJECTS = lib536.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib536_OBJECTS = $(am_lib536_OBJECTS) lib536_LDADD = $(LDADD) lib536_DEPENDENCIES = $(top_builddir)/lib/libcurl.la -am_lib537_OBJECTS = lib537.$(OBJEXT) $(am__objects_1) $(am__objects_4) +am_lib537_OBJECTS = lib537.$(OBJEXT) $(am__objects_1) $(am__objects_3) lib537_OBJECTS = $(am_lib537_OBJECTS) lib537_LDADD = $(LDADD) lib537_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -264,7 +273,7 @@ lib539_OBJECTS = $(am_lib539_OBJECTS) lib539_LDADD = $(LDADD) lib539_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib540_OBJECTS = lib540.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib540_OBJECTS = $(am_lib540_OBJECTS) lib540_LDADD = $(LDADD) lib540_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -302,7 +311,7 @@ am_lib549_OBJECTS = lib549.$(OBJEXT) $(am__objects_1) lib549_OBJECTS = $(am_lib549_OBJECTS) lib549_LDADD = $(LDADD) lib549_DEPENDENCIES = $(top_builddir)/lib/libcurl.la -am_lib552_OBJECTS = lib552.$(OBJEXT) $(am__objects_1) $(am__objects_4) +am_lib552_OBJECTS = lib552.$(OBJEXT) $(am__objects_1) $(am__objects_3) lib552_OBJECTS = $(am_lib552_OBJECTS) lib552_LDADD = $(LDADD) lib552_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -315,7 +324,7 @@ lib554_OBJECTS = $(am_lib554_OBJECTS) lib554_LDADD = $(LDADD) lib554_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib555_OBJECTS = lib555.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib555_OBJECTS = $(am_lib555_OBJECTS) lib555_LDADD = $(LDADD) lib555_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -328,7 +337,7 @@ lib557_OBJECTS = $(am_lib557_OBJECTS) lib557_LDADD = $(LDADD) lib557_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib560_OBJECTS = lib560.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib560_OBJECTS = $(am_lib560_OBJECTS) lib560_LDADD = $(LDADD) lib560_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -337,7 +346,7 @@ lib562_OBJECTS = $(am_lib562_OBJECTS) lib562_LDADD = $(LDADD) lib562_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib564_OBJECTS = lib564.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib564_OBJECTS = $(am_lib564_OBJECTS) lib564_LDADD = $(LDADD) lib564_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -366,7 +375,7 @@ am_lib570_OBJECTS = lib570.$(OBJEXT) $(am__objects_1) lib570_OBJECTS = $(am_lib570_OBJECTS) lib570_LDADD = $(LDADD) lib570_DEPENDENCIES = $(top_builddir)/lib/libcurl.la -am_lib571_OBJECTS = lib571.$(OBJEXT) $(am__objects_1) $(am__objects_4) +am_lib571_OBJECTS = lib571.$(OBJEXT) $(am__objects_1) $(am__objects_3) lib571_OBJECTS = $(am_lib571_OBJECTS) lib571_LDADD = $(LDADD) lib571_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -375,7 +384,7 @@ lib572_OBJECTS = $(am_lib572_OBJECTS) lib572_LDADD = $(LDADD) lib572_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib573_OBJECTS = lib573.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) $(am__objects_3) + $(am__objects_3) $(am__objects_4) lib573_OBJECTS = $(am_lib573_OBJECTS) lib573_LDADD = $(LDADD) lib573_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -384,7 +393,7 @@ lib574_OBJECTS = $(am_lib574_OBJECTS) lib574_LDADD = $(LDADD) lib574_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib575_OBJECTS = lib575.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib575_OBJECTS = $(am_lib575_OBJECTS) lib575_LDADD = $(LDADD) lib575_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -401,7 +410,7 @@ lib579_OBJECTS = $(am_lib579_OBJECTS) lib579_LDADD = $(LDADD) lib579_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib582_OBJECTS = lib582.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib582_OBJECTS = $(am_lib582_OBJECTS) lib582_LDADD = $(LDADD) lib582_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -431,12 +440,12 @@ lib590_OBJECTS = $(am_lib590_OBJECTS) lib590_LDADD = $(LDADD) lib590_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib591_OBJECTS = lib591.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib591_OBJECTS = $(am_lib591_OBJECTS) lib591_LDADD = $(LDADD) lib591_DEPENDENCIES = $(top_builddir)/lib/libcurl.la am_lib597_OBJECTS = lib597.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_4) + $(am__objects_3) lib597_OBJECTS = $(am_lib597_OBJECTS) lib597_LDADD = $(LDADD) lib597_DEPENDENCIES = $(top_builddir)/lib/libcurl.la @@ -469,61 +478,61 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \ - $(lib1500_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES) \ - $(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \ - $(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \ - $(lib508_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \ - $(lib512_SOURCES) $(lib513_SOURCES) $(lib514_SOURCES) \ - $(lib515_SOURCES) $(lib516_SOURCES) $(lib517_SOURCES) \ - $(lib518_SOURCES) $(lib519_SOURCES) $(lib520_SOURCES) \ - $(lib521_SOURCES) $(lib523_SOURCES) $(lib524_SOURCES) \ - $(lib525_SOURCES) $(lib526_SOURCES) $(lib527_SOURCES) \ - $(lib529_SOURCES) $(lib530_SOURCES) $(lib532_SOURCES) \ - $(lib533_SOURCES) $(lib536_SOURCES) $(lib537_SOURCES) \ - $(lib539_SOURCES) $(lib540_SOURCES) $(lib541_SOURCES) \ - $(lib542_SOURCES) $(lib543_SOURCES) $(lib544_SOURCES) \ - $(lib545_SOURCES) $(lib547_SOURCES) $(lib548_SOURCES) \ - $(lib549_SOURCES) $(lib552_SOURCES) $(lib553_SOURCES) \ - $(lib554_SOURCES) $(lib555_SOURCES) $(lib556_SOURCES) \ - $(lib557_SOURCES) $(lib560_SOURCES) $(lib562_SOURCES) \ - $(lib564_SOURCES) $(lib565_SOURCES) $(lib566_SOURCES) \ - $(lib567_SOURCES) $(lib568_SOURCES) $(lib569_SOURCES) \ - $(lib570_SOURCES) $(lib571_SOURCES) $(lib572_SOURCES) \ - $(lib573_SOURCES) $(lib574_SOURCES) $(lib575_SOURCES) \ - $(lib576_SOURCES) $(lib578_SOURCES) $(lib579_SOURCES) \ - $(lib582_SOURCES) $(lib583_SOURCES) $(lib585_SOURCES) \ - $(lib586_SOURCES) $(lib587_SOURCES) $(lib590_SOURCES) \ - $(lib591_SOURCES) $(lib597_SOURCES) $(lib598_SOURCES) \ - $(lib599_SOURCES) $(libauthretry_SOURCES) \ - $(libntlmconnect_SOURCES) + $(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \ + $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \ + $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \ + $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \ + $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \ + $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \ + $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \ + $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \ + $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \ + $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \ + $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \ + $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \ + $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \ + $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \ + $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \ + $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \ + $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \ + $(lib560_SOURCES) $(lib562_SOURCES) $(lib564_SOURCES) \ + $(lib565_SOURCES) $(lib566_SOURCES) $(lib567_SOURCES) \ + $(lib568_SOURCES) $(lib569_SOURCES) $(lib570_SOURCES) \ + $(lib571_SOURCES) $(lib572_SOURCES) $(lib573_SOURCES) \ + $(lib574_SOURCES) $(lib575_SOURCES) $(lib576_SOURCES) \ + $(lib578_SOURCES) $(lib579_SOURCES) $(lib582_SOURCES) \ + $(lib583_SOURCES) $(lib585_SOURCES) $(lib586_SOURCES) \ + $(lib587_SOURCES) $(lib590_SOURCES) $(lib591_SOURCES) \ + $(lib597_SOURCES) $(lib598_SOURCES) $(lib599_SOURCES) \ + $(libauthretry_SOURCES) $(libntlmconnect_SOURCES) DIST_SOURCES = $(libhostname_la_SOURCES) $(chkhostname_SOURCES) \ - $(lib1500_SOURCES) $(lib500_SOURCES) $(lib501_SOURCES) \ - $(lib502_SOURCES) $(lib503_SOURCES) $(lib504_SOURCES) \ - $(lib505_SOURCES) $(lib506_SOURCES) $(lib507_SOURCES) \ - $(lib508_SOURCES) $(lib510_SOURCES) $(lib511_SOURCES) \ - $(lib512_SOURCES) $(lib513_SOURCES) $(lib514_SOURCES) \ - $(lib515_SOURCES) $(lib516_SOURCES) $(lib517_SOURCES) \ - $(lib518_SOURCES) $(lib519_SOURCES) $(lib520_SOURCES) \ - $(lib521_SOURCES) $(lib523_SOURCES) $(lib524_SOURCES) \ - $(lib525_SOURCES) $(lib526_SOURCES) $(lib527_SOURCES) \ - $(lib529_SOURCES) $(lib530_SOURCES) $(lib532_SOURCES) \ - $(lib533_SOURCES) $(lib536_SOURCES) $(lib537_SOURCES) \ - $(lib539_SOURCES) $(lib540_SOURCES) $(lib541_SOURCES) \ - $(lib542_SOURCES) $(lib543_SOURCES) $(lib544_SOURCES) \ - $(lib545_SOURCES) $(lib547_SOURCES) $(lib548_SOURCES) \ - $(lib549_SOURCES) $(lib552_SOURCES) $(lib553_SOURCES) \ - $(lib554_SOURCES) $(lib555_SOURCES) $(lib556_SOURCES) \ - $(lib557_SOURCES) $(lib560_SOURCES) $(lib562_SOURCES) \ - $(lib564_SOURCES) $(lib565_SOURCES) $(lib566_SOURCES) \ - $(lib567_SOURCES) $(lib568_SOURCES) $(lib569_SOURCES) \ - $(lib570_SOURCES) $(lib571_SOURCES) $(lib572_SOURCES) \ - $(lib573_SOURCES) $(lib574_SOURCES) $(lib575_SOURCES) \ - $(lib576_SOURCES) $(lib578_SOURCES) $(lib579_SOURCES) \ - $(lib582_SOURCES) $(lib583_SOURCES) $(lib585_SOURCES) \ - $(lib586_SOURCES) $(lib587_SOURCES) $(lib590_SOURCES) \ - $(lib591_SOURCES) $(lib597_SOURCES) $(lib598_SOURCES) \ - $(lib599_SOURCES) $(libauthretry_SOURCES) \ - $(libntlmconnect_SOURCES) + $(lib1500_SOURCES) $(lib1501_SOURCES) $(lib1502_SOURCES) \ + $(lib500_SOURCES) $(lib501_SOURCES) $(lib502_SOURCES) \ + $(lib503_SOURCES) $(lib504_SOURCES) $(lib505_SOURCES) \ + $(lib506_SOURCES) $(lib507_SOURCES) $(lib508_SOURCES) \ + $(lib510_SOURCES) $(lib511_SOURCES) $(lib512_SOURCES) \ + $(lib513_SOURCES) $(lib514_SOURCES) $(lib515_SOURCES) \ + $(lib516_SOURCES) $(lib517_SOURCES) $(lib518_SOURCES) \ + $(lib519_SOURCES) $(lib520_SOURCES) $(lib521_SOURCES) \ + $(lib523_SOURCES) $(lib524_SOURCES) $(lib525_SOURCES) \ + $(lib526_SOURCES) $(lib527_SOURCES) $(lib529_SOURCES) \ + $(lib530_SOURCES) $(lib532_SOURCES) $(lib533_SOURCES) \ + $(lib536_SOURCES) $(lib537_SOURCES) $(lib539_SOURCES) \ + $(lib540_SOURCES) $(lib541_SOURCES) $(lib542_SOURCES) \ + $(lib543_SOURCES) $(lib544_SOURCES) $(lib545_SOURCES) \ + $(lib547_SOURCES) $(lib548_SOURCES) $(lib549_SOURCES) \ + $(lib552_SOURCES) $(lib553_SOURCES) $(lib554_SOURCES) \ + $(lib555_SOURCES) $(lib556_SOURCES) $(lib557_SOURCES) \ + $(lib560_SOURCES) $(lib562_SOURCES) $(lib564_SOURCES) \ + $(lib565_SOURCES) $(lib566_SOURCES) $(lib567_SOURCES) \ + $(lib568_SOURCES) $(lib569_SOURCES) $(lib570_SOURCES) \ + $(lib571_SOURCES) $(lib572_SOURCES) $(lib573_SOURCES) \ + $(lib574_SOURCES) $(lib575_SOURCES) $(lib576_SOURCES) \ + $(lib578_SOURCES) $(lib579_SOURCES) $(lib582_SOURCES) \ + $(lib583_SOURCES) $(lib585_SOURCES) $(lib586_SOURCES) \ + $(lib587_SOURCES) $(lib590_SOURCES) $(lib591_SOURCES) \ + $(lib597_SOURCES) $(lib598_SOURCES) $(lib599_SOURCES) \ + $(libauthretry_SOURCES) $(libntlmconnect_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -757,11 +766,14 @@ target_alias = @target_alias@ # ########################################################################### AUTOMAKE_OPTIONS = foreign nostdinc -@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib + +# Mostly for Windows build targets, when using static libcurl +@USE_CPPFLAG_CURL_STATICLIB_TRUE@AM_CPPFLAGS = -DCURL_STATICLIB +@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib # Specify our include paths here, and do it relative to $(top_srcdir) and @@ -776,13 +788,13 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file # $(top_srcdir)/ares is for in-tree c-ares's external include files -@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares +@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \ test1022.pl Makefile.inc notexists.pl @@ -792,9 +804,6 @@ test1022.pl Makefile.inc notexists.pl LDADD = $(top_builddir)/lib/libcurl.la @CURL_LIBS@ DEPENDENCIES = $(top_builddir)/lib/libcurl.la -# Mostly for Windows build targets, when using static libcurl -@USE_CPPFLAG_CURL_STATICLIB_TRUE@AM_CPPFLAGS = -DCURL_STATICLIB - # files used only in some libcurl test programs TESTUTIL = testutil.c testutil.h @@ -896,6 +905,8 @@ lib597_SOURCES = lib597.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) lib598_SOURCES = lib598.c $(SUPPORTFILES) lib599_SOURCES = lib599.c $(SUPPORTFILES) lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL) +lib1501_SOURCES = lib1501.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) +lib1502_SOURCES = lib1502.c $(SUPPORTFILES) libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES) libntlmconnect_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) @BUILD_LIBHOSTNAME_FALSE@noinst_LTLIBRARIES = @@ -974,6 +985,12 @@ chkhostname$(EXEEXT): $(chkhostname_OBJECTS) $(chkhostname_DEPENDENCIES) lib1500$(EXEEXT): $(lib1500_OBJECTS) $(lib1500_DEPENDENCIES) @rm -f lib1500$(EXEEXT) $(LINK) $(lib1500_LDFLAGS) $(lib1500_OBJECTS) $(lib1500_LDADD) $(LIBS) +lib1501$(EXEEXT): $(lib1501_OBJECTS) $(lib1501_DEPENDENCIES) + @rm -f lib1501$(EXEEXT) + $(LINK) $(lib1501_LDFLAGS) $(lib1501_OBJECTS) $(lib1501_LDADD) $(LIBS) +lib1502$(EXEEXT): $(lib1502_OBJECTS) $(lib1502_DEPENDENCIES) + @rm -f lib1502$(EXEEXT) + $(LINK) $(lib1502_LDFLAGS) $(lib1502_OBJECTS) $(lib1502_LDADD) $(LIBS) lib500$(EXEEXT): $(lib500_OBJECTS) $(lib500_DEPENDENCIES) @rm -f lib500$(EXEEXT) $(LINK) $(lib500_LDFLAGS) $(lib500_OBJECTS) $(lib500_LDADD) $(LIBS) @@ -1216,6 +1233,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkhostname-curl_gethostname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/first.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1500.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1501.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib1502.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib500.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib501.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lib502.Po@am__quote@ diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc index fa0c69cb..b568e190 100644 --- a/tests/libtest/Makefile.inc +++ b/tests/libtest/Makefile.inc @@ -20,7 +20,7 @@ noinst_PROGRAMS = chkhostname \ lib556 lib539 lib557 lib560 lib562 lib564 lib565 lib566 lib567 lib568 \ lib569 lib570 lib571 lib572 lib573 lib582 lib583 lib585 lib586 lib587 \ lib590 lib591 lib597 lib598 lib599 libauthretry libntlmconnect \ - lib1500 + lib1500 lib1501 lib1502 chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c chkhostname_LDADD = @CURL_NETWORK_LIBS@ @@ -189,6 +189,10 @@ lib599_SOURCES = lib599.c $(SUPPORTFILES) lib1500_SOURCES = lib1500.c $(SUPPORTFILES) $(TESTUTIL) +lib1501_SOURCES = lib1501.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS) + +lib1502_SOURCES = lib1502.c $(SUPPORTFILES) + libauthretry_SOURCES = libauthretry.c $(SUPPORTFILES) libntlmconnect_SOURCES = libntlmconnect.c $(SUPPORTFILES) $(TESTUTIL) diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c new file mode 100644 index 00000000..01a382e8 --- /dev/null +++ b/tests/libtest/lib1501.c @@ -0,0 +1,126 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, 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 "test.h" + +#include <fcntl.h> + +#include "testutil.h" +#include "warnless.h" +#include "memdebug.h" + +#define TEST_HANG_TIMEOUT 30 * 1000 + +/* 500 milliseconds allowed. An extreme number but lets be really conservative + to allow old and slow machines to run this test too */ +#define MAX_BLOCKED_TIME_US 500000 + +/* return the number of microseconds between two time stamps */ +static int elapsed(struct timeval *before, + struct timeval *after) +{ + ssize_t result; + + result = (after->tv_sec - before->tv_sec) * 1000000 + + after->tv_usec - before->tv_usec; + if (result < 0) + result = 0; + + return curlx_sztosi(result); +} + + +int test(char *URL) +{ + CURL *handle = NULL; + CURLM *mhandle = NULL; + int res = 0; + int still_running = 0; + + start_test_timing(); + + global_init(CURL_GLOBAL_ALL); + + easy_init(handle); + + easy_setopt(handle, CURLOPT_URL, URL); + easy_setopt(handle, CURLOPT_VERBOSE, 1L); + + multi_init(mhandle); + + multi_add_handle(mhandle, handle); + + multi_perform(mhandle, &still_running); + + abort_on_test_timeout(); + + while(still_running) { + struct timeval timeout; + fd_set fdread; + fd_set fdwrite; + fd_set fdexcep; + int maxfd = -99; + struct timeval before; + struct timeval after; + int e; + + timeout.tv_sec = 0; + timeout.tv_usec = 100000L; /* 100 ms */ + + FD_ZERO(&fdread); + FD_ZERO(&fdwrite); + FD_ZERO(&fdexcep); + + multi_fdset(mhandle, &fdread, &fdwrite, &fdexcep, &maxfd); + + /* At this point, maxfd is guaranteed to be greater or equal than -1. */ + + select_test(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + + abort_on_test_timeout(); + + fprintf(stderr, "ping\n"); + before = tutil_tvnow(); + + multi_perform(mhandle, &still_running); + + abort_on_test_timeout(); + + after = tutil_tvnow(); + e = elapsed(&before, &after); + fprintf(stderr, "pong = %d\n", e); + + if(e > MAX_BLOCKED_TIME_US) { + res = 100; + break; + } + } + +test_cleanup: + + /* undocumented cleanup sequence - type UA */ + + curl_multi_cleanup(mhandle); + curl_easy_cleanup(handle); + curl_global_cleanup(); + + return res; +} diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c new file mode 100644 index 00000000..ec105882 --- /dev/null +++ b/tests/libtest/lib1502.c @@ -0,0 +1,138 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2012, 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. + * + ***************************************************************************/ +/* + * Test case converted from bug report #3575448, identifying a memory leak in + * the CURLOPT_RESOLVE handling with the multi interface. + */ + +#include "test.h" + +#include <stdio.h> +#include <string.h> + +/* somewhat unix-specific */ +#include <sys/time.h> +#include <unistd.h> + +int test(char *URL) +{ + CURL *ehandle; + CURLM *multi_handle; + char redirect[160]; + CURLcode result = CURLE_NOT_BUILT_IN; + int still_running; /* keep number of running handles */ + + CURLMsg *msg; /* for picking up messages with the transfer status */ + int msgs_left; /* how many messages are left */ + + /* DNS cache injection */ + struct curl_slist *dns_cache_list; + + sprintf(redirect, "google.com:%s:%s", libtest_arg2, libtest_arg3); + + fprintf(stderr, "Redirect: %s\n", redirect); + + dns_cache_list = curl_slist_append(NULL, redirect); + + /* Allocate one CURL handle per transfer */ + ehandle = curl_easy_init(); + + /* set the options (I left out a few, you'll get the point anyway) */ + curl_easy_setopt(ehandle, CURLOPT_URL, URL); + curl_easy_setopt(ehandle, CURLOPT_HEADER, 1L); + + curl_easy_setopt(ehandle, CURLOPT_RESOLVE, dns_cache_list); + + /* init a multi stack */ + multi_handle = curl_multi_init(); + + /* add the individual transfers */ + curl_multi_add_handle(multi_handle, ehandle); + + /* we start some action by calling perform right away */ + curl_multi_perform(multi_handle, &still_running); + + do { + struct timeval timeout; + int rc; /* select() return code */ + + fd_set fdread; + fd_set fdwrite; + fd_set fdexcep; + int maxfd = -1; + + long curl_timeo = -1; + + FD_ZERO(&fdread); + FD_ZERO(&fdwrite); + FD_ZERO(&fdexcep); + + /* set a suitable timeout to play around with */ + timeout.tv_sec = 1; + 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 */ + curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); + + /* In a real-world program you OF COURSE check the return code of the + function calls. On success, the value of maxfd is guaranteed to be + greater or equal than -1. We call select(maxfd + 1, ...), specially in + case of (maxfd == -1), we call select(0, ...), which is basically equal + to sleep. */ + + rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); + + switch(rc) { + case -1: + /* select error */ + break; + case 0: /* timeout */ + default: /* action */ + curl_multi_perform(multi_handle, &still_running); + break; + } + } while(still_running); + + /* See how the transfers went */ + while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) { + if (msg->msg == CURLMSG_DONE) + result = msg->data.result; + } + + curl_multi_cleanup(multi_handle); + + /* Free the CURL handles */ + curl_easy_cleanup(ehandle); + + curl_slist_free_all(dns_cache_list); + + return (int)result; +} diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index 641b9b6d..952efb4e 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -133,7 +133,7 @@ static int curlTimerCallback(CURLM *multi, long timeout_ms, void *userp) (void)multi; /* unused */ if (timeout_ms != -1) { - gettimeofday(timeout, 0); + *timeout = tutil_tvnow(); timeout->tv_usec += timeout_ms * 1000; } else { @@ -173,8 +173,7 @@ static int getMicroSecondTimeout(struct timeval* timeout) { struct timeval now; ssize_t result; - - gettimeofday(&now, 0); + now = tutil_tvnow(); result = (timeout->tv_sec - now.tv_sec) * 1000000 + timeout->tv_usec - now.tv_usec; if (result < 0) diff --git a/tests/libtest/libauthretry.c b/tests/libtest/libauthretry.c index 900e85fa..0b0816ea 100644 --- a/tests/libtest/libauthretry.c +++ b/tests/libtest/libauthretry.c @@ -25,10 +25,11 @@ */ #include "test.h" - +#include "strequal.h" #include "memdebug.h" -static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, const char *userpwd) +static int send_request(CURL *curl, const char *url, int seq, + long auth_scheme, const char *userpwd) { CURLcode res; char* full_url = malloc(strlen(url) + 4 + 1); @@ -39,7 +40,8 @@ static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, } sprintf(full_url, "%s%04d", url, seq); - fprintf(stderr, "Sending new request %d to %s with credential %s (auth %ld)\n", seq, full_url, userpwd, auth_scheme); + fprintf(stderr, "Sending new request %d to %s with credential %s " + "(auth %ld)\n", seq, full_url, userpwd, auth_scheme); test_setopt(curl, CURLOPT_URL, full_url); test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_HEADER, 1L); @@ -50,16 +52,18 @@ static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, res = curl_easy_perform(curl); test_cleanup: - free(full_url); + free(full_url); return res; } -static int send_wrong_password(CURL *curl, const char *url, int seq, long auth_scheme) +static int send_wrong_password(CURL *curl, const char *url, int seq, + long auth_scheme) { return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass"); } -static int send_right_password(CURL *curl, const char *url, int seq, long auth_scheme) +static int send_right_password(CURL *curl, const char *url, int seq, + long auth_scheme) { return send_request(curl, url, seq, auth_scheme, "testuser:testpass"); } @@ -68,11 +72,11 @@ static long parse_auth_name(const char *arg) { if (!arg) return CURLAUTH_NONE; - if (strcasecmp(arg, "basic") == 0) + if (strequal(arg, "basic")) return CURLAUTH_BASIC; - if (strcasecmp(arg, "digest") == 0) + if (strequal(arg, "digest")) return CURLAUTH_DIGEST; - if (strcasecmp(arg, "ntlm") == 0) + if (strequal(arg, "ntlm")) return CURLAUTH_NTLM; return CURLAUTH_NONE; } @@ -87,7 +91,7 @@ int test(char *url) long fallback_auth_scheme = parse_auth_name(libtest_arg3); if (main_auth_scheme == CURLAUTH_NONE || - fallback_auth_scheme == CURLAUTH_NONE) { + fallback_auth_scheme == CURLAUTH_NONE) { fprintf(stderr, "auth schemes not found on commandline\n"); res = TEST_ERR_MAJOR_BAD; goto test_cleanup; diff --git a/tests/libtest/libntlmconnect.c b/tests/libtest/libntlmconnect.c index b31a928a..fd64e5f8 100644 --- a/tests/libtest/libntlmconnect.c +++ b/tests/libtest/libntlmconnect.c @@ -207,7 +207,7 @@ int test(char *url) } if (state == NeedSocketForNewHandle) { - if (found_new_socket) { + if(maxfd != -1 && !found_new_socket) { fprintf(stderr, "Warning: socket did not open immediately for new " "handle (trying again)\n"); continue; @@ -234,7 +234,7 @@ int test(char *url) /* if there's no timeout and we get here on the last handle, we may already have read the last part of the stream so waiting makes no sense */ - if(num_handles == MAX_EASY_HANDLES) { + if(!running && num_handles == MAX_EASY_HANDLES) { break; } } diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c index 64602e06..c977d210 100644 --- a/tests/libtest/testtrace.c +++ b/tests/libtest/testtrace.c @@ -22,6 +22,9 @@ #include "test.h" +#define _MPRINTF_REPLACE /* use our functions only */ +#include <curl/mprintf.h> + #include "testutil.h" #include "testtrace.h" #include "memdebug.h" diff --git a/tests/mem-include-scan.pl b/tests/mem-include-scan.pl new file mode 100644 index 00000000..676df25e --- /dev/null +++ b/tests/mem-include-scan.pl @@ -0,0 +1,96 @@ +#!/usr/bin/env perl +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 2010-2012, 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. +# +########################################################################### +# +# This script scans C source files. If they seem to use memory functions, +# it also makes sure that it #includes the correct two header files! +# +# You can also mark a C source as fine by using 'mem-include-scan' anywhere in +# it. +# + +use strict; +use warnings; + +my $dir = $ARGV[0] || die "specify directory!"; + +sub scanfile { + my ($file) = @_; + my $memfunc; + my $memdebug; + my $curlmem; + + print STDERR "checking $file...\n"; + + open(F, "<$file"); + while(<F>) { + if($_ =~ /(free|alloc|strdup)\(/) { + $memfunc++; + } + elsif($_ =~ /^ *# *include \"memdebug.h\"/) { + $memdebug++; + } + elsif($_ =~ /^ *# *include \"curl_memory.h\"/) { + $curlmem++; + } + elsif($_ =~ /mem-include-scan/) { + # free pass + close(F); + return 0; + } + if($memfunc && $memdebug && $curlmem) { + last; + } + } + close(F); + + + if($memfunc) { + if($memdebug && $curlmem) { + return 0; + } + else { + if(!$memdebug) { + print STDERR "$file doesn't include \"memdebug.h\"!\n"; + } + if(!$curlmem) { + print STDERR "$file doesn't include \"curl_memory.h\"!\n"; + } + return 1; + } + } + return 0; +} + +opendir(my $dh, $dir) || die "can't opendir $dir: $!"; +my @cfiles = grep { /\.c\z/ && -f "$dir/$_" } readdir($dh); +closedir $dh; + +my $errs; +for(@cfiles) { + $errs += scanfile("$dir/$_"); +} + +if($errs) { + print STDERR "----\n$errs errors detected!\n"; + exit 2; +} diff --git a/tests/runtests.pl b/tests/runtests.pl index 6f8a5175..e263788a 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -2865,7 +2865,10 @@ sub singletest { $teststat[$testnum]=$why; # store reason for this test case if(!$short) { - logmsg sprintf("test %03d SKIPPED: $why\n", $testnum); + if($skipped{$why} <= 3) { + # show only the first three skips for each reason + logmsg sprintf("test %03d SKIPPED: $why\n", $testnum); + } } timestampskippedevents($testnum); @@ -4738,14 +4741,20 @@ if($skipped && !$short) { # now show all test case numbers that had this reason for being # skipped my $c=0; + my $max = 9; for(0 .. scalar @teststat) { my $t = $_; if($teststat[$_] && ($teststat[$_] eq $r)) { - logmsg ", " if($c); - logmsg $_; + if($c < $max) { + logmsg ", " if($c); + logmsg $_; + } $c++; } } + if($c > $max) { + logmsg " and ".($c-$max)." more"; + } logmsg ")\n"; } } diff --git a/tests/server/Makefile.am b/tests/server/Makefile.am index 9d58e085..7e6db1ff 100644 --- a/tests/server/Makefile.am +++ b/tests/server/Makefile.am @@ -35,19 +35,19 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/ares is for in-tree c-ares's external include files if USE_EMBEDDED_ARES -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - -I$(top_builddir)/ares \ - -I$(top_srcdir)/ares +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/ares \ + -I$(top_srcdir)/ares else -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib endif if DOING_NATIVE_WINDOWS diff --git a/tests/server/Makefile.in b/tests/server/Makefile.in index 0b04b2d7..81a5bf2a 100644 --- a/tests/server/Makefile.in +++ b/tests/server/Makefile.in @@ -386,11 +386,12 @@ target_alias = @target_alias@ # ########################################################################### AUTOMAKE_OPTIONS = foreign nostdinc -@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib +@DOING_NATIVE_WINDOWS_TRUE@AM_CPPFLAGS = -DCURL_STATICLIB +@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib # Specify our include paths here, and do it relative to $(top_srcdir) and @@ -405,15 +406,14 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file # $(top_srcdir)/ares is for in-tree c-ares's external include files -@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares +@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares -@DOING_NATIVE_WINDOWS_TRUE@AM_CPPFLAGS = -DCURL_STATICLIB CURLX_SRCS = \ $(top_srcdir)/lib/mprintf.c \ $(top_srcdir)/lib/nonblock.c \ diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 78166f86..05821681 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -35,28 +35,28 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/ares is for in-tree c-ares's external include files if USE_EMBEDDED_ARES -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/tests/libtest \ - -I$(top_builddir)/ares \ - -I$(top_srcdir)/ares +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/tests/libtest \ + -I$(top_builddir)/ares \ + -I$(top_srcdir)/ares else -INCLUDES = -I$(top_builddir)/include/curl \ - -I$(top_builddir)/include \ - -I$(top_srcdir)/include \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/tests/libtest +AM_CPPFLAGS = -I$(top_builddir)/include/curl \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/tests/libtest endif EXTRA_DIST = Makefile.inc LDADD = $(top_builddir)/lib/libcurlu.la @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@ DEPENDENCIES = $(top_builddir)/lib/libcurlu.la -AM_CPPFLAGS = -DUNITTESTS +AM_CPPFLAGS += -DUNITTESTS # Mostly for Windows build targets, when using static libcurl if USE_CPPFLAG_CURL_STATICLIB diff --git a/tests/unit/Makefile.in b/tests/unit/Makefile.in index c90e8cff..63499d8c 100644 --- a/tests/unit/Makefile.in +++ b/tests/unit/Makefile.in @@ -356,13 +356,13 @@ target_alias = @target_alias@ # ########################################################################### AUTOMAKE_OPTIONS = foreign nostdinc -@USE_EMBEDDED_ARES_FALSE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib \ -@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/tests/libtest - +@USE_EMBEDDED_ARES_FALSE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/lib \ +@USE_EMBEDDED_ARES_FALSE@ -I$(top_srcdir)/tests/libtest \ +@USE_EMBEDDED_ARES_FALSE@ -DUNITTESTS $(am__append_1) # 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 @@ -376,19 +376,18 @@ AUTOMAKE_OPTIONS = foreign nostdinc # $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files # $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file # $(top_srcdir)/ares is for in-tree c-ares's external include files -@USE_EMBEDDED_ARES_TRUE@INCLUDES = -I$(top_builddir)/include/curl \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/tests/libtest \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ -@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares - +@USE_EMBEDDED_ARES_TRUE@AM_CPPFLAGS = -I$(top_builddir)/include/curl \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/include \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/lib \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/tests/libtest \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_builddir)/ares \ +@USE_EMBEDDED_ARES_TRUE@ -I$(top_srcdir)/ares -DUNITTESTS \ +@USE_EMBEDDED_ARES_TRUE@ $(am__append_1) EXTRA_DIST = Makefile.inc LDADD = $(top_builddir)/lib/libcurlu.la @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@ DEPENDENCIES = $(top_builddir)/lib/libcurlu.la -AM_CPPFLAGS = -DUNITTESTS $(am__append_1) UNITFILES = curlcheck.h \ $(top_srcdir)/tests/libtest/test.h \ $(top_srcdir)/tests/libtest/first.c diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt index 53030cb9..5eac3820 100644 --- a/winbuild/BUILD.WINDOWS.txt +++ b/winbuild/BUILD.WINDOWS.txt @@ -68,3 +68,4 @@ where <options> is one or many of: ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
DEBUG=<yes or no> - Debug builds
+ MACHINE=<x86 or x64> - Target architecture (default is x86)
\ No newline at end of file diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc index 137be213..bc93c4b5 100644 --- a/winbuild/Makefile.vc +++ b/winbuild/Makefile.vc @@ -32,6 +32,7 @@ CFGSET=true !MESSAGE ENABLE_WINSSL=<yes or no> - Enable native Windows SSL support, defaults to yes
!MESSAGE GEN_PDB=<yes or no> - Generate Program Database (debug symbols for release build)
!MESSAGE DEBUG=<yes or no> - Debug builds
+!MESSAGE MACHINE=<x86 or x64> - Target architecture (default x64 on AMD64, x86 on others)
!ERROR please choose a valid mode
!ENDIF
@@ -54,6 +55,14 @@ ENABLE_SSPI = $(USE_SSPI) !ENDIF
# default options
+!IFNDEF MACHINE
+!IF "$(PROCESSOR_ARCHITECTURE)"=="AMD64"
+MACHINE = x64
+!ELSE
+MACHINE = x86
+!ENDIF
+!ENDIF
+
!IFNDEF ENABLE_IDN
USE_IDN = true
!ELSEIF "$(ENABLE_IDN)"=="yes"
@@ -120,6 +129,8 @@ USE_SSH2 = true SSH2 = static
!ENDIF
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-vc$(VC)-$(MACHINE)
+
!IF "$(DEBUG)"=="yes"
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
!ELSE
@@ -168,14 +179,18 @@ CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
$(MODE):
- @SET LIBCURL_DIROBJ=$(LIBCURL_DIROBJ)
+ @SET DIROBJ=$(LIBCURL_DIROBJ)
@SET MACRO_NAME=LIBCURL_OBJS
@SET OUTFILE=LIBCURL_OBJS.inc
@gen_resp_file.bat $(LIBCURL_OBJS)
- @SET LIBCURL_DIROBJ=$(CURL_DIROBJ)
+
+ @SET DIROBJ=$(CURL_DIROBJ)
@SET MACRO_NAME=CURL_OBJS
@SET OUTFILE=CURL_OBJS.inc
@gen_resp_file.bat $(CURL_OBJS)
+
+ @SET CONFIG_NAME_LIB=$(CONFIG_NAME_LIB)
+ @SET MACHINE=$(MACHINE)
@SET USE_IDN=$(USE_IDN)
@SET USE_IPV6=$(USE_IPV6)
@SET USE_SSPI=$(USE_SSPI)
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc index d0478791..7e2904bb 100644 --- a/winbuild/MakefileBuild.vc +++ b/winbuild/MakefileBuild.vc @@ -66,12 +66,24 @@ LFLAGS_PDB = /incremental:no /opt:ref,icf CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
-LIB_NAME_STATIC = libcurl_a.lib
-LIB_NAME_STATIC_DEBUG = libcurl_a_debug.lib
-LIB_NAME_DLL = libcurl.dll
-LIB_NAME_IMP = libcurl.lib
-LIB_NAME_DLL_DEBUG = libcurl_debug.dll
-LIB_NAME_IMP_DEBUG = libcurl_debug.lib
+WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
+
+BASE_NAME = libcurl
+BASE_NAME_DEBUG = $(BASE_NAME)_debug
+BASE_NAME_STATIC = $(BASE_NAME)_a
+BASE_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC)_debug
+
+LIB_NAME_STATIC = $(BASE_NAME_STATIC).lib
+LIB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).lib
+LIB_NAME_DLL = $(BASE_NAME).dll
+LIB_NAME_IMP = $(BASE_NAME).lib
+LIB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).dll
+LIB_NAME_IMP_DEBUG = $(BASE_NAME_DEBUG).lib
+
+PDB_NAME_STATIC = $(BASE_NAME_STATIC).pdb
+PDB_NAME_STATIC_DEBUG = $(BASE_NAME_STATIC_DEBUG).pdb
+PDB_NAME_DLL = $(BASE_NAME).pdb
+PDB_NAME_DLL_DEBUG = $(BASE_NAME_DEBUG).pdb
# CURL Command section
PROGRAM_NAME = curl.exe
@@ -112,12 +124,10 @@ SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl" !IF "$(WITH_ZLIB)"=="dll"
ZLIB_LIBS = zlib.lib
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ
USE_ZLIB = true
ZLIB = dll
!ELSEIF "$(WITH_ZLIB)"=="static"
ZLIB_LIBS = zlib_a.lib
-ZLIB_CFLAGS = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ
USE_ZLIB = true
ZLIB = static
!ENDIF
@@ -132,7 +142,7 @@ SSH2_LIBS = libssh2.lib USE_SSH2 = true
SSH2 = dll
!ELSEIF "$(WITH_SSH2)"=="static"
-SSH2_LIBS = libssh2_a_debug.lib
+SSH2_LIBS = libssh2_a.lib user32.lib
USE_SSH2 = true
SSH2 = static
!ENDIF
@@ -150,8 +160,8 @@ USE_IDN = true !ENDIF
!IF "$(USE_IDN)"=="true"
-CFLAGS = $(CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
-LFLAGS = $(LFLAGS) Normaliz.lib
+IDN_CFLAGS = $(IDN_CFLAGS) /DUSE_WIN32_IDN /DWANT_IDN_PROTOTYPES
+WIN_LIBS = $(WIN_LIBS) Normaliz.lib
!ENDIF
@@ -198,6 +208,7 @@ USE_WINSSL = $(USE_SSPI) USE_WINSSL = true
!ENDIF
+
!IF "$(USE_WINSSL)"=="true"
!IF "$(USE_SSPI)"!="true"
!ERROR cannot build with WinSSL without SSPI
@@ -206,14 +217,10 @@ SSPI_CFLAGS = $(SSPI_CFLAGS) /DUSE_SCHANNEL !ENDIF
-
!IF "$(GEN_PDB)"=="yes"
GEN_PDB = true
!ENDIF
-!IFNDEF MACHINE
-MACHINE = X86
-!ENDIF
!IFDEF EMBEND_MANIFEST
MANIFESTTOOL = mt -manifest $(DIRDIST)\$(PROGRAM_NAME).manifest -outputresource:$(DIRDIST)\$(PROGRAM_NAME);1
@@ -240,12 +247,11 @@ AS_DLL = true CFGSET = true
!ENDIF
-WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
!IF "$(CFGSET)" == "FALSE"
!ERROR please choose a valid mode
!ENDIF
-CONFIG_NAME_LIB = libcurl
+
# CURL_XX macros are for the curl.exe command
@@ -255,44 +261,44 @@ CC = $(CC_DEBUG) $(RTLIB_DEBUG) CURL_CC = $(CC)
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=1 /Fo $@ $(CURL_SRC_DIR)\curl.rc
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-debug
!ELSE
RC_FLAGS = /dDEBUGBUILD=0 /Fo $@ $(LIBCURL_SRC_DIR)\libcurl.rc
CC = $(CC_NODEBUG) $(RTLIB)
CURL_CC = $(CC)
CURL_RC_FLAGS = /i../include /dDEBUGBUILD=0 /Fo $@ $(CURL_SRC_DIR)\curl.rc
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-release
!ENDIF
CURL_CC = $(CURL_CC) $(CURL_CFLAGS)
!IF "$(AS_DLL)" == "true"
-LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
+LNK = $(LNKDLL) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
!IF "$(DEBUG)"=="yes"
TARGET = $(LIB_NAME_DLL_DEBUG)
LNK = $(LNK) /DEBUG /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
+PDB = $(PDB_NAME_DLL_DEBUG)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP_DEBUG)
!ELSE
TARGET = $(LIB_NAME_DLL)
LNK = $(LNK) /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
+PDB = $(PDB_NAME_DLL)
CURL_LIBS = /IMPLIB:$(LIB_DIROBJ)\$(LIB_NAME_IMP)
!ENDIF
-RESOURCE = $(LIB_DIROBJ)\libcurl.res
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-dll
+RESOURCE = $(LIB_DIROBJ)\libcurl.res
# AS_DLL
!ELSE
!IF "$(DEBUG)"=="yes"
TARGET = $(LIB_NAME_STATIC_DEBUG)
+PDB = $(PDB_NAME_STATIC_DEBUG)
!ELSE
TARGET = $(LIB_NAME_STATIC)
+PDB = $(PDB_NAME_STATIC)
!ENDIF
LNK = $(LNKLIB) $(WIN_LIBS) /out:$(LIB_DIROBJ)\$(TARGET)
CC = $(CC) $(CFLAGS_LIBCURL_STATIC)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
# AS_DLL
!ENDIF
@@ -300,42 +306,36 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static !IF "$(USE_SSL)"=="true"
CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
!ENDIF
!IF "$(USE_ZLIB)"=="true"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
!ENDIF
!IF "$(USE_SSH2)"=="true"
CFLAGS = $(CFLAGS) $(SSH2_CFLAGS)
LFLAGS = $(LFLAGS) $(SSH2_LFLAGS) $(SSH2_LIBS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssh2-$(SSH2)
+!ENDIF
+
+!IF "$(USE_IDN)"=="true"
+CFLAGS = $(CFLAGS) $(IDN_CFLAGS)
!ENDIF
!IF "$(USE_IPV6)"=="true"
CFLAGS = $(CFLAGS) $(IPV6_CFLAGS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ipv6
!ENDIF
!IF "$(USE_SSPI)"=="true"
CFLAGS = $(CFLAGS) $(SSPI_CFLAGS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-sspi
!ENDIF
!IF "$(USE_SPNEGO)"=="true"
CFLAGS = $(CFLAGS) $(SPNEGO_CFLAGS)
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-spnego
-!ENDIF
-
-!IF "$(USE_WINSSL)"=="true"
-CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-winssl
!ENDIF
!IF "$(GEN_PDB)"=="true"
-CFLAGS = $(CFLAGS) $(CFLAGS_PDB)
+CFLAGS = $(CFLAGS) $(CFLAGS_PDB) /Fd"$(LIB_DIROBJ)\$(PDB)"
LFLAGS = $(LFLAGS) $(LFLAGS_PDB)
!ENDIF
@@ -397,6 +397,7 @@ $(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR) @echo LFLAGS: $(LFLAGS)
@echo GenPDB: $(GEN_PDB)
@echo Debug: $(DEBUG)
+ @echo Machine: $(MACHINE)
$(LNK) $(LFLAGS) $(LIB_OBJS)
@echo Copying libs...
@if exist $(LIB_DIROBJ)\$(LIB_NAME_DLL) copy $(LIB_DIROBJ)\$(LIB_NAME_DLL) $(DIRDIST)\bin\ /y >nul 2<&1
diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat index c2fa6677..d08b01ed 100755 --- a/winbuild/gen_resp_file.bat +++ b/winbuild/gen_resp_file.bat @@ -1,6 +1,6 @@ @echo OFF
@del %OUTFILE%
@echo %MACRO_NAME% = \> %OUTFILE%
-@for %%i in (%*) do @echo %LIBCURL_DIROBJ%/%%i \>> %OUTFILE%
+@for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE% @echo. >> %OUTFILE%
:END
|