summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Makefile.m32: add support for UNICODE buildsViktor Szakats2020-11-231-0/+6
| | | | | | | | | | | | | It requires the linker to support the `-municode` option. This is available in more recent mingw-w64 releases. Ref: https://gcc.gnu.org/onlinedocs/gcc/x86-Windows-Options.html Ref: https://stackoverflow.com/questions/3571250/wwinmain-unicode-and-mingw/11706847#11706847 Reviewed-by: Jay Satiro Reviewed-by: Marcel Raad Closes #6228
* urldata: remove 'void *protop' and create the union 'p'Daniel Stenberg2020-11-2321-166/+181
| | | | | | | ... to avoid the use of 'void *' for the protocol specific structs done per transfer. Closes #6238
* curl: add compatibility for Amiga and GCC 6.5Oliver Urbann2020-11-201-0/+6
| | | | | | | Changes are mainly reordering and adding of includes required to compile with a more recent version of GCC. Closes #6220
* openssl: guard against OOM on context creationDaniel Gustafsson2020-11-191-2/+6
| | | | | | | | | | | | | EVP_MD_CTX_create will allocate memory for the context and returns NULL in case the allocation fails. Make sure to catch any allocation failures and exit early if so. In passing, also move to EVP_DigestInit rather than EVP_DigestInit_ex as the latter is intended for ENGINE selection which we don't do. Closes #6224 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Emil Engler <me@emilengler.com>
* cmake: use libcurl.rc in all Windows buildsVincent Torri2020-11-191-1/+1
| | | | | Reviewed-by: Marcel Raad Closes #6215
* quiche: remove 'static' from local bufferDaniel Stenberg2020-11-191-1/+1
| | | | | | For thread-safety Closes #6223
* cmake: correctly handle linker flags for static libsTobias Hieta2020-11-101-4/+0
| | | | | | | | | | | | | curl CMake was setting the the EXE flags for static libraries which made the /manifest:no flag ended up when linking the static library, which is not a valid flag for lib.exe or llvm-lib.exe and caused llvm-lib to exit with an error. The better way to handle this is to make sure that we pass the correct linker flags to CMAKE_STATIC_LINKER_FLAGS instead. Reviewed-by: Jakub Zakrzewski Closes #6195
* http_proxy: use enum with state names for 'keepon'bagder/http-proxy-keeponDaniel Stenberg2020-11-102-11/+15
| | | | | | | | | To make the code clearer, change the 'keepon' from an int to an enum with better state names. Reported-by: Niranjan Hasabnis Bug: https://curl.se/mail/lib-2020-11/0026.html Closes #6193
* curl_easy_escape: limit output string length to 3 * max inputDaniel Stenberg2020-11-091-1/+1
| | | | | | | | | ... instead of the limiting it to just the max input size. As every input byte can be expanded to 3 output bytes, this could limit the input string to 2.66 MB instead of the intended 8 MB. Reported-by: Marc Schlatter Closes #6192
* Curl_pgrsStartNow: init speed limit time stamps at startDaniel Stenberg2020-11-091-4/+2
| | | | | | | | | | By setting the speed limit time stamps unconditionally at transfer start, we can start off a transfer without speed limits and yet allow them to get set during transfer and have an effect. Reported-by: Kael1117 on github Fixes #6162 Closes #6184
* ngtcp2: adapt to recent nghttp3 updatesDaniel Stenberg2020-11-091-0/+1
| | | | | | 'reset_stream' was added to the nghttp3_conn_callbacks struct Closes #6185
* altsvc: minimize variable scope and avoid "DEAD_STORE"Daniel Stenberg2020-11-071-2/+1
| | | | Closes #6182
* url: make sure an HSTS upgrade updates URL and scheme correctlyDaniel Stenberg2020-11-061-2/+20
| | | | Closes #6175
* hsts: remove debug code leftoversDaniel Stenberg2020-11-061-2/+0
| | | | Closes #6175
* hsts: Remove pointless call to free in errorpathDaniel Gustafsson2020-11-051-1/+0
| | | | | | | | The line variable will always be NULL in the error path, so remove the free call since it's pointless. Closes #6170 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* copyright: fix year rangesDaniel Stenberg2020-11-0596-97/+97
| | | | Follow-up from 4d2f8006777
* curl.se: new homeDaniel Stenberg2020-11-04313-323/+323
| | | | Closes #6172
* rtsp: error out on empty Session ID, unified the codeHarry Sintonen2020-11-041-18/+18
|
* rtsp: fixed Session ID comparison to refuse prefixHarry Sintonen2020-11-041-2/+11
| | | | Closes #6161
* hsts: add read/write callbacksDaniel Stenberg2020-11-039-13/+139
| | | | | | | | - read/write callback options - man pages for the 4 new setopts - test 1915 verifies the callbacks Closes #5896
* hsts: add support for Strict-Transport-SecurityDaniel Stenberg2020-11-0311-20/+576
| | | | | | | | | | | | | | | | | | | | | | | | | - enable in the build (configure) - header parsing - host name lookup - unit tests for the above - CI build - CURL_VERSION_HSTS bit - curl_version_info support - curl -V output - curl-config --features - CURLOPT_HSTS_CTRL - man page for CURLOPT_HSTS_CTRL - curl --hsts (sets CURLOPT_HSTS_CTRL and works with --libcurl) - man page for --hsts - save cache to disk - load cache from disk - CURLOPT_HSTS - man page for CURLOPT_HSTS - added docs/HSTS.md - fixed --version docs - adjusted curl_easy_duphandle Closes #5896
* sendf: move the verbose-check into Curl_debugDaniel Stenberg2020-11-0211-138/+103
| | | | | | Saves us from having the same check done everywhere. Closes #6159
* gnutls: fix memory leaks (certfields memory wasn't released)Harry Sintonen2020-11-021-1/+6
| | | | Closes #6153
* http: pass correct header size to debug callback for chunked postDaniel Stenberg2020-10-311-5/+9
| | | | | | | | | | | ... when the chunked framing was added, the size of the "body part" of the data was calculated wrongly so the debug callback would get told a header chunk a few bytes too big that would also contain the first few bytes of the request body. Reported-by: Dirk Wetter Ref: #6144 Closes #6147
* libssh2: fix transport over HTTPS proxyDaniel Stenberg2020-10-292-1/+24
| | | | | | | | The fix in #6021 was not enough. This fix makes sure SCP/SFTP content can also be transfered over a HTTPS proxy. Fixes #6113 Closes #6128
* libssh2: fix build with disabled proxy supportBaruch Siach2020-10-261-1/+6
| | | | | | | | | | Build breaks because the http_proxy field is missing: vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy' Regression from #6021, shipped in curl 7.73.0 Closes #6125
* alt-svc: enable by defaultDaniel Stenberg2020-10-2511-18/+18
| | | | | | | | Remove CURLALTSVC_IMMEDIATELY, which was never implemented/supported. alt-svc support in curl is no longer considered experimental Closes #5868
* libssh2: require version 1.0 or laterDaniel Stenberg2020-10-221-22/+0
| | | | | | | ... and simplify the code accordingly. libssh2 version 1.0 was released in April 2009. Closes #6116
* CMake: store IDN2 information in curl_config.hDaniel Stenberg2020-10-201-2/+5
| | | | | | | | This allows the build to enable IDN properly and it makes test 1014 happier. Ref: #6074 Closes #6108
* openssl: acknowledge SRP disabling in configure properlyDaniel Stenberg2020-10-161-4/+12
| | | | | | | | | | | Follow-up to 68a513247409 Use a new separate define that is the combination of both HAVE_OPENSSL_SRP and USE_TLS_SRP: USE_OPENSSL_SRP Bug: https://curl.haxx.se/mail/lib-2020-10/0037.html Closes #6094
* http3: fix two build errors, silence warningsViktor Szakats2020-10-162-4/+5
| | | | | | | | | * fix two build errors due to mismatch between function declarations and their definitions * silence two mismatched signs warnings via casts Approved-by: Daniel Stenberg Closes #6093
* Makefile.m32: add support for HTTP/3 via ngtcp2+nghttp3Viktor Szakats2020-10-161-0/+25
| | | | | Approved-by: Daniel Stenberg Closes #6092
* checksrc: warn on empty line before open braceDaniel Stenberg2020-10-155-4/+6
| | | | | | ... and fix a few occurances Closes #6088
* urlapi: URL encode a '+' in the query partDaniel Stenberg2020-10-151-20/+7
| | | | | | | | | ... when asked to with CURLU_URLENCODE. Extended test 1560 to verify. Reported-by: Dietmar Hauser Fixes #6086 Closes #6087
* strerror: use 'const' as the string should never be modifiedPhilipp Klaus Krause2020-10-151-1/+1
| | | | Closes #6068
* connect: repair build without ipv6 availabilityJay Satiro2020-10-151-0/+4
| | | | | | | | Assisted-by: Daniel Stenberg Reported-by: Tom G. Christensen Fixes https://github.com/curl/curl/issues/6069 Closes https://github.com/curl/curl/pull/6071
* test122[12]: remove these two testsDaniel Stenberg2020-10-151-1/+1
| | | | | | | | | ... and remove the objnames scripts they tested. They're not used for anything anymore so testing them serves no purpose! Reported-by: Marc Hörsken Fixes #6080 Closes #6081
* strerror: Revert to local codepage for Windows error stringJay Satiro2020-10-131-16/+15
| | | | | | | | | | | | | | | | | | | | - Change get_winapi_error() to return the error string in the local codepage instead of UTF-8 encoding. Two weeks ago bed5f84 fixed get_winapi_error() to work on xbox, but it also changed the error string's encoding from local codepage to UTF-8. We return the local codepage version of the error string because if it is output to the user's terminal it will likely be with functions which expect the local codepage (eg fprintf, failf, infof). This is essentially a partial revert of bed5f84. The support for xbox remains but the error string is reverted back to local codepage. Ref: https://github.com/curl/curl/pull/6005 Reviewed-by: Marcel Raad Closes #6065
* windows: fix comparison of mismatched types warningViktor Szakats2020-10-121-1/+1
| | | | | | | | | | | | | clang 10, mingw-w64: ``` vtls/openssl.c:2917:33: warning: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Wsign-compare] if(GetLastError() != CRYPT_E_NOT_FOUND) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ ``` Approved-by: Daniel Stenberg Closes #6062
* checksrc: detect // comments on column 0Daniel Stenberg2020-10-071-1/+1
| | | | | | Spotted while working on #6045 Closes #6048
* mbedtls: add missing header when defining MBEDTLS_DEBUGFrederik Wedel-Heinen2020-10-071-3/+9
| | | | Closes #6045
* ldap: reduce the amount of #ifdefs neededDaniel Stenberg2020-10-031-45/+21
| | | | Closes #6035
* checksrc: warn on space after exclamation markDaniel Stenberg2020-10-023-3/+10
| | | | Closes #6034
* strerror: fix null deref on winapi out-of-memoryJay Satiro2020-10-011-3/+5
| | | | | | Follow-up to bed5f84 from several days ago. Ref: https://github.com/curl/curl/pull/6005
* vtls: deduplicate some DISABLE_PROXY ifdefsKamil Dudka2020-10-014-104/+36
| | | | | | ... in the code of gtls, nss, and openssl Closes #5735
* configure: don't say HTTPS-proxy is enabled when disabled!Daniel Stenberg2020-09-301-0/+2
| | | | | | | Reported-by: Kamil Dudka Reviewed-by: Kamil Dudka Bug: https://github.com/curl/curl/pull/5735#issuecomment-701376388 Closes #6029
* src: Consistently spell whitespace without whitespaceDaniel Gustafsson2020-09-304-7/+7
| | | | | | | | | Whitespace is spelled without a space between white and space, so make sure to consistently spell it that way across the codebase. Closes #6023 Reviewed-by: Daniel Stenberg <daniel@haxx.se> Reviewed-by: Emil Engler <me@emilengler.com>
* sectransp: make it build with --disable-proxyDaniel Stenberg2020-09-301-2/+14
| | | | | | | Follow-up from #5466 and f3d501dc678d80 Reported-by: Javier Navarro Fixes #6025 Closes #6026
* libssh2: handle the SSH protocols done over HTTPS proxyDaniel Stenberg2020-09-291-8/+83
| | | | | | Reported-by: Robin Douine Fixes #4295 Closes #6021
* memdebug: remove 9 year old unused debug functionEmil Engler2020-09-281-51/+0
| | | | | | | | There used to be a way to have memdebug fill allocated memory. 9 years later this has no value there (valgrind and ASAN etc are way better). If people need to know about it they can have a look at VCS logs. Closes #5973