Skip to content

Commit 2dd7f06

Browse files
Update curl from 7.76.1 to 7.77.0 (#2243)
1 parent 42b95b5 commit 2dd7f06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+9500
-8371
lines changed

vendor/curl/CHANGES

Lines changed: 5328 additions & 5176 deletions
Large diffs are not rendered by default.

vendor/curl/RELEASE-NOTES

Lines changed: 298 additions & 55 deletions
Large diffs are not rendered by default.

vendor/curl/include/curl/curl.h

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ typedef enum {
612612
CURLE_HTTP3, /* 95 - An HTTP/3 layer problem */
613613
CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */
614614
CURLE_PROXY, /* 97 - proxy handshake error */
615+
CURLE_SSL_CLIENTCERT, /* 98 - client-side certificate required */
615616
CURL_LAST /* never use! */
616617
} CURLcode;
617618

@@ -888,6 +889,10 @@ typedef enum {
888889
operating system. Currently implemented under MS-Windows. */
889890
#define CURLSSLOPT_NATIVE_CA (1<<4)
890891

892+
/* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
893+
a client certificate for authentication. (Schannel) */
894+
#define CURLSSLOPT_AUTO_CLIENT_CERT (1<<5)
895+
891896
/* The default connection attempt delay in milliseconds for happy eyeballs.
892897
CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
893898
this value, keep them in sync. */
@@ -1461,8 +1466,8 @@ typedef enum {
14611466
#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
14621467

14631468
/* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
1464-
tell libcurl to resolve names to those IP versions only. This only has
1465-
affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
1469+
tell libcurl to use those IP versions only. This only has effect on
1470+
systems with support for more than one, i.e IPv4 _and_ IPv6. */
14661471
CURLOPT(CURLOPT_IPRESOLVE, CURLOPTTYPE_VALUES, 113),
14671472

14681473
/* Set this option to limit the size of a file that will be downloaded from
@@ -2088,6 +2093,14 @@ typedef enum {
20882093
/* Same as CURLOPT_SSL_VERIFYSTATUS but for DOH (DNS-over-HTTPS) servers. */
20892094
CURLOPT(CURLOPT_DOH_SSL_VERIFYSTATUS, CURLOPTTYPE_LONG, 308),
20902095

2096+
/* The CA certificates as "blob" used to validate the peer certificate
2097+
this option is used only if SSL_VERIFYPEER is true */
2098+
CURLOPT(CURLOPT_CAINFO_BLOB, CURLOPTTYPE_BLOB, 309),
2099+
2100+
/* The CA certificates as "blob" used to validate the proxy certificate
2101+
this option is used only if PROXY_SSL_VERIFYPEER is true */
2102+
CURLOPT(CURLOPT_PROXY_CAINFO_BLOB, CURLOPTTYPE_BLOB, 310),
2103+
20912104
CURLOPT_LASTENTRY /* the last unused */
20922105
} CURLoption;
20932106

@@ -2122,10 +2135,10 @@ typedef enum {
21222135
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
21232136
name resolves addresses using more than one IP protocol version, this
21242137
option might be handy to force libcurl to use a specific IP version. */
2125-
#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
2138+
#define CURL_IPRESOLVE_WHATEVER 0 /* default, uses addresses to all IP
21262139
versions that your system allows */
2127-
#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */
2128-
#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */
2140+
#define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */
2141+
#define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */
21292142

21302143
/* three convenient "aliases" that follow the name scheme better */
21312144
#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
@@ -2866,6 +2879,7 @@ typedef enum {
28662879
CURLVERSION_SEVENTH,
28672880
CURLVERSION_EIGHTH,
28682881
CURLVERSION_NINTH,
2882+
CURLVERSION_TENTH,
28692883
CURLVERSION_LAST /* never actually use this */
28702884
} CURLversion;
28712885

@@ -2874,7 +2888,7 @@ typedef enum {
28742888
meant to be a built-in version number for what kind of struct the caller
28752889
expects. If the struct ever changes, we redefine the NOW to another enum
28762890
from above. */
2877-
#define CURLVERSION_NOW CURLVERSION_NINTH
2891+
#define CURLVERSION_NOW CURLVERSION_TENTH
28782892

28792893
struct curl_version_info_data {
28802894
CURLversion age; /* age of the returned struct */
@@ -2927,6 +2941,9 @@ struct curl_version_info_data {
29272941

29282942
/* These fields were added in CURLVERSION_NINTH */
29292943
const char *hyper_version; /* human readable string. */
2944+
2945+
/* These fields were added in CURLVERSION_TENTH */
2946+
const char *gsasl_version; /* human readable string. */
29302947
};
29312948
typedef struct curl_version_info_data curl_version_info_data;
29322949

vendor/curl/include/curl/curlver.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
/* This is the version number of the libcurl package from which this header
3232
file origins: */
33-
#define LIBCURL_VERSION "7.76.1"
33+
#define LIBCURL_VERSION "7.77.0"
3434

3535
/* The numeric version number is also available "in parts" by using these
3636
defines: */
3737
#define LIBCURL_VERSION_MAJOR 7
38-
#define LIBCURL_VERSION_MINOR 76
39-
#define LIBCURL_VERSION_PATCH 1
38+
#define LIBCURL_VERSION_MINOR 77
39+
#define LIBCURL_VERSION_PATCH 0
4040

4141
/* This is the numeric version of the libcurl version number, meant for easier
4242
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
@@ -57,7 +57,7 @@
5757
CURL_VERSION_BITS() macro since curl's own configure script greps for it
5858
and needs it to contain the full number.
5959
*/
60-
#define LIBCURL_VERSION_NUM 0x074c01
60+
#define LIBCURL_VERSION_NUM 0x074d00
6161

6262
/*
6363
* This is the date and time when the full source package was created. The
@@ -68,7 +68,7 @@
6868
*
6969
* "2007-11-23"
7070
*/
71-
#define LIBCURL_TIMESTAMP "2021-04-14"
71+
#define LIBCURL_TIMESTAMP "2021-05-26"
7272

7373
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
7474
#define CURL_AT_LEAST_VERSION(x,y,z) \

vendor/curl/lib/amigaos.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* | (__| |_| | _ <| |___
66
* \___|\___/|_| \_\_____|
77
*
8-
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
8+
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
99
*
1010
* This software is licensed as described in the file COPYING, which
1111
* you should have received as part of this distribution. The terms
@@ -90,6 +90,33 @@ void Curl_amiga_X509_free(X509 *a)
9090
{
9191
X509_free(a);
9292
}
93+
94+
/* AmiSSL replaces many functions with macros. Curl requires pointer
95+
* to some of these functions. Thus, we have to encapsulate these macros.
96+
*/
97+
98+
#include "warnless.h"
99+
100+
int (SHA256_Init)(SHA256_CTX *c)
101+
{
102+
return SHA256_Init(c);
103+
};
104+
105+
int (SHA256_Update)(SHA256_CTX *c, const void *data, size_t len)
106+
{
107+
return SHA256_Update(c, data, curlx_uztoui(len));
108+
};
109+
110+
int (SHA256_Final)(unsigned char *md, SHA256_CTX *c)
111+
{
112+
return SHA256_Final(md, c);
113+
};
114+
115+
void (X509_INFO_free)(X509_INFO *a)
116+
{
117+
X509_INFO_free(a);
118+
};
119+
93120
#endif /* USE_AMISSL */
94121
#endif /* __AMIGA__ */
95122

vendor/curl/lib/asyn-ares.c

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static int waitperform(struct Curl_easy *data, timediff_t timeout_ms)
309309
pfd[i].fd = socks[i];
310310
pfd[i].events |= POLLWRNORM|POLLOUT;
311311
}
312-
if(pfd[i].events != 0)
312+
if(pfd[i].events)
313313
num++;
314314
else
315315
break;
@@ -620,28 +620,9 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
620620
int *waitp)
621621
{
622622
char *bufp;
623-
int family = PF_INET;
624623

625624
*waitp = 0; /* default to synchronous response */
626625

627-
#ifdef ENABLE_IPV6
628-
switch(data->set.ipver) {
629-
default:
630-
#if ARES_VERSION >= 0x010601
631-
family = PF_UNSPEC; /* supported by c-ares since 1.6.1, so for older
632-
c-ares versions this just falls through and defaults
633-
to PF_INET */
634-
break;
635-
#endif
636-
case CURL_IPRESOLVE_V4:
637-
family = PF_INET;
638-
break;
639-
case CURL_IPRESOLVE_V6:
640-
family = PF_INET6;
641-
break;
642-
}
643-
#endif /* ENABLE_IPV6 */
644-
645626
bufp = strdup(hostname);
646627
if(bufp) {
647628
struct thread_data *res = NULL;
@@ -661,33 +642,27 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
661642

662643
/* initial status - failed */
663644
res->last_status = ARES_ENOTFOUND;
664-
#ifdef ENABLE_IPV6
665-
if(family == PF_UNSPEC) {
666-
if(Curl_ipv6works(data)) {
667-
res->num_pending = 2;
668-
669-
/* areschannel is already setup in the Curl_open() function */
670-
ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
671-
PF_INET, query_completed_cb, data);
672-
ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
673-
PF_INET6, query_completed_cb, data);
674-
}
675-
else {
676-
res->num_pending = 1;
677645

678-
/* areschannel is already setup in the Curl_open() function */
679-
ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
680-
PF_INET, query_completed_cb, data);
681-
}
646+
#if ARES_VERSION >= 0x010601
647+
/* IPv6 supported by c-ares since 1.6.1 */
648+
if(Curl_ipv6works(data)) {
649+
/* The stack seems to be IPv6-enabled */
650+
res->num_pending = 2;
651+
652+
/* areschannel is already setup in the Curl_open() function */
653+
ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
654+
PF_INET, query_completed_cb, data);
655+
ares_gethostbyname((ares_channel)data->state.async.resolver, hostname,
656+
PF_INET6, query_completed_cb, data);
682657
}
683658
else
684-
#endif /* ENABLE_IPV6 */
659+
#endif /* ARES_VERSION >= 0x010601 */
685660
{
686661
res->num_pending = 1;
687662

688663
/* areschannel is already setup in the Curl_open() function */
689664
ares_gethostbyname((ares_channel)data->state.async.resolver,
690-
hostname, family,
665+
hostname, PF_INET,
691666
query_completed_cb, data);
692667
}
693668

vendor/curl/lib/asyn-thread.c

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ int init_thread_sync_data(struct thread_data *td,
238238
#endif
239239

240240
tsd->mtx = malloc(sizeof(curl_mutex_t));
241-
if(tsd->mtx == NULL)
241+
if(!tsd->mtx)
242242
goto err_exit;
243243

244244
Curl_mutex_init(tsd->mtx);
@@ -305,7 +305,7 @@ static unsigned int CURL_STDCALL getaddrinfo_thread(void *arg)
305305

306306
rc = Curl_getaddrinfo_ex(tsd->hostname, service, &tsd->hints, &tsd->res);
307307

308-
if(rc != 0) {
308+
if(rc) {
309309
tsd->sock_error = SOCKERRNO?SOCKERRNO:rc;
310310
if(tsd->sock_error == 0)
311311
tsd->sock_error = RESOLVER_ENOMEM;
@@ -701,24 +701,9 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
701701
*waitp = 0; /* default to synchronous response */
702702

703703
#ifdef CURLRES_IPV6
704-
/*
705-
* Check if a limited name resolve has been requested.
706-
*/
707-
switch(data->set.ipver) {
708-
case CURL_IPRESOLVE_V4:
709-
pf = PF_INET;
710-
break;
711-
case CURL_IPRESOLVE_V6:
712-
pf = PF_INET6;
713-
break;
714-
default:
704+
if(Curl_ipv6works(data))
705+
/* The stack seems to be IPv6-enabled */
715706
pf = PF_UNSPEC;
716-
break;
717-
}
718-
719-
if((pf != PF_INET) && !Curl_ipv6works(data))
720-
/* The stack seems to be a non-IPv6 one */
721-
pf = PF_INET;
722707
#endif /* CURLRES_IPV6 */
723708

724709
memset(&hints, 0, sizeof(hints));

0 commit comments

Comments
 (0)