summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* transfer: init the infilesize from the postfields...Daniel Stenberg2017-05-302-9/+7
| | | | | | | | | ... with a strlen() if no size was set, and do this in the pretransfer function so that the info is set early. Otherwise, the default strlen() done on the POSTFIELDS data never sets state.infilesize. Reported-by: Vincas Razma Bug: #1294
* mbedtls: fix variable shadow warningJay Satiro2017-05-291-3/+3
| | | | | | vtls/mbedtls.c:804:69: warning: declaration of 'entropy' shadows a global declaration [-Wshadow] CURLcode Curl_mbedtls_random(struct Curl_easy *data, unsigned char *entropy, ^~~~~~~
* ssh: fix 'left' may be used uninitializedDaniel Stenberg2017-05-251-1/+1
| | | | | | | follow-up to f31760e63b4e Reported-by: Michael Kaufmann Bug: https://github.com/curl/curl/pull/1495#issuecomment-303982793
* time: fix type conversions and compiler warningsMichael Kaufmann2017-05-245-17/+20
| | | | | | | | | Fix bugs and compiler warnings on systems with 32-bit long and 64-bit time_t. Reviewed-by: Daniel Stenberg Closes #1499
* redirect: store the "would redirect to" URL when max redirs is reachedDaniel Stenberg2017-05-232-34/+29
| | | | | | | | | Test 1261 added to verify. Reported-by: Lloyd Fournier Fixes #1489 Closes #1497
* LDAP: fixed checksrc issueSergei Nikulov2017-05-241-2/+2
|
* LDAP: using ldap_bind_s on Windows with methods (#878)Sergei Nikulov2017-05-231-16/+85
| | | | | | | | * LDAP: using ldap_bind_s on Windows with methods(BASIC/DIGEST/NTLM/AUTONEG) * ldap: updated per build options handling * ldap: fixed logic for auth selection
* cmake: fix build on Ubuntu 14.04Akhil Kedia2017-05-231-2/+2
| | | | | | | | | | | Fixed a syntax error with setting cache variables (The type and docstring were missing), resulting in build errors. Quoted the CURL_CA_PATH and CURL_CA_BUNDLE otherwise the path was written without quotes in C code, resulting in build errors. Closes #1503 Signed-off-by: Akhil <akhil.kedia@samsung.com>
* url: fix declaration of 'pipe' shadows a global declarationDaniel Stenberg2017-05-231-10/+11
| | | | follow-up to 4cdb1be8246c
* memdebug: fix compilation failureKamil Dudka2017-05-221-1/+1
| | | | | | | | .... caused by a typo in the last commit (fixing issue #1504): memdebug.c: In function ‘curl_fclose’: memdebug.c:444:3: error: implicit declaration of function ‘DEBUGDEBUGASSERT’ [-Werror=implicit-function-declaration]
* assert: avoid, use DEBUGASSERT instead!Daniel Stenberg2017-05-224-18/+12
| | | | | | | ... as it does extra checks to actually work. Reported-by: jonrumsey at github Fixes #1504
* cmake: Add CURL_CA_FALLBACK to curl_config.h.cmakeSimon Warta2017-05-211-0/+3
| | | | This is for symmetry with the autoconf generated curl_config.h.in
* ssh: ignore timeouts during disconnectDaniel Stenberg2017-05-201-12/+15
| | | | | | | | | | | | ... as otherwise it risks not cleaning up the libssh2 handle properly which leads to memory leak! Assisted-by: Joel Depooter Closes #1495 Closes #1479 Bug: https://curl.haxx.se/mail/lib-2017-04/0024.html
* darwinssl: Fix exception when processing a client-side certificate fileNick Zitzmann2017-05-161-1/+1
| | | | | | if no error was raised by the API but the SecIdentityRef was null Fixes #1450
* curl_sasl: fix build error with CURL_DISABLE_CRYPTO_AUTH + USE_NTLMDaniel Stenberg2017-05-161-2/+2
| | | | | Reported-by: wyattoday at github Fixes #1487
* SecureTransport/DarwinSSL: Implement public key pinningmoparisthebest2017-05-152-0/+180
| | | | Closes #1400
* url.c: add a compile-time check that CURL_MAX_WRITE_SIZE is large enoughDan Fandrich2017-05-131-0/+9
| | | | | | Some code (e.g. Curl_fillreadbuffer) assumes that this buffer is not exceedingly tiny and will break if it is. This same check is already done at run time in the CURLOPT_BUFFERSIZE option.
* multi: remove leftover debug infof() calls from e9fd794a6Daniel Stenberg2017-05-121-3/+0
|
* pipeline: fix mistakenly trying to pipeline POSTsDaniel Stenberg2017-05-121-23/+27
| | | | | | | | | | | | | The function IsPipeliningPossible() would return TRUE if either pipelining OR HTTP/2 were possible on a connection, which would lead to it returning TRUE even for POSTs on HTTP/1 connections. It now returns a bitmask so that the caller can differentiate which kind the connection allows. Fixes #1481 Closes #1483 Reported-by: stootill at github
* mbedtls: Support server renegotiation requestRon Eldor2017-05-121-0/+5
| | | | | | Tested with servers: IIS 7.5; OpenSSL 1.0.2. Closes https://github.com/curl/curl/pull/1475
* formdata: fix -Wcomma warningMarcel Raad2017-05-111-1/+1
| | | | | | | clang 5.0 complains: possible misuse of comma operator here [-Wcomma] Change the comma to a semicolon to fix that.
* multi: use a fixed array of timers instead of mallocDaniel Stenberg2017-05-1012-70/+66
| | | | | | | | | | ... since the total amount is low this is faster, easier and reduces memory overhead. Also, Curl_expire_done() can now mark an expire timeout as done so that it never times out. Closes #1472
* multi: assign IDs to all timers and make each timer singletonDaniel Stenberg2017-05-1010-39/+98
| | | | | | | A) reduces the timeout lists drastically B) prevents a lot of superfluous loops for timers that expires "in vain" when it has actually already been extended to fire later on
* formboundary: convert assert into run-time checkDaniel Stenberg2017-05-091-1/+2
| | | | | | | | | ... to really make sure the boundary fits in the target buffer. Fixes unused parameter 'buflen' warning. Reported-by: Michael Kaufmann Bug: https://github.com/curl/curl/pull/1468#issuecomment-300078754
* rand: treat fake entropy the same regardless of endiannessJay Satiro2017-05-085-54/+87
| | | | | | | | | | | | | | | | | When the random seed is purposely made predictable for testing purposes by using the CURL_ENTROPY environment variable, process that data in an endian agnostic way so the the initial random seed is the same regardless of endianness. - Change Curl_rand to write to a char array instead of int array. - Add Curl_rand_hex to write random hex characters to a buffer. Fixes #1315 Closes #1468 Co-authored-by: Daniel Stenberg Reported-by: Michael Kaufmann
* asyn-thread: fix unused macro warningsMarcel Raad2017-05-071-5/+5
| | | | Don't do anything in this file if CURLRES_THREADED is not defined.
* tftp: silence bad-function-cast warningMarcel Raad2017-05-071-2/+6
| | | | | The cases this warns about are handled elsewhere, so just use an intermediate variable to silence the warning.
* schannel: return a more specific error code for SEC_E_UNTRUSTED_ROOTDan Fandrich2017-05-041-1/+2
|
* curl_setup_once: use SEND_QUAL_ARG2 for swriteMarcel Raad2017-05-041-1/+1
| | | | | | | SEND_QUAL_ARG2 had to be set, but was never used. Use it in swrite to avoid warnings about casting away low-level const. Closes https://github.com/curl/curl/pull/1464
* lib: fix compiler warningsMarcel Raad2017-05-032-3/+3
| | | | | | | | Fix the following warnings when building the tests by using the correct types: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] implicit conversion changes signedness [-Wsign-conversion]
* Telnet: Write full buffer instead of byte-by-byteRichard Hsu2017-05-021-31/+51
| | | | | | | | Previous TODO wanting to write in chunks. We should support writing more at once since some TELNET servers may respond immediately upon first byte written such as WHOIS servers. Closes #1389
* gtls: fixed a lingering BUFSIZE referenceDan Fandrich2017-05-022-4/+5
|
* ssh: fix compiler warning from e40e9d7f0deDaniel Stenberg2017-05-021-1/+1
|
* url: let CURLOPT_BUFFERSIZE realloc to smaller sizes tooDaniel Stenberg2017-05-021-2/+2
| | | | Closes #1449
* BUFSIZE: rename to READBUFFER_*, make separate MASTERBUF_SIZEDaniel Stenberg2017-05-013-18/+18
|
* openssl: use local stack for temp storageDaniel Stenberg2017-05-011-8/+8
|
* sendf: remove use of BUFSIZE from debug data conversionsDaniel Stenberg2017-05-011-25/+26
| | | | The buffer can have other sizes.
* buffer: use data->set.buffer_size instead of BUFSIZEDaniel Stenberg2017-05-018-27/+26
| | | | ... to properly use the dynamically set buffer size!
* krb5: use private buffer for temp string, not receive bufferDaniel Stenberg2017-05-011-5/+9
|
* upload: UPLOAD_BUFSIZE is now for the upload bufferDaniel Stenberg2017-05-014-4/+8
|
* http-proxy: use a dedicated CONNECT response bufferDaniel Stenberg2017-05-013-15/+42
| | | | | To make it suitably independent of the receive buffer and its flexible size.
* transfer: fix minor buffer_size mistakeDaniel Stenberg2017-05-011-2/+1
|
* failf: use private buffer, don't clobber receive bufferDaniel Stenberg2017-05-011-8/+7
|
* pingpong: use the set buffer sizeDaniel Stenberg2017-05-011-6/+9
|
* http2: use the correct set buffer sizeDaniel Stenberg2017-05-011-1/+1
|
* http: don't clobber the receive buffer for timecondDaniel Stenberg2017-05-011-19/+21
|
* buffer_size: make sure it always has the correct sizeDaniel Stenberg2017-05-015-4/+4
| | | | Removes the need for CURL_BUFSIZE
* file: use private buffer for C-L outputDaniel Stenberg2017-05-011-4/+5
| | | | ... instead of clobbering the download buffer.
* CURLOPT_BUFFERSIZE: 1024 bytes is now the minimum sizeDaniel Stenberg2017-05-012-6/+10
| | | | | | The buffer is needed to receive FTP, HTTP CONNECT responses etc so already at this size things risk breaking and smaller is certainly not wise.
* ftp: use private buffer for temp storage, not receive bufferDaniel Stenberg2017-05-011-10/+12
|