summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libssh2: improved error output for wrong quote syntaxbagder/sftp-impr-errorsDaniel Stenberg2020-05-281-4/+4
| | | | Reported-by: Werner Stolz
* CMake: rebuild Makefile.inc.cmake when Makefile.inc changesPeter Wu2020-05-281-1/+1
| | | | | | | Otherwise the build might fail due to missing source files, as demonstrated by the recent keylog.c addition on an existing build dir. Closes #5469
* urldata: fix comments: Curl_done() is called multi_done() nowDaniel Stenberg2020-05-282-3/+3
| | | | ... since 575e885db
* ngtcp2: use common key log routine for better thread-safetyPeter Wu2020-05-271-42/+12
| | | | | | | | | Tested with ngtcp2 built against the OpenSSL library. Additionally tested with MultiSSL (NSS for TLS and ngtcp2+OpenSSL for QUIC). The TLS backend (independent of QUIC) may or may not already have opened the keylog file before. Therefore Curl_tls_keylog_open is always called to ensure the file is open.
* wolfssl: add SSLKEYLOGFILE supportPeter Wu2020-05-271-0/+144
| | | | | | | | | | | | Tested following the same curl and tshark commands as in commit "vtls: Extract and simplify key log file handling from OpenSSL" using WolfSSL v4.4.0-stable-128-g5179503e8 from git master built with `./configure --enable-all --enable-debug CFLAGS=-DHAVE_SECRET_CALLBACK`. Full support for this feature requires certain wolfSSL build options, see "Availability note" in lib/vtls/wolfssl.c for details. Closes #5327
* vtls: Extract and simplify key log file handling from OpenSSLPeter Wu2020-05-274-125/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a set of routines for TLS key log file handling to enable reuse with other TLS backends. Simplify the OpenSSL backend as follows: - Drop the ENABLE_SSLKEYLOGFILE macro as it is unconditionally enabled. - Do not perform dynamic memory allocation when preparing a log entry. Unless the TLS specifications change we can suffice with a reasonable fixed-size buffer. - Simplify state tracking when SSL_CTX_set_keylog_callback is unavailable. My original sslkeylog.c code included this tracking in order to handle multiple calls to SSL_connect and detect new keys after renegotiation (via SSL_read/SSL_write). For curl however we can be sure that a single master secret eventually becomes available after SSL_connect, so a simple flag is sufficient. An alternative to the flag is examining SSL_state(), but this seems more complex and is not pursued. Capturing keys after server renegotiation was already unsupported in curl and remains unsupported. Tested with curl built against OpenSSL 0.9.8zh, 1.0.2u, and 1.1.1f (`SSLKEYLOGFILE=keys.txt curl -vkso /dev/null https://localhost:4433`) against an OpenSSL 1.1.1f server configured with: # Force non-TLSv1.3, use TLSv1.0 since 0.9.8 fails with 1.1 or 1.2 openssl s_server -www -tls1 # Likewise, but fail the server handshake. openssl s_server -www -tls1 -Verify 2 # TLS 1.3 test. No need to test the failing server handshake. openssl s_server -www -tls1_3 Verify that all secrets (1 for TLS 1.0, 4 for TLS 1.3) are correctly written using Wireshark. For the first and third case, expect four matches per connection (decrypted Server Finished, Client Finished, HTTP Request, HTTP Response). For the second case where the handshake fails, expect a decrypted Server Finished only. tshark -i lo -pf tcp -otls.keylog_file:keys.txt -Tfields \ -eframe.number -eframe.time -etcp.stream -e_ws.col.Info \ -dtls.port==4433,http -ohttp.desegment_body:FALSE \ -Y 'tls.handshake.verify_data or http' A single connection can easily be identified via the `tcp.stream` field.
* FILEFORMAT: add more features that tests can depend onDaniel Stenberg2020-05-271-0/+10
|
* transfer: close connection after excess data has been readMichael Kaufmann2020-05-271-0/+1
| | | | | | | | For HTTP 1.x, it's a protocol error when the server sends more bytes than announced. If this happens, don't reuse the connection, because the start position of the next response is undefined. Closes #5440
* Revert "ssh: ignore timeouts during disconnect"Estanislau Augé-Pujadas2020-05-271-15/+12
| | | | | | | | This reverts commit f31760e63b4e9ef1eb25f8f211390f8239388515. Shipped in curl 7.54.1. Bug: https://curl.haxx.se/mail/lib-2020-05/0068.html Closes #5465
* urldata: connect related booleans live in struct ConnectBitsDaniel Stenberg2020-05-278-36/+29
| | | | | | And remove a few unused booleans! Closes #5461
* hostip: on macOS avoid DoH when given a numerical IP addressDaniel Stenberg2020-05-263-6/+18
| | | | | | | | | When USE_RESOLVE_ON_IPS is set (defined on macOS), it means that numerical IP addresses still need to get "resolved" - but not with DoH. Reported-by: Viktor Szakats Fixes #5454 Closes #5459
* ngtcp2: cleanup memory when failing to connectDaniel Stenberg2020-05-261-6/+14
| | | | | | Reported-by: Peter Wu Fixes #5447 (the ngtcp2 side of it) Closes #5451
* quiche: clean up memory properly when failing to connectDaniel Stenberg2020-05-261-8/+17
| | | | | | Addresses the quiche side of #5447 Reported-by: Peter Wu Closes #5450
* cleanup: use a single space after equals sign in assignmentsDaniel Stenberg2020-05-267-12/+12
|
* url: accept "any length" credentials for proxy authDaniel Stenberg2020-05-255-30/+70
| | | | | | | | | | | They're only limited to the maximum string input restrictions, not to 256 bytes. Added test 1178 to verify Reported-by: Will Roberts Fixes #5448 Closes #5449
* test1167: fixes in badsymbols.plMaksim Stsepanenka2020-05-251-3/+3
| | | | Closes #5442
* altsvc: fix parser for lines ending with CRLFDaniel Stenberg2020-05-252-12/+17
| | | | | | | | | | | | | Fixed the alt-svc parser to treat a newline as end of line. The unit tests in test 1654 were done without CRLF and thus didn't quite match the real world. Now they use CRLF as well. Reported-by: Peter Wu Assisted-by: Peter Wu Assisted-by: Jay Satiro Fixes #5445 Closes #5446
* all: fix codespell errorsViktor Szakats2020-05-2522-31/+31
| | | | | | Reviewed-by: Jay Satiro Reviewed-by: Daniel Stenberg Closes https://github.com/curl/curl/pull/5452
* ngtcp2: fix build with current ngtcp2 master implementing draft 28Peter Wu2020-05-252-88/+24
| | | | | | | | Based on client.cc changes from ngtcp2. Tested with current git master, ngtcp2 commit c77d5731ce92, nghttp3 commit 65ff479d4380. Fixes #5444 Closes #5443
* RELEASE-NOTES: syncedDaniel Stenberg2020-05-251-1/+1
| | | | moved the new setopts up to a "change"
* RELEASE-NOTES: syncedDaniel Stenberg2020-05-251-9/+29
|
* copyright: updated year ranges out of syncDaniel Stenberg2020-05-249-9/+12
| | | | ... and whitelisted a few more files in the the copyright.pl script.
* setopt: add CURLOPT_PROXY_ISSUERCERT(_BLOB) for coherencyGilles Vollant2020-05-238-0/+188
| | | | Closes #5431
* curl: remove -J "informational" written on stdoutDaniel Stenberg2020-05-233-8/+4
| | | | | | | | | | | curl would previously show "curl: Saved to filename 'name from header'" if -J was used and a name was picked from the Content-Disposition header. That output could interfer with other stdout output, such as -w. This commit removes that output line. Bug: https://curl.haxx.se/mail/archive-2020-05/0044.html Reported-by: Коваленко Анатолий Викторович Closes #5435
* travis: simplify quiche build instructions wrt boringsslPeter Wu2020-05-223-22/+10
| | | | | | | quiche builds boringssl as static library, reuse that instead of building another shared library. Closes #5438
* configure: fix pthread check with static boringsslPeter Wu2020-05-221-2/+13
| | | | | | | A shared boringssl/OpenSSL library requires -lcrypto only for linking. A static build additionally requires `-ldl -lpthread`. In the latter case `-lpthread` is added to LIBS which prevented `-pthread` from being added to CFLAGS. Clear LIBS to fix linking failures for libtest tests.
* Revert "sendf: make failf() use the mvsnprintf() return code"Daniel Stenberg2020-05-221-1/+2
| | | | | | | | | | This reverts commit 74623551f306990e70c7c5515b88972005604a74. Instead mark the function call with (void). Getting the return code and using it instead triggered Coverity warning CID 1463596 because snprintf() can return a negative value... Closes #5441
* typecheck-gcc.h: CURLINFO_PRIVATE does not need a 'char *'Daniel Stenberg2020-05-211-2/+3
| | | | | | Reported-by: Billyzou0741326 on github Fixes #5432 Closes #5436
* tests/server/util.h: add extern to silence compiler warningDaniel Stenberg2020-05-201-0/+2
| | | | Follow-up from a3b0699d5c1
* typecheck-gcc.h: fix the OFF_T checkDaniel Stenberg2020-05-201-2/+2
| | | | | | | | The option number also needs to be less than CURLOPTTYPE_BLOB. Follow-up to cac5374298 Reported-by: Jeroen Ooms Bug: https://github.com/curl/curl/pull/5365#issuecomment-631084114
* TODO: --dry-runDaniel Stenberg2020-05-191-0/+8
| | | | Closes #5426
* TODO: Ratelimit or wait between serial requestsDaniel Stenberg2020-05-191-0/+11
| | | | Closes #5406
* tool_paramhlp: fixup C89 mistakeDaniel Stenberg2020-05-191-2/+1
| | | | Follow-up to c5f0a9db22.
* tool_paramhlp: fixed potentially uninitialized strtol() variableSiva Sivaraman2020-05-191-0/+1
| | | | | | | Seems highly unlikely to actually be possible, but better safe than sorry. Closes #5417
* tool_operate: fixed potentially uninitialized variablesSiva Sivaraman2020-05-191-5/+5
| | | | | | | ... in curl_easy_getinfo() calls. They're harmless but clearing the variables makes the code safer and comforts the reader. Closes #5416
* sha256: move assign to the declaration lineDaniel Stenberg2020-05-191-2/+1
| | | | Follow-up to fae30656. Should've been squashed with that commit...
* sha256: fixed potentially uninitialized variableSiva Sivaraman2020-05-191-0/+1
| | | | Closes #5414
* sendf: make failf() use the mvsnprintf() return codeDaniel Stenberg2020-05-191-2/+1
| | | | | | | | ... and avoid a strlen() call. Fixes a MonocleAI warning. Reported-by: MonocleAI Fixes #5413 Closes #5420
* hostip: make Curl_printable_address not return anythingDaniel Stenberg2020-05-195-41/+31
| | | | | | | | | It was not used much anyway and instead we let it store a blank buffer in case of failure. Reported-by: MonocleAI Fixes #5411 Closes #5418
* ftp: mark return-ignoring calls to Curl_GetFTPResponse with (void)Daniel Stenberg2020-05-191-2/+2
| | | | | | | They're done on purpose, make that visible in the code. Reported-by: MonocleAI Fixes #5412 Closes #549
* TODO: forbid TLS post-handshake auth and do TLS record paddingDaniel Stenberg2020-05-181-7/+24
| | | | | Closes #5396 Closes #5398
* RELEASE-NOTES: syncedDaniel Stenberg2020-05-181-8/+44
|
* dynbuf: return NULL when there's no buffer lengthDaniel Stenberg2020-05-172-8/+8
| | | | | | | | | ... as returning a "" is not a good idea as the string is supposed to be allocated and returning a const string will cause issues. Reported-by: Brian Carpenter Follow-up to ed35d6590e72c Closes #5405
* travis: upgrade to bionic, clang-9, improve readabilityPeter Wu2020-05-161-221/+101
| | | | | | | | | | | | | | | | | | | | | Changes, partially to reduce build failures from external dependencies: - Upgrade Ubuntu and drop unnecessary third-party repos. - Properly clone apt config to ensure retries. - Upgrade to clang-9 from the standard repos. - Use Ubuntu 20.04 focal for the libssh build, use of ssh_get_publickey fails on -Werror=deprecated-declarations in Ubuntu 18.04. Do not use focal everywhere yet since Travis CI has not documented this option. In focal, python-impacket (Py2.7) has been removed, leaving only python3-impacket. Since it is only needed for SMB tests and not SSH, skip it for the libssh job since it might need more work. - apt: Remove gcc-8 and libstdc++-8-dev, already installed via g++-8. Non-functional cleanups: - Simplify test matrix, drop redundant os and compiler keys. - Deprecation fixes: remove sudo, rename matrix -> jobs. - Every job has an 'env' key, put this key first in a list item. Closes #5370
* travis: whitespace-only changes for consistencyPeter Wu2020-05-161-428/+428
| | | | | | | | | | Automatically apply a consistent indentation with: python3 -c 'from ruamel.yaml import YAML;y=YAML();d=y.load(open(".travis.yml"));y.width=500;y.dump(d,open(".travis.yml.new","w"))' followed by manually re-indenting three comments. Closes #5370
* CMake: add libssh build supportPeter Wu2020-05-153-4/+31
| | | | Closes #5372
* KNOWN_BUGS: wolfssh: publickey auth doesn't workDaniel Stenberg2020-05-151-0/+8
| | | | Closes #4820
* KNOWN_BUGS: OS400 port requires deprecated IBM libraryDaniel Stenberg2020-05-151-0/+9
| | | | Closes #5176
* http2: keep trying to send pending frames after req.upload_doneVyron Tsingaras2020-05-151-2/+20
| | | | | Fixes #1410 Closes #5401
* setopt: support certificate options in memory with struct curl_blobGilles Vollant2020-05-1521-130/+961
| | | | | | | | | | | | | This change introduces a generic way to provide binary data in setopt options, called BLOBs. This change introduces these new setopts: CURLOPT_ISSUERCERT_BLOB, CURLOPT_PROXY_SSLCERT_BLOB, CURLOPT_PROXY_SSLKEY_BLOB, CURLOPT_SSLCERT_BLOB and CURLOPT_SSLKEY_BLOB. Reviewed-by: Daniel Stenberg Closes #5357