Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deps/curl/include/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_PC_CFLAGS = @LIBCURL_PC_CFLAGS@
LIBCURL_PC_CFLAGS_PRIVATE = @LIBCURL_PC_CFLAGS_PRIVATE@
LIBCURL_PC_LDFLAGS_PRIVATE = @LIBCURL_PC_LDFLAGS_PRIVATE@
LIBCURL_PC_LIBS = @LIBCURL_PC_LIBS@
LIBCURL_PC_LIBS_PRIVATE = @LIBCURL_PC_LIBS_PRIVATE@
LIBCURL_PC_REQUIRES = @LIBCURL_PC_REQUIRES@
Expand Down
1 change: 1 addition & 0 deletions deps/curl/include/curl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_PC_CFLAGS = @LIBCURL_PC_CFLAGS@
LIBCURL_PC_CFLAGS_PRIVATE = @LIBCURL_PC_CFLAGS_PRIVATE@
LIBCURL_PC_LDFLAGS_PRIVATE = @LIBCURL_PC_LDFLAGS_PRIVATE@
LIBCURL_PC_LIBS = @LIBCURL_PC_LIBS@
LIBCURL_PC_LIBS_PRIVATE = @LIBCURL_PC_LIBS_PRIVATE@
LIBCURL_PC_REQUIRES = @LIBCURL_PC_REQUIRES@
Expand Down
10 changes: 8 additions & 2 deletions deps/curl/include/curl/curl.h
Original file line number Diff line number Diff line change
Expand Up @@ -551,14 +551,14 @@ typedef enum {
CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
CURLE_OBSOLETE32, /* 32 - NOT USED */
CURLE_RANGE_ERROR, /* 33 - RANGE "command" did not work */
CURLE_HTTP_POST_ERROR, /* 34 */
CURLE_OBSOLETE34, /* 34 */
CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
CURLE_BAD_DOWNLOAD_RESUME, /* 36 - could not resume download */
CURLE_FILE_COULDNT_READ_FILE, /* 37 */
CURLE_LDAP_CANNOT_BIND, /* 38 */
CURLE_LDAP_SEARCH_FAILED, /* 39 */
CURLE_OBSOLETE40, /* 40 - NOT USED */
CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */
CURLE_OBSOLETE41, /* 41 - NOT USED starting with 7.53.0 */
CURLE_ABORTED_BY_CALLBACK, /* 42 */
CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
CURLE_OBSOLETE44, /* 44 - NOT USED */
Expand Down Expand Up @@ -643,6 +643,12 @@ typedef enum {
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */

/* removed in 7.53.0 */
#define CURLE_FUNCTION_NOT_FOUND CURLE_OBSOLETE41

/* removed in 7.56.0 */
#define CURLE_HTTP_POST_ERROR CURLE_OBSOLETE34

/* Previously obsolete error code reused in 7.38.0 */
#define CURLE_OBSOLETE16 CURLE_HTTP2

Expand Down
8 changes: 4 additions & 4 deletions deps/curl/include/curl/curlver.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@

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

/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 8
#define LIBCURL_VERSION_MINOR 11
#define LIBCURL_VERSION_PATCH 0
#define LIBCURL_VERSION_PATCH 1

/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
Expand All @@ -59,7 +59,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 0x080b00
#define LIBCURL_VERSION_NUM 0x080b01

/*
* This is the date and time when the full source package was created. The
Expand All @@ -70,7 +70,7 @@
*
* "2007-11-23"
*/
#define LIBCURL_TIMESTAMP "2024-11-06"
#define LIBCURL_TIMESTAMP "2024-12-11"

#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \
Expand Down
2 changes: 1 addition & 1 deletion deps/curl/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if(BUILD_STATIC_LIBS)
add_library(${LIB_STATIC} STATIC ${LIB_SOURCE})
add_library(${PROJECT_NAME}::${LIB_STATIC} ALIAS ${LIB_STATIC})
if(WIN32)
set_property(TARGET ${LIB_OBJECT} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB")
set_property(TARGET ${LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS "CURL_STATICLIB")
endif()
target_link_libraries(${LIB_STATIC} PRIVATE ${CURL_LIBS})
# Remove the "lib" prefix since the library is already named "libcurl".
Expand Down
1 change: 1 addition & 0 deletions deps/curl/lib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,7 @@ LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_PC_CFLAGS = @LIBCURL_PC_CFLAGS@
LIBCURL_PC_CFLAGS_PRIVATE = @LIBCURL_PC_CFLAGS_PRIVATE@
LIBCURL_PC_LDFLAGS_PRIVATE = @LIBCURL_PC_LDFLAGS_PRIVATE@
LIBCURL_PC_LIBS = @LIBCURL_PC_LIBS@
LIBCURL_PC_LIBS_PRIVATE = @LIBCURL_PC_LIBS_PRIVATE@
LIBCURL_PC_REQUIRES = @LIBCURL_PC_REQUIRES@
Expand Down
4 changes: 3 additions & 1 deletion deps/curl/lib/cf-h2-proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ static int proxy_h2_client_new(struct Curl_cfilter *cf,
{
struct cf_h2_proxy_ctx *ctx = cf->ctx;
nghttp2_option *o;
nghttp2_mem mem = {NULL, Curl_nghttp2_malloc, Curl_nghttp2_free,
Curl_nghttp2_calloc, Curl_nghttp2_realloc};

int rc = nghttp2_option_new(&o);
if(rc)
Expand All @@ -289,7 +291,7 @@ static int proxy_h2_client_new(struct Curl_cfilter *cf,
HTTP field value. */
nghttp2_option_set_no_rfc9113_leading_and_trailing_ws_validation(o, 1);
#endif
rc = nghttp2_session_client_new2(&ctx->h2, cbs, cf, o);
rc = nghttp2_session_client_new3(&ctx->h2, cbs, cf, o, &mem);
nghttp2_option_del(o);
return rc;
}
Expand Down
47 changes: 25 additions & 22 deletions deps/curl/lib/cf-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,36 +600,39 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
if(!iface && !host && !port)
/* no local kind of binding was requested */
return CURLE_OK;
else if(iface && (strlen(iface) >= 255) )
return CURLE_BAD_FUNCTION_ARGUMENT;

memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));

if(iface && (strlen(iface) < 255) ) {
if(iface || host) {
char myhost[256] = "";
int done = 0; /* -1 for error, 1 for address found */
if2ip_result_t if2ip_result = IF2IP_NOT_FOUND;

/* interface */
#ifdef SO_BINDTODEVICE
/*
* This binds the local socket to a particular interface. This will
* force even requests to other local interfaces to go out the external
* interface. Only bind to the interface when specified as interface,
* not just as a hostname or ip address.
*
* The interface might be a VRF, eg: vrf-blue, which means it cannot be
* converted to an IP address and would fail Curl_if2ip. Simply try to
* use it straight away.
*/
if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
iface, (curl_socklen_t)strlen(iface) + 1) == 0) {
/* This is often "errno 1, error: Operation not permitted" if you are
* not running as root or another suitable privileged user. If it
* succeeds it means the parameter was a valid interface and not an IP
* address. Return immediately.
*/
if(!host_input) {
infof(data, "socket successfully bound to interface '%s'", iface);
return CURLE_OK;
if(iface) {
/*
* This binds the local socket to a particular interface. This will
* force even requests to other local interfaces to go out the external
* interface. Only bind to the interface when specified as interface,
* not just as a hostname or ip address.
*
* The interface might be a VRF, eg: vrf-blue, which means it cannot be
* converted to an IP address and would fail Curl_if2ip. Simply try to
* use it straight away.
*/
if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
iface, (curl_socklen_t)strlen(iface) + 1) == 0) {
/* This is often "errno 1, error: Operation not permitted" if you are
* not running as root or another suitable privileged user. If it
* succeeds it means the parameter was a valid interface and not an IP
* address. Return immediately.
*/
if(!host_input) {
infof(data, "socket successfully bound to interface '%s'", iface);
return CURLE_OK;
}
}
}
#endif
Expand Down
4 changes: 0 additions & 4 deletions deps/curl/lib/config-win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,6 @@ Vista
# endif
#endif

#ifdef USE_WIN32_LARGE_FILES
#define HAVE__FSEEKI64
#endif

/* Define to the size of `off_t', as computed by sizeof. */
#if defined(__MINGW32__) && \
defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
Expand Down
10 changes: 6 additions & 4 deletions deps/curl/lib/cookie.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,14 +833,16 @@ parse_netscape(struct Cookie *co,
if(ptr)
*ptr = 0; /* clear it */

firstptr = strtok_r((char *)lineptr, "\t", &tok_buf); /* tokenize on TAB */
/* tokenize on TAB */
firstptr = Curl_strtok_r((char *)lineptr, "\t", &tok_buf);

/*
* Now loop through the fields and init the struct we already have
* allocated
*/
fields = 0;
for(ptr = firstptr; ptr; ptr = strtok_r(NULL, "\t", &tok_buf), fields++) {
for(ptr = firstptr; ptr;
ptr = Curl_strtok_r(NULL, "\t", &tok_buf), fields++) {
switch(fields) {
case 0:
if(ptr[0]=='.') /* skip preceding dots */
Expand Down Expand Up @@ -989,7 +991,7 @@ replace_existing(struct Curl_easy *data,
size_t myhash = cookiehash(co->domain);
for(n = Curl_llist_head(&ci->cookielist[myhash]); n; n = Curl_node_next(n)) {
struct Cookie *clist = Curl_node_elem(n);
if(strcasecompare(clist->name, co->name)) {
if(!strcmp(clist->name, co->name)) {
/* the names are identical */
bool matching_domains = FALSE;

Expand Down Expand Up @@ -1029,7 +1031,7 @@ replace_existing(struct Curl_easy *data,
}
}

if(!replace_n && strcasecompare(clist->name, co->name)) {
if(!replace_n && !strcmp(clist->name, co->name)) {
/* the names are identical */

if(clist->domain && co->domain) {
Expand Down
3 changes: 0 additions & 3 deletions deps/curl/lib/curl_config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,6 @@
/* Define to 1 if you have the fseeko declaration. */
#cmakedefine HAVE_DECL_FSEEKO 1

/* Define to 1 if you have the _fseeki64 function. */
#cmakedefine HAVE__FSEEKI64 1

/* Define to 1 if you have the ftruncate function. */
#cmakedefine HAVE_FTRUNCATE 1

Expand Down
5 changes: 1 addition & 4 deletions deps/curl/lib/curl_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -792,9 +792,6 @@
/* Define to 1 if you have the <zstd.h> header file. */
#undef HAVE_ZSTD_H

/* Define to 1 if you have the `_fseeki64' function. */
#undef HAVE__FSEEKI64

/* Define to 1 if you have the `_setmode' function. */
#undef HAVE__SETMODE

Expand Down Expand Up @@ -881,7 +878,7 @@
/* GSASL support enabled */
#undef USE_GSASL

/* force HTTPS RR support for ECH */
/* enable HTTPS RR support */
#undef USE_HTTPSRR

/* if hyper is in use */
Expand Down
26 changes: 19 additions & 7 deletions deps/curl/lib/curl_ntlm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@
# include <openssl/md5.h>
# include <openssl/ssl.h>
# include <openssl/rand.h>
#else
# include <wolfssl/openssl/des.h>
# include <wolfssl/openssl/md5.h>
# include <wolfssl/openssl/ssl.h>
# include <wolfssl/openssl/rand.h>
#endif

# if (defined(OPENSSL_VERSION_NUMBER) && \
(OPENSSL_VERSION_NUMBER < 0x00907001L)) && !defined(USE_WOLFSSL)
# define DES_key_schedule des_key_schedule
Expand All @@ -95,6 +88,25 @@
# define DESKEYARG(x) *x
# define DESKEY(x) &x
# endif
#else
# include <wolfssl/openssl/des.h>
# include <wolfssl/openssl/md5.h>
# include <wolfssl/openssl/ssl.h>
# include <wolfssl/openssl/rand.h>
# if defined(OPENSSL_COEXIST)
# define DES_key_schedule WOLFSSL_DES_key_schedule
# define DES_cblock WOLFSSL_DES_cblock
# define DES_set_odd_parity wolfSSL_DES_set_odd_parity
# define DES_set_key wolfSSL_DES_set_key
# define DES_set_key_unchecked wolfSSL_DES_set_key_unchecked
# define DES_ecb_encrypt wolfSSL_DES_ecb_encrypt
# define DESKEY(x) ((WOLFSSL_DES_key_schedule *)(x))
# define DESKEYARG(x) *x
# else
# define DESKEYARG(x) *x
# define DESKEY(x) &x
# endif
#endif

#elif defined(USE_GNUTLS)

Expand Down
31 changes: 24 additions & 7 deletions deps/curl/lib/curl_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,24 @@
#include <_mingw.h>
#endif

/* Workaround for Homebrew gcc 12.4.0, 13.3.0, 14.1.0 and newer (as of 14.1.0)
/* Workaround for Homebrew gcc 12.4.0, 13.3.0, 14.1.0, 14.2.0 (initial build)
that started advertising the `availability` attribute, which then gets used
by Apple SDK, but, in a way incompatible with gcc, resulting in misc errors
inside SDK headers, e.g.:
error: attributes should be specified before the declarator in a function
definition
error: expected ',' or '}' before
Followed by missing declarations.
Fix it by overriding the built-in feature-check macro used by the headers
to enable the problematic attributes. This makes the feature check fail. */
#if defined(__APPLE__) && \
!defined(__clang__) && \
defined(__GNUC__) && __GNUC__ >= 12 && \
Work it around by overriding the built-in feature-check macro used by the
headers to enable the problematic attributes. This makes the feature check
fail. Fixed in 14.2.0_1. Disable the workaround if the fix is detected. */
#if defined(__APPLE__) && !defined(__clang__) && defined(__GNUC__) && \
defined(__has_attribute)
#define availability curl_pp_attribute_disabled
# if !defined(__has_feature)
# define availability curl_pp_attribute_disabled
# elif !__has_feature(attribute_availability)
# define availability curl_pp_attribute_disabled
# endif
#endif

#if defined(__APPLE__)
Expand Down Expand Up @@ -287,6 +290,14 @@
# define CURL_DISABLE_HTTP_AUTH 1
#endif

/*
* ECH requires HTTPSRR.
*/

#if defined(USE_ECH) && !defined(USE_HTTPSRR)
# define USE_HTTPSRR
#endif

/* ================================================================ */
/* No system header file shall be included in this file before this */
/* point. */
Expand Down Expand Up @@ -454,6 +465,12 @@
#include <curl/stdcheaders.h>
#endif

#ifdef _WIN32
#define Curl_getpid() GetCurrentProcessId()
#else
#define Curl_getpid() getpid()
#endif

/*
* Large file (>2Gb) support using Win32 functions.
*/
Expand Down
4 changes: 2 additions & 2 deletions deps/curl/lib/curl_trc.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static CURLcode trc_opt(const char *config)
if(!tmp)
return CURLE_OUT_OF_MEMORY;

token = strtok_r(tmp, ", ", &tok_buf);
token = Curl_strtok_r(tmp, ", ", &tok_buf);
while(token) {
switch(*token) {
case '-':
Expand All @@ -391,7 +391,7 @@ static CURLcode trc_opt(const char *config)
else
trc_apply_level_by_name(token, lvl);

token = strtok_r(NULL, ", ", &tok_buf);
token = Curl_strtok_r(NULL, ", ", &tok_buf);
}
free(tmp);
return CURLE_OK;
Expand Down
1 change: 1 addition & 0 deletions deps/curl/lib/easy.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ CURL *curl_easy_duphandle(CURL *d)
goto fail;

Curl_dyn_init(&outcurl->state.headerb, CURL_MAX_HTTP_HEADER);
Curl_netrc_init(&outcurl->state.netrc);

/* the connection pool is setup on demand */
outcurl->state.lastconnect_id = -1;
Expand Down
2 changes: 1 addition & 1 deletion deps/curl/lib/formdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ static CURLcode setname(curl_mimepart *part, const char *name, size_t len)
/* wrap call to fseeko so it matches the calling convention of callback */
static int fseeko_wrapper(void *stream, curl_off_t offset, int whence)
{
#if defined(HAVE__FSEEKI64)
#if defined(_WIN32) && defined(USE_WIN32_LARGE_FILES)
return _fseeki64(stream, (__int64)offset, whence);
#elif defined(HAVE_FSEEKO) && defined(HAVE_DECL_FSEEKO)
return fseeko(stream, (off_t)offset, whence);
Expand Down
4 changes: 3 additions & 1 deletion deps/curl/lib/hostip.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,9 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
return CURLRESOLV_ERROR;

if(strcasecompare(hostname, "localhost") ||
tailmatch(hostname, ".localhost"))
strcasecompare(hostname, "localhost.") ||
tailmatch(hostname, ".localhost") ||
tailmatch(hostname, ".localhost."))
addr = get_localhost(port, hostname);
#ifndef CURL_DISABLE_DOH
else if(allowDOH && data->set.doh && !ipnum)
Expand Down
Loading
Loading