Daniel Stenberg [Sun, 19 Jun 2016 21:21:54 +0000 (23:21 +0200)]
openssl: use more 'const' to fix build warnings with 1.1.0 branch
Daniel Stenberg [Fri, 17 Jun 2016 08:40:20 +0000 (10:40 +0200)]
curl.1: missed 'T' in the progress unit suffixes
Daniel Stenberg [Thu, 16 Jun 2016 22:32:34 +0000 (00:32 +0200)]
curl.1: mention the unix for the progress meter
Patrick Monnerat [Thu, 16 Jun 2016 17:05:42 +0000 (19:05 +0200)]
os400: add new definitions to ILE/RPG binding.
Daniel Stenberg [Wed, 15 Jun 2016 13:36:40 +0000 (15:36 +0200)]
openssl: fix cert check with non-DNS name fields present
Regression introduced in
5f5b62635 (released in 7.48.0)
Reported-by: Fabian Ruff
Fixes #875
Dan Fandrich [Thu, 16 Jun 2016 06:44:08 +0000 (08:44 +0200)]
axtls: Use Curl_wait_ms instead of the less-portable usleep
Dan Fandrich [Thu, 16 Jun 2016 06:29:10 +0000 (08:29 +0200)]
axtls: Fixed compile after compile
31c521b0
Dan Fandrich [Wed, 15 Jun 2016 21:04:48 +0000 (23:04 +0200)]
tests: Added HTTP proxy keywords to tests 1141 & 1142
Sergei Nikulov [Tue, 14 Jun 2016 14:11:48 +0000 (17:11 +0300)]
cmake: Fix build with winldap
Bug: https://github.com/curl/curl/pull/874
Reported-by: Sergei Nikulov
Jay Satiro [Sat, 11 Jun 2016 21:33:16 +0000 (17:33 -0400)]
CURLOPT_POSTFIELDS.3: Clarify what happens when set empty
When CURLOPT_POSTFIELDS is set to an empty string libcurl will send a
zero-byte POST. Prior to this change it was documented as sending data
from the read callback.
This also changes the wording of what happens when empty or NULL so that
it's hopefully easier to understand for people whose primary language
isn't English.
Bug: https://github.com/curl/curl/issues/862
Reported-by: Askar Safin
Michael Wallner [Tue, 7 Jun 2016 05:51:34 +0000 (07:51 +0200)]
curl_multi_socket_action.3: Fix rewording
- Remove some erroneous text.
Closes https://github.com/curl/curl/pull/865
Luo Jinghua [Tue, 7 Jun 2016 23:23:54 +0000 (07:23 +0800)]
resolve: enable protocol family logic for synthesized IPv6
- Enable protocol family logic for IPv6 resolves even when support
for synthesized addresses is enabled.
This is a follow up to the parent commit that added support for
synthesized IPv6 addresses from IPv4 on iOS/OS X. The protocol family
logic needed for IPv6 was inadvertently excluded if support for
synthesized addresses was enabled.
Bug: https://github.com/curl/curl/issues/863
Ref: https://github.com/curl/curl/pull/866
Ref: https://github.com/curl/curl/pull/867
Luo Jinghua [Tue, 7 Jun 2016 10:11:37 +0000 (18:11 +0800)]
resolve: add support for IPv6 DNS64/NAT64 Networks on OS X + iOS
Use getaddrinfo() to resolve the IPv4 address literal on iOS/Mac OS X.
If the current network interface doesn’t support IPv4, but supports
IPv6, NAT64, and DNS64.
Closes #866
Fixes #863
Daniel Stenberg [Sun, 5 Jun 2016 09:28:31 +0000 (11:28 +0200)]
tests: two more HTTP/2 tests
1701 and 1702
Daniel Stenberg [Sun, 5 Jun 2016 09:17:29 +0000 (11:17 +0200)]
runtests: don't display logs when http2 server fails to start
Daniel Stenberg [Fri, 3 Jun 2016 21:54:06 +0000 (23:54 +0200)]
runtests: make stripfile work on stdout as well
... and have test 1700 use that to strip out the nghttpx server: headers
Daniel Stenberg [Fri, 3 Jun 2016 21:36:10 +0000 (23:36 +0200)]
http2-tests: test1700 is the first real HTTP/2 test
It requires that 'nghttpx' is in the PATH, and it will run the tests
using nghttpx as a front-end proxy in front of the standard HTTP/1 test
server. This uses HTTP/2 over plain TCP.
If you like me have nghttpx installed in a custom path, you can run test 1700
like this:
$ PATH=$PATH:$HOME/build-nghttp2/bin/ ./runtests.pl 1700
Daniel Stenberg [Mon, 6 Jun 2016 21:23:44 +0000 (23:23 +0200)]
RELEASE-NOTES: synced with
34855feeb4c299
Steve Holme [Mon, 6 Jun 2016 19:53:30 +0000 (20:53 +0100)]
schannel: Disable ALPN on Windows < 8.1
Calling QueryContextAttributes with SECPKG_ATTR_APPLICATION_PROTOCOL
fails on Windows < 8.1 so we need to disable ALPN on these OS versions.
Inspiration provide by: Daniel Seither
Closes #848
Fixes #840
Jay Satiro [Mon, 6 Jun 2016 01:07:03 +0000 (21:07 -0400)]
checksrc: Add LoadLibrary to the banned functions list
LoadLibrary was supplanted by Curl_load_library for security
reasons in
6df916d.
Jay Satiro [Sun, 5 Jun 2016 07:13:32 +0000 (03:13 -0400)]
http: Fix HTTP/2 connection reuse
- Change the parser to not require a minor version for HTTP/2.
HTTP/2 connection reuse broke when we changed from HTTP/2.0 to HTTP/2
in
8243a95 because the parser still expected a minor version.
Bug: https://github.com/curl/curl/issues/855
Reported-by: Andrew Robbins, Frank Gevaerts
Steve Holme [Sat, 4 Jun 2016 20:52:08 +0000 (21:52 +0100)]
connect.c: Fixed compilation warning from commit
332e8d6164
connect.c:952:5: warning: suggest explicit braces to avoid ambiguous 'else'
Steve Holme [Sat, 4 Jun 2016 19:58:39 +0000 (20:58 +0100)]
win32: Used centralised verify windows version function
Closes #845
Steve Holme [Sat, 4 Jun 2016 19:51:32 +0000 (20:51 +0100)]
win32: Added verify windows version functionality
Steve Holme [Sat, 4 Jun 2016 19:06:56 +0000 (20:06 +0100)]
win32: Introduced centralised verify windows version function
Kamil Dudka [Fri, 3 Jun 2016 09:26:20 +0000 (11:26 +0200)]
tool_urlglob: fix off-by-one error in glob_parse()
... causing SIGSEGV while parsing URL with too many globs.
Minimal example:
$ curl $(for i in $(seq 101); do printf '{a}'; done)
Reported-by: Romain Coltel
Bug: https://bugzilla.redhat.com/
1340757
Benjamin Kircher [Wed, 1 Jun 2016 17:02:18 +0000 (19:02 +0200)]
libcurl-multi.3: fix small typo
Closes #850
Viktor Szakats [Wed, 1 Jun 2016 08:35:38 +0000 (10:35 +0200)]
makefile.m32: add crypt32 for winssl builds
Dependency added by
6cabd78
Closes #849
Ivan Avdeev [Wed, 1 Jun 2016 07:30:03 +0000 (09:30 +0200)]
vtls: fix ssl session cache race condition
Sessionid cache management is inseparable from managing individual
session lifetimes. E.g. for reference-counted sessions (like those in
SChannel and OpenSSL engines) every session addition and removal
should be accompanied with refcount increment and decrement
respectively. Failing to do so synchronously leads to a race condition
that causes symptoms like use-after-free and memory corruption.
This commit:
- makes existing session cache locking explicit, thus allowing
individual engines to manage lock's scope.
- fixes OpenSSL and SChannel engines by putting refcount management
inside this lock's scope in relevant places.
- adds these explicit locking calls to other engines that use
sessionid cache to accommodate for this change. Note, however,
that it is unknown whether any of these engines could also have
this race.
Bug: https://github.com/curl/curl/issues/815
Fixes #815
Closes #847
Andrew Kurushin [Wed, 1 Jun 2016 06:48:30 +0000 (08:48 +0200)]
schannel: add CURLOPT_CERTINFO support
Closes #822
Daniel Stenberg [Tue, 31 May 2016 21:33:48 +0000 (23:33 +0200)]
RELEASE-NOTES: synced with
142ee9fa15002315
Daniel Stenberg [Tue, 31 May 2016 17:54:35 +0000 (19:54 +0200)]
openssl: rename the private SSL_strerror
... to make it not look like an OpenSSL function
Michael Kaufmann [Tue, 31 May 2016 14:25:56 +0000 (16:25 +0200)]
openssl: Use correct buffer sizes for error messages
Closes #844
Daniel Stenberg [Tue, 31 May 2016 12:13:33 +0000 (14:13 +0200)]
curl: fix -q [regression]
This broke in 7.49.0 with commit
e200034425a7625
Fixes #842
Daniel Stenberg [Sun, 8 May 2016 13:11:10 +0000 (15:11 +0200)]
URL parser: allow URLs to use one, two or three slashes
Mostly in order to support broken web sites that redirect to broken URLs
that are accepted by browsers.
Browsers are typically even more leniant than this as the WHATWG URL
spec they should allow an _infinite_ amount. I tested 8000 slashes with
Firefox and it just worked.
Added test case 1141, 1142 and 1143 to verify the new parser.
Closes #791
Renaud Lehoux [Mon, 30 May 2016 15:26:10 +0000 (17:26 +0200)]
cmake: Added missing mbedTLS support
Closes #837
Renaud Lehoux [Mon, 30 May 2016 16:10:23 +0000 (18:10 +0200)]
mbedtls: removed unused variables
Closes #838
Frank Gevaerts [Wed, 11 May 2016 12:23:37 +0000 (14:23 +0200)]
http: add CURLINFO_HTTP_VERSION and %{http_version}
Adds access to the effectively used http version to both libcurl and
curl.
Closes #799
Daniel Stenberg [Mon, 30 May 2016 20:55:54 +0000 (22:55 +0200)]
bump: start the journey toward 7.50.0
Marcel Raad [Mon, 30 May 2016 11:26:20 +0000 (13:26 +0200)]
openssl: fix build with OPENSSL_NO_COMP
With OPENSSL_NO_COMP defined, there is no function
SSL_COMP_free_compression_methods
Closes #836
Gisle Vanem [Mon, 30 May 2016 09:43:04 +0000 (11:43 +0200)]
memdebug: fix MSVC crash with -DMEMDEBUG_LOG_SYNC
Fixes #828
Jonathan [Mon, 30 May 2016 08:46:35 +0000 (10:46 +0200)]
README.md: polish
Closes #834
Daniel Stenberg [Mon, 30 May 2016 06:21:16 +0000 (08:21 +0200)]
RELEASE-NOTES: fix vuln link
Daniel Stenberg [Fri, 27 May 2016 14:58:43 +0000 (16:58 +0200)]
RELEASE-NOTES: 7.49.1
Steve Holme [Sun, 29 May 2016 20:57:40 +0000 (22:57 +0200)]
loadlibrary: Only load system DLLs from the system directory
Inspiration provided by: Daniel Stenberg and Ray Satiro
Bug: https://curl.haxx.se/docs/adv_20160530.html
Ref: Windows DLL hijacking with curl, CVE-2016-4802
Daniel Stenberg [Mon, 30 May 2016 06:14:13 +0000 (08:14 +0200)]
ssh: fix version number check typo
Jay Satiro [Sun, 29 May 2016 20:27:44 +0000 (16:27 -0400)]
curl_share_setopt.3: Add min ver needed for ssl session lock
Bug: https://github.com/curl/curl/issues/826
Reported-by: Michael Wallner
Daniel Stenberg [Sat, 28 May 2016 22:20:14 +0000 (00:20 +0200)]
ssh: fix build for libssh2 before 1.2.6
The statvfs functionality was added to libssh2 in that version, so we
switch off that functionality when built with older libraries.
Fixes #831
Daniel Stenberg [Tue, 24 May 2016 10:14:18 +0000 (12:14 +0200)]
mbedtls: fix includes so snprintf() works
Regression from the previous *printf() rearrangements, this file missed to
include the correct header to make sure snprintf() works universally.
Reported-by: Moti Avrahami
Bug: https://curl.haxx.se/mail/lib-2016-05/0196.html
Steve Holme [Mon, 23 May 2016 11:13:41 +0000 (12:13 +0100)]
checksrc.pl: Added variants of strcat() & strncat() to banned function list
Added support for checking the tchar, unicode and mbcs variants of
strcat() and strncat() in the banned function list.
Daniel Stenberg [Mon, 23 May 2016 10:59:58 +0000 (12:59 +0200)]
smtp: minor ident (white space) fixes
Daniel Stenberg [Mon, 23 May 2016 08:08:34 +0000 (10:08 +0200)]
THANKS: updated after script fixes
Now giving credit properly to github user names, fixed some UTF-8 issues
and added names discovered when contrithanks was improved.
Daniel Stenberg [Mon, 23 May 2016 08:08:15 +0000 (10:08 +0200)]
THANKS-filter: more name cleanups
Daniel Stenberg [Mon, 23 May 2016 08:07:48 +0000 (10:07 +0200)]
contrithanks.sh: exclude existing names case insensitively
Daniel Stenberg [Mon, 23 May 2016 07:14:19 +0000 (09:14 +0200)]
contrithanks.sh: use same grep pattern and -a flag as contributors.sh
Daniel Stenberg [Mon, 23 May 2016 07:13:43 +0000 (09:13 +0200)]
contributors.sh: better grep pattern, use grep -a
Daniel Stenberg [Mon, 23 May 2016 07:13:20 +0000 (09:13 +0200)]
THANKS-filter: fix more names
Daniel Stenberg [Mon, 23 May 2016 06:50:53 +0000 (08:50 +0200)]
contrithanks.sh: do the same github fix as contributors.sh
from
1577bfa35ba
Jay Satiro [Mon, 23 May 2016 06:42:12 +0000 (02:42 -0400)]
contributors: Show GitHub username if real name unknown
Prior to this change if a GitHub contributor's real name was unknown
they would be omitted from the list.
Bug: https://github.com/curl/curl/issues/824
Daniel Stenberg [Sat, 21 May 2016 14:05:54 +0000 (16:05 +0200)]
RELEASE-NOTES: synced with
3caaeffbe8ded4
Jay Satiro [Fri, 20 May 2016 20:44:01 +0000 (16:44 -0400)]
openssl: cleanup must free compression methods
- Free compression methods if OpenSSL 1.0.2 to avoid a memory leak.
Bug: https://github.com/curl/curl/issues/817
Reported-by: jveazey@users.noreply.github.com
Gisle Vanem [Fri, 20 May 2016 14:50:04 +0000 (16:50 +0200)]
curl_multibyte: fix compiler error
While compiling lib/curl_multibyte.c with '-DUSE_WIN32_IDN' etc. I was
getting:
f:\mingw32\src\inet\curl\lib\memdebug.h(38): error C2054: expected '('
to follow 'CURL_EXTERN'
f:\mingw32\src\inet\curl\lib\memdebug.h(38): error C2085:
'curl_domalloc': not in formal parameter list
Daniel Stenberg [Fri, 20 May 2016 14:44:34 +0000 (16:44 +0200)]
THANKS-filter: make Jan-E get proper credit
Jan-E [Thu, 19 May 2016 20:35:50 +0000 (22:35 +0200)]
winbuild/Makefile.vc: Fix check on SSL, MBEDTLS, WINSSL exclusivity
Closes #818
Alexander Traud [Fri, 20 May 2016 12:57:48 +0000 (14:57 +0200)]
libcurl.m4: Avoid obsolete warning
Closes #821
Michael Kaufmann [Thu, 19 May 2016 22:06:40 +0000 (00:06 +0200)]
CURLOPT_CONNECT_TO.3: user must not free the list prematurely
The connect-to list isn't copied so as long as the handle may be used
for a transfer the list must be valid.
Bug: https://github.com/curl/curl/pull/819
Reported-by: Michael Kaufmann
Daniel Stenberg [Thu, 19 May 2016 12:01:30 +0000 (14:01 +0200)]
RELEASE-NOTES: synced with
48114a8634242c
Daniel Stenberg [Thu, 19 May 2016 09:39:59 +0000 (11:39 +0200)]
openssl: ERR_remove_thread_state() is deprecated in latest 1.1.0
See OpenSSL commit
21e001747d4a
Daniel Stenberg [Thu, 19 May 2016 09:16:30 +0000 (11:16 +0200)]
http2: use HTTP/2 in the HTTP/1.1-alike header
... when generating them, not "2.0" as the protocol is called just
HTTP/2 and nothing else.
Jay Satiro [Thu, 19 May 2016 07:13:07 +0000 (03:13 -0400)]
dist: include curl_multi_socket_all.3
Closes https://github.com/curl/curl/pull/816
Steve Holme [Wed, 18 May 2016 16:47:38 +0000 (17:47 +0100)]
bump: Start work on 7.49.1
Daniel Stenberg [Wed, 18 May 2016 12:10:36 +0000 (14:10 +0200)]
curlbuild.h.dist: check __LP64__ as well to fix MIPS build
The preprocessor check that sets up the 32bit defines for non-configure
builds didn't work properly for MIPS systems as __mips__ is defined for
both 32bit and 64bit. Now __LP64__ is also checked and indicates 64bit.
Reported-by: Tomas Jakobsson
Fixes #813
Marcel Raad [Wed, 18 May 2016 09:54:58 +0000 (11:54 +0200)]
schannel: fix compile break with MSVC XP toolset
For the Windows XP toolset of Visual C++ 2013/2015, the old Windows SDK
7.1 is used. In this case, _USING_V110_SDK71_ is defined.
Closes #812
Daniel Stenberg [Wed, 18 May 2016 08:35:15 +0000 (10:35 +0200)]
dist: include CHECKSRC.md
Reported-by: Paul Howarth
Bug: https://curl.haxx.se/mail/lib-2016-05/0116.html
Daniel Stenberg [Wed, 18 May 2016 07:17:27 +0000 (09:17 +0200)]
test/Makefile.am: include manpage-scan.pl and nroff-scan.pl in dist
Reported-by: Ray Satiro
Bug: https://curl.haxx.se/mail/lib-2016-05/0113.html
Daniel Stenberg [Tue, 17 May 2016 12:50:19 +0000 (14:50 +0200)]
THANKS: 24 new names from 7.49.0 release notes
Daniel Stenberg [Tue, 17 May 2016 12:02:11 +0000 (14:02 +0200)]
RELEASE-NOTES: 7.49.0
Daniel Stenberg [Sun, 24 Apr 2016 15:52:18 +0000 (17:52 +0200)]
mbedtls/polarssl: set "hostname" unconditionally
...as otherwise the TLS libs will skip the CN/SAN check and just allow
connection to any server. curl previously skipped this function when SNI
wasn't used or when connecting to an IP address specified host.
CVE-2016-3739
Bug: https://curl.haxx.se/docs/adv_20160518A.html
Reported-by: Moti Avrahami
Frank Gevaerts [Tue, 17 May 2016 12:22:56 +0000 (14:22 +0200)]
CURLOPT_RESOLVE.3: fix typo
Closes #811
Daniel Stenberg [Tue, 17 May 2016 11:17:07 +0000 (13:17 +0200)]
docs: CURLOPT_RESOLVE overrides CURLOPT_IPRESOLVE
Daniel Stenberg [Tue, 17 May 2016 09:13:48 +0000 (11:13 +0200)]
KNOWN_BUGS: GnuTLS backend skips really long certificate fields
Closes #762
Daniel Stenberg [Tue, 17 May 2016 09:08:10 +0000 (11:08 +0200)]
CURLOPT_HTTPPOST.3: the data needs to be around while in use
Daniel Stenberg [Tue, 17 May 2016 07:34:33 +0000 (09:34 +0200)]
openssl: get_cert_chain: fix NULL dereference
CID
1361815: Explicit null dereferenced (FORWARD_NULL)
Daniel Stenberg [Tue, 17 May 2016 07:14:06 +0000 (09:14 +0200)]
openssl: get_cert_chain: avoid NULL dereference
CID
1361811: Explicit null dereferenced (FORWARD_NULL)
Daniel Stenberg [Tue, 17 May 2016 07:06:32 +0000 (09:06 +0200)]
dprintf_formatf: fix (false?) Coverity warning
CID
1024412: Memory - illegal accesses (OVERRUN). Claimed to happen when
we run over 'workend' but the condition says <= workend and for all I
can see it should be safe. Compensating for the warning by adding a byte
margin in the buffer.
Also, removed the extra brace level indentation in the code and made it
so that 'workend' is only assigned once within the function.
Daniel Stenberg [Mon, 16 May 2016 07:05:03 +0000 (09:05 +0200)]
RELEASE-NOTES: synced with
2dcb5adc72d6
Daniel Stenberg [Mon, 16 May 2016 07:04:13 +0000 (09:04 +0200)]
THANKS-filter: fixed Jonathan Cardoso
Jay Satiro [Mon, 16 May 2016 03:48:47 +0000 (23:48 -0400)]
ftp: fix incorrect out-of-memory code in Curl_pretransfer
- Return value type must match function type.
s/CURLM_OUT_OF_MEMORY/CURLE_OUT_OF_MEMORY/
Caught by Travis CI
Daniel Stenberg [Sat, 14 May 2016 22:37:36 +0000 (00:37 +0200)]
ftp wildcard: segfault due to init only in multi_perform
The proper FTP wildcard init is now more properly done in Curl_pretransfer()
and the corresponding cleanup in Curl_close().
The previous place of init/cleanup code made the internal pointer to be NULL
when this feature was used with the multi_socket() API, as it was made within
the curl_multi_perform() function.
Reported-by: Jonathan Cardoso Machado
Fixes #800
Jay Satiro [Fri, 13 May 2016 20:01:35 +0000 (16:01 -0400)]
libcurl-tlibcurl-thread: Update OpenSSL links
Because the old OpenSSL link now redirects to their master documentation
(currently 1.1.0), which does not document the required actions for
OpenSSL <= 1.0.2.
Viktor Szakats [Fri, 13 May 2016 07:25:54 +0000 (09:25 +0200)]
darwinssl.c: fix OS X codename typo in comment
Daniel Stenberg [Thu, 12 May 2016 22:18:53 +0000 (00:18 +0200)]
RELEASE-NOTES: synced with
68701e51c1f7
Added 8 bug fixes and 5 more contrbutors
Jay Satiro [Wed, 9 Mar 2016 07:59:05 +0000 (02:59 -0500)]
mprintf: Fix processing of width and prec args
Prior to this change a width arg could be erroneously output, and also
width and precision args could not be used together without crashing.
"%0*d%s", 2, 9, "foo"
Before: "092"
After: "09foo"
"%*.*s", 5, 2, "foo"
Before: crash
After: " fo"
Test 557 is updated to verify this and more
Michael Kaufmann [Thu, 12 May 2016 22:02:21 +0000 (00:02 +0200)]
ConnectionExists: follow-up fix for proxy re-use
Follow-up commit to
5823179
Closes #648
Per Malmberg [Thu, 12 May 2016 10:16:16 +0000 (12:16 +0200)]
darwinssl: fix certificate verification disable on OS X 10.8
The new way of disabling certificate verification doesn't work on
Mountain Lion (OS X 10.8) so we need to use the old way in that version
too. I've tested this solution on versions 10.7.5, 10.8, 10.9, 10.10.2
and 10.11.
Closes #802
Cory Benfield [Wed, 11 May 2016 11:35:05 +0000 (12:35 +0100)]
http2: Add space between colon and header value
curl's representation of HTTP/2 responses involves transforming the
response to a format that is similar to HTTP/1.1. Prior to this change,
curl would do this by separating header names and values with only a
colon, without introducing a space after the colon.
While this is technically a valid way to represent a HTTP/1.1 header
block, it is much more common to see a space following the colon. This
change introduces that space, to ensure that incautious tools are safely
able to parse the header block.
This also ensures that the difference between the HTTP/1.1 and HTTP/2
response layout is as minimal as possible.
Bug: https://github.com/curl/curl/issues/797
Closes #798
Fixes #797
Kamil Dudka [Thu, 12 May 2016 06:36:21 +0000 (08:36 +0200)]
openssl: fix compile-time warning in Curl_ossl_check_cxn()
... introduced in curl-7_48_0
-293-g2968c83:
Error: COMPILER_WARNING:
lib/vtls/openssl.c: scope_hint: In function ‘Curl_ossl_check_cxn’
lib/vtls/openssl.c:767:15: warning: conversion to ‘int’ from ‘ssize_t’
may alter its value [-Wconversion]
Jay Satiro [Thu, 12 May 2016 01:21:15 +0000 (21:21 -0400)]
openssl: stricter connection check function
- In the case of recv error, limit returning 'connection still in place'
to EINPROGRESS, EAGAIN and EWOULDBLOCK.
This is an improvement on the parent commit which changed the openssl
connection check to use recv MSG_PEEK instead of SSL_peek.
Ref: https://github.com/curl/curl/commit/
856baf5#comments
Anders Bakken [Tue, 10 May 2016 19:49:33 +0000 (12:49 -0700)]
TLS: SSL_peek is not a const operation
Calling SSL_peek can cause bytes to be read from the raw socket which in
turn can upset the select machinery that determines whether there's data
available on the socket.
Since Curl_ossl_check_cxn only tries to determine whether the socket is
alive and doesn't actually need to see the bytes SSL_peek seems like
the wrong function to call.
We're able to occasionally reproduce a connect timeout due to this
bug. What happens is that Curl doesn't know to call SSL_connect again
after the peek happens since data is buffered in the SSL buffer and thus
select won't fire for this socket.
Closes #795
Daniel Stenberg [Mon, 9 May 2016 14:50:11 +0000 (16:50 +0200)]
TLS: move the ALPN/NPN enable bits to the connection
Only protocols that actually have a protocol registered for ALPN and NPN
should try to get that negotiated in the TLS handshake. That is only
HTTPS (well, http/1.1 and http/2) right now. Previously ALPN and NPN
would wrongly be used in all handshakes if libcurl was built with it
enabled.
Reported-by: Jay Satiro
Fixes #789