summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test320: fix regression in [ci skip]Viktor Szakats2018-09-241-2/+2
| | | | | | | | The value in question is coming directly from `gnutls-serv`, so it cannot be modified freely. Reported-by: Marcel Raad Ref: https://github.com/curl/curl/commit/6ae6b2a533e8630afbb21f570305bd4ceece6348#commitcomment-30621004
* Curl_dedotdotify(): always nul terminate returned string.Even Rouault2018-09-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes potential out-of-buffer access on "file:./" URL $ valgrind curl "file:./" ==24516== Memcheck, a memory error detector ==24516== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==24516== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==24516== Command: /home/even/install-curl-git/bin/curl file:./ ==24516== ==24516== Conditional jump or move depends on uninitialised value(s) ==24516== at 0x4C31F9C: strcmp (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24516== by 0x4EBB315: seturl (urlapi.c:801) ==24516== by 0x4EBB568: parseurl (urlapi.c:861) ==24516== by 0x4EBC509: curl_url_set (urlapi.c:1199) ==24516== by 0x4E644C6: parseurlandfillconn (url.c:2044) ==24516== by 0x4E67AEF: create_conn (url.c:3613) ==24516== by 0x4E68A4F: Curl_connect (url.c:4119) ==24516== by 0x4E7F0A4: multi_runsingle (multi.c:1440) ==24516== by 0x4E808E5: curl_multi_perform (multi.c:2173) ==24516== by 0x4E7558C: easy_transfer (easy.c:686) ==24516== by 0x4E75801: easy_perform (easy.c:779) ==24516== by 0x4E75868: curl_easy_perform (easy.c:798) Was originally spotted by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10637 Credit to OSS-Fuzz Closes #3039
* update URLs in testsViktor Szakats2018-09-234-5/+5
| | | | | | - and one in docs/MANUAL as well Closes https://github.com/curl/curl/pull/3038
* whitespace fixesViktor Szakats2018-09-2367-104/+39
| | | | | | | | | | | - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
* unit1650: fix out of boundary accessDaniel Stenberg2018-09-231-4/+4
| | | | | Fixes #2987 Closes #3035
* url: use the URL API internally as wellDaniel Stenberg2018-09-223-5/+5
| | | | | | ... to make it a truly unified URL parser. Closes #3017
* urlapi: fix support for address scope in IPv6 numerical addressesDaniel Stenberg2018-09-211-0/+3
| | | | Closes #3024
* certs: generate tests certs with sha256 digest algorithmDaniel Stenberg2018-09-2038-825/+835
| | | | | | | | As OpenSSL 1.1.1 starts to complain and fail on sha1 CAs: "SSL certificate problem: CA signature digest algorithm too weak" Closes #3014
* urlapi: document the error codes, remove two unused onesDaniel Stenberg2018-09-191-20/+20
| | | | | Assisted-by: Daniel Gustafsson Closes #3019
* urlapi: add CURLU_GUESS_SCHEME and fix hostname acceptanceDaniel Stenberg2018-09-192-1/+31
| | | | | | | | | | | | | | | In order for this API to fully work for libcurl itself, it now offers a CURLU_GUESS_SCHEME flag that makes it "guess" scheme based on the host name prefix just like libcurl always did. If there's no known prefix, it will guess "http://". Separately, it relaxes the check of the host name so that IDN host names can be passed in as well. Both these changes are necessary for libcurl itself to use this API. Assisted-by: Daniel Gustafsson Closes #3018
* libtest: Add chkdecimalpoint to .gitignoreRikard Falkeborn2018-09-151-0/+1
| | | | Closes #2998
* runtests.pl: run tests against the MesaLink vtls backendYiming Jing2018-09-131-0/+5
|
* urlglob: improve error messageDaniel Stenberg2018-09-131-1/+3
| | | | | | | | | to help user understand what the problem is Reported-by: Daniel Shahaf Fixes #2763 Closes #2977
* tests/certs: rebuild certs with 2048-bit RSA keysYiming Jing2018-09-1243-787/+1065
| | | | | | | | | | | The previous test certificates contained RSA keys of only 1024 bits. However, RSA claims that 1024-bit RSA keys are likely to become crackable some time before 2010. The NIST recommends at least 2048-bit keys for RSA for now. Better use full 2048 also for testing. Closes #2973
* misc: fix typos in commentsDaniel Gustafsson2018-09-101-1/+1
| | | | Closes #2963
* test324: fix after 3f3b26d6feb0667714902e836af608094235fca2Marcel Raad2018-09-081-1/+1
| | | | The expected error code is now 60. 51 is dead.
* URL-APIDaniel Stenberg2018-09-085-0/+799
| | | | | | | See header file and man pages for API. All documented API details work and are tested in the 1560 test case. Closes #2842
* curl_easy_upkeep: removed 'conn' from the nameDaniel Stenberg2018-09-071-1/+1
| | | | | | | ... including the associated option. Fixes #2951 Closes #2952
* upkeep: add a connection upkeep API: curl_easy_conn_upkeep()Max Dymond2018-09-071-1/+2
| | | | | | | | | Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641
* imap: change from "FETCH" to "UID FETCH"Nicklas Avén2018-09-0637-38/+93
| | | | | | | | | | | | ... and add "MAILINDEX". As described in #2789, this is a suggested solution. Changing UID=xx to actually get mail with UID xx and add "MAILINDEX" to get a mail with a special index in the mail box (old behavior). So MAILINDEX=1 gives the first non deleted mail in the mail box. Fixes #2789 Closes #2815
* DOH: add test case 1650 and 2100Daniel Stenberg2018-09-065-1/+318
|
* ssl: deprecate CURLE_SSL_CACERT in favour of a unified error codeHan Han2018-09-065-6/+6
| | | | Long live CURLE_PEER_FAILED_VERIFICATION
* tests: add unit tests for url.cJim Fuller2018-09-055-2/+122
| | | | | Approved-by: Daniel Gustafsson Closes #2937
* test1452: mark as flakyDaniel Stenberg2018-09-051-0/+1
| | | | | | makes it not run in the CI builds Closes #2941
* pipelining: deprecatedDaniel Stenberg2018-09-052-108/+11
| | | | | | | | | | | | Transparently. The related curl_multi_setopt() options all still returns OK when pipelining is selected. To re-enable the support, the single line change in lib/multi.c needs to be reverted. See docs/DEPRECATE.md Closes #2705
* test1148: fix precheck outputMarcel Raad2018-09-021-1/+1
| | | | "precheck command error" is not very helpful.
* cookies: support creation-time attribute for cookiesDaniel Gustafsson2018-08-3110-64/+64
| | | | | | | | | | | | | | According to RFC6265 section 5.4, cookies with equal path lengths SHOULD be sorted by creation-time (earlier first). This adds a creation-time record to the cookie struct in order to make cookie sorting more deterministic. The creation-time is defined as the order of the cookies in the jar, the first cookie read fro the jar being the oldest. The creation-time is thus not serialized into the jar. Also remove the strcmp() matching in the sorting as there is no lexicographic ordering in RFC6265. Existing tests are updated to match. Closes #2524
* Don't use Windows path %PWD for SSH testsMarcel Raad2018-08-3148-47/+49
| | | | | | | | | | | | | All these tests failed on Windows because something like sftp://%HOSTIP:%SSHPORT%PWD/ expanded to sftp://127.0.0.1:1234c:/msys64/home/bla/curl and then curl complained about the port number ending with a letter. Use the original POSIX path instead of the Windows path created in checksystem to fix this. Closes https://github.com/curl/curl/pull/2920
* lib1522: fix curl_easy_setopt argument typeMarcel Raad2018-08-241-1/+1
| | | | CURLOPT_POSTFIELDSIZE is a long option.
* gopher: Do not translate `?' to `%09'Leonardo Taccari2018-08-241-1/+1
| | | | | | | | | | | | | Since GOPHER support was added in curl `?' character was automatically translated to `%09' (`\t'). However, this behaviour does not seems documented in RFC 4266 and for search selectors it is documented to directly use `%09' in the URL. Apart that several gopher servers in the current gopherspace have CGI support where `?' is used as part of the selector and translating it to `%09' often leads to surprising results. Closes #2910
* cookie tests: treat files as textMarcel Raad2018-08-233-3/+3
| | | | Fixes test failures because of wrong line endings on Windows.
* Tests: fixes for WindowsMarcel Raad2018-08-222-1/+4
| | | | | - test 1268 requires unix sockets - test 2072 must be disabled also for MSYS/MinGW
* test1148: disable if decimal separator is not pointMarcel Raad2018-08-214-0/+54
| | | | | | | | | Modifying the locale with environment variables doesn't work for native Windows applications. Just disable the test in this case if the decimal separator is something different than a point. Use a precheck with a small C program to achieve that. Closes https://github.com/curl/curl/pull/2786
* curl-compilers: enable -Wbad-function-cast on GCCMarcel Raad2018-08-212-2/+6
| | | | | | | This warning used to be enabled only for clang as it's a bit stricter on GCC. Silence the remaining occurrences and enable it on GCC too. Closes https://github.com/curl/curl/pull/2747
* test1268: check the stderr output as "text"Daniel Stenberg2018-08-161-1/+1
| | | | | | Follow-up to 099f37e9c57 Pointed-out-by: Marcel Raad
* curl: warn the user if a given file name looks like an optionDaniel Stenberg2018-08-152-0/+39
| | | | | | | | | | ... simply because this is usually a sign of the user having omitted the file name and the next option is instead "eaten" by the parser as a file name. Add test1268 to verify Closes #2885
* ssh-libssh: fix infinite connect loop on invalid private keyKamil Dudka2018-08-142-1/+34
| | | | | | | | Added test 656 (based on test 604) to verify the fix. Bug: https://bugzilla.redhat.com/1595135 Closes #2879
* http: fix for tiny "HTTP/0.9" responseDaniel Stenberg2018-08-136-5/+107
| | | | | | | | | | | Deal with tiny "HTTP/0.9" (header-less) responses by checking the status-line early, even before a full "HTTP/" is received to allow detecting 0.9 properly. Test 1266 and 1267 added to verify. Fixes #2420 Closes #2872
* Split non-portable part off test 1133Marcel Raad2018-08-113-7/+105
| | | | | | | | | Split off testing file names with double quotes into new test 1158. Disable it for MSYS using a precheck as it doesn't support file names with double quotes (but Cygwin does, for example). Fixes https://github.com/curl/curl/issues/2796 Closes https://github.com/curl/curl/pull/2854
* CURLINFO_SIZE_UPLOAD: fix missing counter updateDaniel Stenberg2018-08-114-2/+145
| | | | | | | | Adds test 1522 for verification. Reported-by: cjmsoregan Fixes #2847 Closes #2864
* lib1502: fix memory leak in torture testDaniel Stenberg2018-08-101-0/+2
| | | | | | Reported-by: Marcel Raad Fixes #2861 Closes #2863
* test1531: Add timeoutRikard Falkeborn2018-08-091-1/+10
| | | | | | | Previously, the macro TEST_HANG_TIMEOUT was unused, but since there is looping going on, we might as well add timing instead of removing it. Closes #2853
* test1540: Remove unused macro TEST_HANG_TIMEOUTRikard Falkeborn2018-08-091-2/+0
| | | | | | | The macro has never been used, and it there is not really any place where it would make sense to add timing checks. Closes #2852
* ssl: set engine implicitly when a PKCS#11 URI is providedAnderson Toshiyuki Sasaki2018-08-081-0/+3
| | | | | | | | | | | This allows the use of PKCS#11 URI for certificates and keys without setting the corresponding type as "ENG" and the engine as "pkcs11" explicitly. If a PKCS#11 URI is provided for certificate, key, proxy_certificate or proxy_key, the corresponding type is set as "ENG" if not provided and the engine is set to "pkcs11" if not provided. Acked-by: Nikos Mavrogiannopoulos Closes #2333
* CMake: Respect BUILD_SHARED_LIBSRuslan Baratov2018-08-081-1/+1
| | | | | | | | | | Use standard CMake variable BUILD_SHARED_LIBS instead of introducing custom option CURL_STATICLIB. Use '-DBUILD_SHARED_LIBS=%SHARED%' in appveyor.yml. Reviewed-by: Sergei Nikulov Closes #2755
* test1307: disabledDaniel Stenberg2018-08-021-0/+2
| | | | | | | | Turns out that since we're using the native fnmatch function now when available, and they simply disagree on a huge number of test patterns that make it hard to test this function like this... Fixes #2825
* general: fix printf specifiersRikard Falkeborn2018-08-011-1/+1
| | | | Closes #2818
* sws: handle EINTR when calling select()Michael Kaufmann2018-07-291-11/+14
| | | | Closes https://github.com/curl/curl/pull/2808
* test1157: follow-up to 35ecffb9Daniel Stenberg2018-07-291-0/+3
| | | | | Ignore the user-agent line. Pointed-out-by: Marcel Raad
* tests/http_pipe.py: Use /usr/bin/env to find pythonMichael Kaufmann2018-07-291-1/+1
|