summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* formdata.c: Fixed compilation warningSteve Holme2016-03-181-1/+1
| | | | | | | | | | | | | | | formdata.c:390: warning: cast from pointer to integer of different size Introduced in commit ca5f9341ef this happens because a char*, which is 32-bits wide in 32-bit land, is being cast to a curl_off_t which is 64-bits wide where 64-bit integers are supported by the compiler. This doesn't happen in 64-bit land as a pointer is the same size as a curl_off_t. This fix doesn't address the fact that a 64-bit value cannot be used for CURLFORM_CONTENTLEN when set in a form array and compiled on a 32-bit platforms, it does at least suppress the compilation warning.
* openssl: adapt to API breakage in ERR_remove_thread_state()Gisle Vanem2016-03-171-1/+7
| | | | | | | The OpenSSL API change that broke this is "Convert ERR_STATE to new multi-threading API": openssl commit 8509dcc. Closes #713
* version: init moved to private name space, added protosDaniel Stenberg2016-03-172-4/+6
| | | | follow-up to 80015cdd52145
* openssl: verbose: show matching SAN patternDaniel Stenberg2016-03-171-27/+30
| | | | | | | | ... to allow users to see which specfic wildcard that matched when such is used. Also minor logic cleanup to simplify the code, and I removed all tabs from verbose strings.
* version: thread safetyJay Satiro2016-03-162-2/+26
|
* transfer: Removed redundant HTTP authentication include filesSteve Holme2016-03-161-5/+1
| | | | | It would also seem that share.h is not required here either as there are no references to the Curl_share structure or functions.
* easy: Removed redundant HTTP authentication include filesSteve Holme2016-03-161-1/+0
|
* curl_sasl: Minor code indent fixesSteve Holme2016-03-151-58/+58
|
* easy: add check to malloc() when running event-basedDaniel Stenberg2016-03-141-9/+13
| | | | ... to allow torture tests then too.
* memdebug: skip logging the limit countdown, fflush when reachedDaniel Stenberg2016-03-141-5/+2
|
* curl_sasl.c: minor code indent fixesDaniel Stenberg2016-03-141-29/+29
|
* multi: simplified singlesocketDaniel Stenberg2016-03-141-49/+40
| | | | | Since sh_getentry() now checks for invalid sockets itself and by narrowing the scope of the remove_sock_from_hash variable.
* multi: introduce sh_getentry() for looking up sockets in the sockhashDaniel Stenberg2016-03-141-22/+20
| | | | | | | Simplify the code by using a single entry that looks for a socket in the socket hash. As indicated in #712, the code looked for CURL_SOCKET_BAD at some point and that is ineffective/wrong and this makes it easier to avoid that.
* multi hash: ensure modulo performed on curl_socket_tJaime Fullaondo2016-03-141-3/+3
| | | | Closes #712
* base64: Minor coding standard and style updatesSteve Holme2016-03-131-6/+12
|
* base64: Use 'CURLcode result' for curl result codesSteve Holme2016-03-131-5/+5
|
* negotiate: Use 'CURLcode result' for curl result codesSteve Holme2016-03-131-7/+9
|
* multi_runsingle: avoid loop in CURLM_STATE_WAITPROXYCONNECTMaksim Kuzevanov2016-03-131-2/+4
| | | | Closes #703
* digest: Use boolean based success code for Curl_sasl_digest_get_pair()Steve Holme2016-03-123-15/+14
| | | | | Rather than use a 0 and 1 integer base result code use a TRUE / FALSE based success code.
* digest: Corrected some typos in commentsSteve Holme2016-03-121-9/+9
|
* krb5: Corrected some typos in function descriptionsSteve Holme2016-03-122-10/+10
|
* ntlm: Corrected some typos in function descriptionsSteve Holme2016-03-123-16/+16
|
* url: Corrected indentation when calling idna_to_ascii_lz()Steve Holme2016-03-111-23/+19
|
* idn_win32: Use boolean based success codesSteve Holme2016-03-112-16/+19
| | | | | Rather than use 0 and 1 integer base result codes use a FALSE / TRUE based success code.
* idn_win32.c: warning: Trailing whitespaceDaniel Stenberg2016-03-101-1/+1
|
* idn_win32.c: Fixed compilation warning from commit 9e7fcd4291Steve Holme2016-03-101-4/+7
| | | | | warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
* ftp: remove a check for NULL(!)Daniel Stenberg2016-03-101-6/+7
| | | | | | ... as it implies we need to check for that on all the other variable references as well (as Coverity otherwise warns us for missing NULL checks), and we're alredy making sure that the pointer is never NULL.
* cookies: first n/v pair in Set-Cookie: is the cookie, then parametersDaniel Stenberg2016-03-101-9/+10
| | | | | | | | | | | | | | | | | | | RFC 6265 section 4.1.1 spells out that the first name/value pair in the header is the actual cookie name and content, while the following are the parameters. libcurl previously had a more liberal approach which causes significant problems when introducing new cookie parameters, like the suggested new cookie priority draft. The previous logic read all n/v pairs from left-to-right and the first name used that wassn't a known parameter name would be used as the cookie name, thus accepting "Set-Cookie: Max-Age=2; person=daniel" to be a cookie named 'person' while an RFC 6265 compliant parser should consider that to be a cookie named 'Max-Age' with an (unknown) parameter 'person'. Fixes #709
* krb5: improved type handling to avoid clang compiler warningsDaniel Stenberg2016-03-101-9/+6
|
* url.c: fix clang warning: no newline at end of fileDaniel Stenberg2016-03-101-1/+1
|
* curl_multi_wait: never return -1 in 'numfds'Daniel Stenberg2016-03-101-10/+11
| | | | | | | | | | Such a return value isn't documented but could still happen, and the curl tool code checks for it. It would happen when the underlying Curl_poll() function returns an error. Starting now we mask that error as a user of curl_multi_wait() would have no way to handle it anyway. Reported-by: Jay Satiro Closes #707
* imap/pop3/smtp: Fixed connections upgraded with TLS are not reusedSteve Holme2016-03-085-9/+149
| | | | | | | Regression since commit 710f14edba. Bug: https://github.com/curl/curl/issues/422 Reported-by: Justin Ehlert
* cookie: do not refuse cookies for localhostTim Rühsen2016-03-081-4/+6
| | | | Closes #658
* ftp_done: clear tunnel_state when secondary socket closesDaniel Stenberg2016-03-081-15/+15
| | | | | | | | Introducing a function for closing the secondary connection to make this bug less likely to happen again. Reported-by: daboul Closes #701
* openssl: use the correct OpenSSL/BoringSSL/LibreSSL in messagesGisle Vanem2016-03-081-15/+24
|
* pipeline: Sanity check pipeline pointer before accessing it.Anders Bakken2016-03-082-11/+14
| | | | | | | | | | | | I got a crash with this stack: curl/lib/url.c:2873 (Curl_removeHandleFromPipeline) curl/lib/url.c:2919 (Curl_getoff_all_pipelines) curl/lib/multi.c:561 (curl_multi_remove_handle) curl/lib/url.c:415 (Curl_close) curl/lib/easy.c:859 (curl_easy_cleanup) Closes #704
* mprintf: update trio project linkJay Satiro2016-03-061-1/+1
|
* makefile.m32: add missing libs for static -winssl-ssh2 buildsViktor Szakats2016-03-051-0/+5
| | | | Bug: https://github.com/curl/curl/pull/693
* mbedtls: fix user-specified SSL protocol versionJay Satiro2016-03-051-4/+21
| | | | | | Prior to this change when a single protocol CURL_SSLVERSION_ was specified by the user that version was set only as the minimum version but not as the maximum version as well.
* makefile.m32: fix to allow -ssh2-winssl combinationViktor Szakats2016-03-051-0/+2
| | | | | | | In makefile.m32, option -ssh2 (libssh2) automatically implied -ssl (OpenSSL) option, with no way to override it with -winssl. Since both libssh2 and curl support using Windows's built-in SSL backend, modify the logic to allow that combination.
* cookie: Don't expire session cookies in remove_expiredJay Satiro2016-03-051-1/+1
| | | | | | | | Prior to this change cookies with an expiry date that failed parsing and were converted to session cookies could be purged in remove_expired. Bug: https://github.com/curl/curl/issues/697 Reported-by: Seth Mos
* cookie: remove redundant checkDaniel Stenberg2016-03-031-18/+15
| | | | | | | ... as it was already checked previously within the function. Reported-by: Dmitry-Me Closes #695
* url: if Curl_done is premature then pipeline not in useAnders Bakken2016-03-011-1/+2
| | | | | | | Prevent a crash if 2 (or more) requests are made to the same host and pipelining is enabled and the connection does not complete. Bug: https://github.com/curl/curl/pull/690
* makefile.m32: allow to pass .dll/.exe-specific LDFLAGSViktor Szakats2016-03-011-1/+1
| | | | | | | | | | | | using envvars `CURL_LDFLAG_EXTRAS_DLL` and `CURL_LDFLAG_EXTRAS_EXE` respectively. This is useful f.e. to pass ASLR-related extra options, that are required to make this feature work when using the mingw toolchain. Ref: https://github.com/curl/curl/pull/670#issuecomment-190863985 Closes https://github.com/curl/curl/pull/689
* formpost: fix memory leaks in AddFormData error branchesDaniel Stenberg2016-02-291-11/+25
| | | | | Reported-by: Dmitry-Me Fixes #688
* getinfo: Fix syntax error when mbedTLSJay Satiro2016-02-281-1/+1
| | | | | The assignment of the mbedTLS TLS session info in the parent commit was incorrect. Change the assignment to a pointer to the session structure.
* getinfo: Add support for mbedTLS TLS session infoJay Satiro2016-02-271-17/+13
| | | | .. and preprocessor check TLS session info is defined for all backends.
* file: try reading from files with no sizeDaniel Stenberg2016-02-251-8/+18
| | | | | | | | | | | Some systems have special files that report as 0 bytes big, but still contain data that can be read (for example /proc/cpuinfo on Linux). Starting now, a zero byte size is considered "unknown" size and will be read as far as possible anyway. Reported-by: Jesse Tan Closes #681
* Curl_read: check for activated HTTP/1 pipelining, not only requestedDaniel Stenberg2016-02-241-2/+5
| | | | | | | | | ... as when pipelining is used, we read things into a unified buffer and we don't do that with HTTP/2. This could then easily make programs that set CURLMOPT_PIPELINING = CURLPIPE_HTTP1|CURLPIPE_MULTIPLEX to get data intermixed or plain broken between HTTP/2 streams. Reported-by: Anders Bakken
* getinfo: CURLINFO_TLS_SSL_PTR supersedes CURLINFO_TLS_SESSIONJay Satiro2016-02-231-25/+32
| | | | | | | | | | | | | | | | | | | | | The two options are almost the same, except in the case of OpenSSL: CURLINFO_TLS_SESSION OpenSSL session internals is SSL_CTX *. CURLINFO_TLS_SSL_PTR OpenSSL session internals is SSL *. For backwards compatibility we couldn't modify CURLINFO_TLS_SESSION to return an SSL pointer for OpenSSL. Also, add support for the 'internals' member to point to SSL object for the other backends axTLS, PolarSSL, Secure Channel, Secure Transport and wolfSSL. Bug: https://github.com/curl/curl/issues/234 Reported-by: dkjjr89@users.noreply.github.com Bug: https://curl.haxx.se/mail/lib-2015-09/0127.html Reported-by: Michael König