Skip to content
Permalink
Browse files

Update curl from 7.66.0 to 7.67.0 (#1161)

* Update curl from 7.66.0 to 7.67.0

* Cherry-pick bug fix from curl/curl@78cef06
  • Loading branch information...
patrikjuvonen committed Nov 24, 2019
1 parent 69b4004 commit 41428e8362528dd3b97b7a6cd30f700bc8426534
Showing with 6,378 additions and 6,487 deletions.
  1. +4,845 −5,371 vendor/curl/CHANGES
  2. +260 −172 vendor/curl/RELEASE-NOTES
  3. +2 −0 vendor/curl/include/curl/curl.h
  4. +4 −4 vendor/curl/include/curl/curlver.h
  5. +6 −0 vendor/curl/include/curl/multi.h
  6. +2 −0 vendor/curl/include/curl/urlapi.h
  7. +15 −5 vendor/curl/lib/altsvc.c
  8. +15 −13 vendor/curl/lib/asyn-thread.c
  9. +1 −3 vendor/curl/lib/config-amigaos.h
  10. +6 −0 vendor/curl/lib/config-linux.h
  11. +7 −1 vendor/curl/lib/config-macos.h
  12. +0 −6 vendor/curl/lib/config-os400.h
  13. +0 −1 vendor/curl/lib/config-plan9.h
  14. +1 −7 vendor/curl/lib/config-riscos.h
  15. +0 −3 vendor/curl/lib/config-symbian.h
  16. +1 −5 vendor/curl/lib/config-tpf.h
  17. +0 −3 vendor/curl/lib/config-vxworks.h
  18. +3 −5 vendor/curl/lib/conncache.c
  19. +14 −1 vendor/curl/lib/connect.c
  20. +12 −7 vendor/curl/lib/cookie.c
  21. +1 −1 vendor/curl/lib/cookie.h
  22. +41 −17 vendor/curl/lib/doh.c
  23. +3 −4 vendor/curl/lib/easy.c
  24. +182 −214 vendor/curl/lib/ftp.c
  25. +2 −4 vendor/curl/lib/ftp.h
  26. +1 −1 vendor/curl/lib/ftplistparser.c
  27. +1 −1 vendor/curl/lib/hostcheck.c
  28. +1 −1 vendor/curl/lib/hostip.c
  29. +7 −10 vendor/curl/lib/http.c
  30. +0 −5 vendor/curl/lib/http.h
  31. +27 −22 vendor/curl/lib/http2.c
  32. +18 −10 vendor/curl/lib/http_chunks.c
  33. +11 −2 vendor/curl/lib/http_chunks.h
  34. +6 −3 vendor/curl/lib/http_proxy.c
  35. +1 −4 vendor/curl/lib/imap.c
  36. +16 −8 vendor/curl/lib/ldap.c
  37. +13 −6 vendor/curl/lib/mime.c
  38. +3 −3 vendor/curl/lib/mime.h
  39. +17 −1 vendor/curl/lib/multi.c
  40. +1 −0 vendor/curl/lib/multihandle.h
  41. +6 −0 vendor/curl/lib/multiif.h
  42. +1 −1 vendor/curl/lib/netrc.c
  43. +1 −1 vendor/curl/lib/non-ascii.c
  44. +9 −5 vendor/curl/lib/parsedate.c
  45. +1 −1 vendor/curl/lib/security.c
  46. +11 −10 vendor/curl/lib/setopt.c
  47. +5 −1 vendor/curl/lib/setup-os400.h
  48. +2 −1 vendor/curl/lib/smb.c
  49. +118 −0 vendor/curl/lib/socketpair.c
  50. +36 −0 vendor/curl/lib/socketpair.h
  51. +20 −44 vendor/curl/lib/socks.c
  52. +85 −1 vendor/curl/lib/strcase.c
  53. +3 −1 vendor/curl/lib/strcase.h
  54. +8 −6 vendor/curl/lib/transfer.c
  55. +40 −21 vendor/curl/lib/url.c
  56. +1 −1 vendor/curl/lib/url.h
  57. +95 −61 vendor/curl/lib/urlapi.c
  58. +200 −193 vendor/curl/lib/urldata.h
  59. +1 −1 vendor/curl/lib/vauth/vauth.h
  60. +8 −7 vendor/curl/lib/version.c
  61. +48 −55 vendor/curl/lib/vquic/ngtcp2.c
  62. +18 −15 vendor/curl/lib/vquic/quiche.c
  63. +3 −3 vendor/curl/lib/vssh/libssh.c
  64. +2 −2 vendor/curl/lib/vssh/libssh2.c
  65. +5 −97 vendor/curl/lib/vtls/gskit.c
  66. +3 −3 vendor/curl/lib/vtls/gtls.c
  67. +5 −2 vendor/curl/lib/vtls/mbedtls.c
  68. +4 −3 vendor/curl/lib/vtls/mesalink.c
  69. +1 −1 vendor/curl/lib/vtls/nss.c
  70. +74 −15 vendor/curl/lib/vtls/openssl.c
  71. +2 −2 vendor/curl/lib/vtls/polarssl.c
  72. +8 −4 vendor/curl/lib/vtls/schannel.c
  73. +1 −1 vendor/curl/lib/vtls/schannel_verify.c
  74. +3 −3 vendor/curl/lib/vtls/sectransp.c
  75. +4 −1 vendor/curl/lib/vtls/vtls.c

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -2800,6 +2800,8 @@ typedef struct {
#define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */
#define CURL_VERSION_HTTP3 (1<<25) /* HTTP3 support built-in */

#define CURL_VERSION_ESNI (1<<26) /* ESNI support */

/*
* NAME curl_version_info()
*
@@ -30,12 +30,12 @@

/* This is the version number of the libcurl package from which this header
file origins: */
#define LIBCURL_VERSION "7.66.0"
#define LIBCURL_VERSION "7.67.0"

/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 66
#define LIBCURL_VERSION_MINOR 67
#define LIBCURL_VERSION_PATCH 0

/* This is the numeric version of the libcurl version number, meant for easier
@@ -57,7 +57,7 @@
CURL_VERSION_BITS() macro since curl's own configure script greps for it
and needs it to contain the full number.
*/
#define LIBCURL_VERSION_NUM 0x074200
#define LIBCURL_VERSION_NUM 0x074300

/*
* This is the date and time when the full source package was created. The
@@ -68,7 +68,7 @@
*
* "2007-11-23"
*/
#define LIBCURL_TIMESTAMP "2019-09-11"
#define LIBCURL_TIMESTAMP "2019-11-06"

#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \
@@ -396,6 +396,9 @@ typedef enum {
/* This is the argument passed to the server push callback */
CINIT(PUSHDATA, OBJECTPOINT, 15),

/* maximum number of concurrent streams to support on a connection */
CINIT(MAX_CONCURRENT_STREAMS, LONG, 16),

CURLMOPT_LASTENTRY /* the last unused */
} CURLMoption;

@@ -448,6 +451,9 @@ typedef int (*curl_push_callback)(CURL *parent,
struct curl_pushheaders *headers,
void *userp);

/* value for MAXIMUM CONCURRENT STREAMS upper limit */
#define INITIAL_MAX_CONCURRENT_STREAMS ((1U << 31) - 1)

#ifdef __cplusplus
} /* end of extern "C" */
#endif
@@ -77,6 +77,8 @@ typedef enum {
#define CURLU_URLENCODE (1<<7) /* URL encode on set */
#define CURLU_APPENDQUERY (1<<8) /* append a form style part */
#define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */
#define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the
scheme is unknown. */

typedef struct Curl_URL CURLU;

@@ -54,8 +54,8 @@ static enum alpnid alpn2alpnid(char *name)
return ALPN_h1;
if(strcasecompare(name, "h2"))
return ALPN_h2;
#if (defined(USE_QUICHE) || defined(USE_NGHTTP2)) && !defined(UNITTESTS)
if(strcasecompare(name, "h3-22"))
#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
if(strcasecompare(name, "h3-23"))
return ALPN_h3;
#else
if(strcasecompare(name, "h3"))
@@ -73,8 +73,8 @@ const char *Curl_alpnid2str(enum alpnid id)
case ALPN_h2:
return "h2";
case ALPN_h3:
#if (defined(USE_QUICHE) || defined(USE_NGHTTP2)) && !defined(UNITTESTS)
return "h3-22";
#if (defined(USE_QUICHE) || defined(USE_NGTCP2)) && !defined(UNITTESTS)
return "h3-23";
#else
return "h3";
#endif
@@ -442,6 +442,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
char option[32];
unsigned long num;
char *end_ptr;
bool quoted = FALSE;
semip++; /* pass the semicolon */
result = getalnum(&semip, option, sizeof(option));
if(result)
@@ -451,12 +452,21 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
if(*semip != '=')
continue;
semip++;
while(*semip && ISBLANK(*semip))
semip++;
if(*semip == '\"') {
/* quoted value */
semip++;
quoted = TRUE;
}
num = strtoul(semip, &end_ptr, 10);
if(num < ULONG_MAX) {
if((end_ptr != semip) && num && (num < ULONG_MAX)) {
if(strcasecompare("ma", option))
maxage = num;
else if(strcasecompare("persist", option) && (num == 1))
persist = TRUE;
if(quoted && (*end_ptr == '\"'))
end_ptr++;
}
semip = end_ptr;
}
@@ -21,6 +21,7 @@
***************************************************************************/

#include "curl_setup.h"
#include "socketpair.h"

/***********************************************************************
* Only for threaded name resolves builds
@@ -74,6 +75,7 @@
#include "inet_ntop.h"
#include "curl_threads.h"
#include "connect.h"
#include "socketpair.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
@@ -163,7 +165,7 @@ struct thread_sync_data {
char *hostname; /* hostname to resolve, Curl_async.hostname
duplicate */
int port;
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
struct connectdata *conn;
curl_socket_t sock_pair[2]; /* socket pair */
#endif
@@ -201,7 +203,7 @@ void destroy_thread_sync_data(struct thread_sync_data * tsd)
if(tsd->res)
Curl_freeaddrinfo(tsd->res);

#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
/*
* close one end of the socket pair (may be done in resolver thread);
* the other end (for reading) is always closed in the parent thread.
@@ -243,9 +245,9 @@ int init_thread_sync_data(struct thread_data * td,

Curl_mutex_init(tsd->mtx);

#ifdef HAVE_SOCKETPAIR
/* create socket pair */
if(socketpair(AF_LOCAL, SOCK_STREAM, 0, &tsd->sock_pair[0]) < 0) {
#ifdef USE_SOCKETPAIR
/* create socket pair, avoid AF_LOCAL since it doesn't build on Solaris */
if(Curl_socketpair(AF_UNIX, SOCK_STREAM, 0, &tsd->sock_pair[0]) < 0) {
tsd->sock_pair[0] = CURL_SOCKET_BAD;
tsd->sock_pair[1] = CURL_SOCKET_BAD;
goto err_exit;
@@ -297,7 +299,7 @@ static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg)
struct thread_data *td = tsd->td;
char service[12];
int rc;
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
char buf[1];
#endif

@@ -322,11 +324,11 @@ static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg)
free(td);
}
else {
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
if(tsd->sock_pair[1] != CURL_SOCKET_BAD) {
/* DNS has been resolved, signal client task */
buf[0] = 1;
if(write(tsd->sock_pair[1], buf, sizeof(buf)) < 0) {
if(swrite(tsd->sock_pair[1], buf, sizeof(buf)) < 0) {
/* update sock_erro to errno */
tsd->sock_error = SOCKERRNO;
}
@@ -382,7 +384,7 @@ static void destroy_async_data(struct Curl_async *async)
if(async->os_specific) {
struct thread_data *td = (struct thread_data*) async->os_specific;
int done;
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
curl_socket_t sock_rd = td->tsd.sock_pair[0];
struct connectdata *conn = td->tsd.conn;
#endif
@@ -407,7 +409,7 @@ static void destroy_async_data(struct Curl_async *async)

free(async->os_specific);
}
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
/*
* ensure CURLMOPT_SOCKETFUNCTION fires CURL_POLL_REMOVE
* before the FD is invalidated to avoid EBADF on EPOLL_CTL_DEL
@@ -647,13 +649,13 @@ int Curl_resolver_getsock(struct connectdata *conn,
timediff_t ms;
struct Curl_easy *data = conn->data;
struct resdata *reslv = (struct resdata *)data->state.resolver;
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
struct thread_data *td = (struct thread_data*)conn->async.os_specific;
#else
(void)socks;
#endif

#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
if(td) {
/* return read fd to client for polling the DNS resolution status */
socks[0] = td->tsd.sock_pair[0];
@@ -673,7 +675,7 @@ int Curl_resolver_getsock(struct connectdata *conn,
else
milli = 200;
Curl_expire(data, milli, EXPIRE_ASYNC_NAME);
#ifdef HAVE_SOCKETPAIR
#ifdef USE_SOCKETPAIR
}
#endif

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -36,8 +36,6 @@
#define HAVE_INTTYPES_H 1
#define HAVE_IOCTLSOCKET_CAMEL 1
#define HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1
#define HAVE_LIBCRYPTO 1
#define HAVE_LIBSSL 1
#define HAVE_LIBZ 1
#define HAVE_LONGLONG 1
#define HAVE_MALLOC_H 1
@@ -629,6 +629,9 @@
/* Define to 1 if you have the `SSLv2_client_method' function. */
/* #undef HAVE_SSLV2_CLIENT_METHOD */

/* Define to 1 if you have the `SSL_get_esni_status' function. */
/* #undef HAVE_SSL_GET_ESNI_STATUS */

/* Define to 1 if you have the <ssl.h> header file. */
/* #undef HAVE_SSL_H */

@@ -953,6 +956,9 @@
/* Define to enable c-ares support */
/* #undef USE_ARES */

/* if ESNI support is available */
/* #undef USE_ESNI */

/* if GnuTLS is enabled */
/* #undef USE_GNUTLS */

@@ -629,6 +629,9 @@
/* Define to 1 if you have the `SSLv2_client_method' function. */
/* #undef HAVE_SSLV2_CLIENT_METHOD */

/* Define to 1 if you have the `SSL_get_esni_status' function. */
/* #undef HAVE_SSL_GET_ESNI_STATUS */

/* Define to 1 if you have the <ssl.h> header file. */
/* #undef HAVE_SSL_H */

@@ -834,7 +837,7 @@
/* #undef NTLM_WB_FILE */

/* cpu-machine-OS */
#define OS "x86_64-apple-darwin18.7.0"
#define OS "x86_64-apple-darwin19.0.0"

/* Name of package */
#define PACKAGE "curl"
@@ -953,6 +956,9 @@
/* Define to enable c-ares support */
/* #undef USE_ARES */

/* if ESNI support is available */
/* #undef USE_ESNI */

/* if GnuTLS is enabled */
/* #undef USE_GNUTLS */

@@ -160,9 +160,6 @@
/* Define if you have the <krb.h> header file. */
#undef HAVE_KRB_H

/* Define if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO

/* Define if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL

@@ -175,9 +172,6 @@
/* Define if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET

/* Define if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL

/* Define if you have GSS API. */
#define HAVE_GSSAPI

@@ -126,7 +126,6 @@
#define HAVE_INTTYPES_H 1
#define HAVE_IOCTL 1
#define HAVE_LIBGEN_H 1
#define HAVE_LIBSSL 1
#define HAVE_LIBZ 1
#define HAVE_LL 1
#define HAVE_LOCALE_H 1
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -164,9 +164,6 @@
/* Define if you have the <krb.h> header file. */
#undef HAVE_KRB_H

/* Define if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO

/* Define if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL

@@ -179,9 +176,6 @@
/* Define if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET

/* Define if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL

/* Define if you have the `ucb' library (-lucb). */
#undef HAVE_LIBUCB

@@ -315,9 +315,6 @@
/* Define to 1 if you have the <libssh2.h> header file. */
/*#define HAVE_LIBSSH2_H 1*/

/* Define to 1 if you have the `ssl' library (-lssl). */
/*#define HAVE_LIBSSL 1*/

/* if your compiler supports LL */
#define HAVE_LL 1

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -277,10 +277,6 @@
/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */

/* Define to 1 if you have the `ssl' library (-lssl). */
/* #undef HAVE_LIBSSL */
#define HAVE_LIBSSL 1

/* if zlib is available */
/* #undef HAVE_LIBZ */

0 comments on commit 41428e8

Please sign in to comment.
You can’t perform that action at this time.