mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 23:51:07 +02:00
net-misc/curl: Sync with Gentoo
It's from Gentoo commit fb3ed5435e8e3bbb8adb069597db8031ffeb4911.
This commit is contained in:
parent
786330d270
commit
13fcfa3764
@ -21,7 +21,7 @@ else
|
|||||||
https://curl.se/download/${P}.tar.xz
|
https://curl.se/download/${P}.tar.xz
|
||||||
verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
|
verify-sig? ( https://curl.se/download/${P}.tar.xz.asc )
|
||||||
"
|
"
|
||||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LICENSE="BSD curl ISC test? ( BSD-4 )"
|
LICENSE="BSD curl ISC test? ( BSD-4 )"
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/f4ee7bafda8d451255e935a3c585220dd3cf58c4
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Thu, 7 Nov 2024 23:21:14 +0100
|
|
||||||
Subject: [PATCH] cmdline/ech.md: formatting cleanups
|
|
||||||
|
|
||||||
Reported-by: Samuel Henrique
|
|
||||||
Fixes #15506
|
|
||||||
Closes #15517
|
|
||||||
--- a/docs/cmdline-opts/ech.md
|
|
||||||
+++ b/docs/cmdline-opts/ech.md
|
|
||||||
@@ -20,35 +20,33 @@ Specifies how to do ECH (Encrypted Client Hello).
|
|
||||||
|
|
||||||
The values allowed for \<config\> can be:
|
|
||||||
|
|
||||||
-## "false" (default)
|
|
||||||
+## `false`
|
|
||||||
|
|
||||||
-Do not attempt ECH
|
|
||||||
+Do not attempt ECH. The is the default.
|
|
||||||
|
|
||||||
-## "grease"
|
|
||||||
+## `grease`
|
|
||||||
|
|
||||||
Send a GREASE ECH extension
|
|
||||||
|
|
||||||
-## "true"
|
|
||||||
+## `true`
|
|
||||||
|
|
||||||
Attempt ECH if possible, but do not fail if ECH is not attempted.
|
|
||||||
(The connection fails if ECH is attempted but fails.)
|
|
||||||
|
|
||||||
-## "hard"
|
|
||||||
+## `hard`
|
|
||||||
|
|
||||||
-Attempt ECH and fail if that is not possible.
|
|
||||||
-ECH only works with TLS 1.3 and also requires using
|
|
||||||
-DoH or providing an ECHConfigList on the command line.
|
|
||||||
+Attempt ECH and fail if that is not possible. ECH only works with TLS 1.3 and
|
|
||||||
+also requires using DoH or providing an ECHConfigList on the command line.
|
|
||||||
|
|
||||||
-## "ecl:<b64val>"
|
|
||||||
+## `ecl:<b64val>`
|
|
||||||
|
|
||||||
A base64 encoded ECHConfigList that is used for ECH.
|
|
||||||
|
|
||||||
-## "pn:<name>"
|
|
||||||
+## `pn:<name>`
|
|
||||||
|
|
||||||
-A name to use to over-ride the `public_name` field of an ECHConfigList
|
|
||||||
-(only available with OpenSSL TLS support)
|
|
||||||
+A name to use to over-ride the `public_name` field of an ECHConfigList (only
|
|
||||||
+available with OpenSSL TLS support)
|
|
||||||
|
|
||||||
-## Errors
|
|
||||||
+##
|
|
||||||
|
|
||||||
-Most errors cause error
|
|
||||||
-*CURLE_ECH_REQUIRED* (101).
|
|
||||||
+Most ECH related errors cause error *CURLE_ECH_REQUIRED* (101).
|
|
@ -1,56 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/9919149aef67014150e2a1c75a7aa2c79204e30d
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Wed, 6 Nov 2024 11:26:25 +0100
|
|
||||||
Subject: [PATCH] cookie: treat cookie name case sensitively
|
|
||||||
|
|
||||||
Extend test 31 to verify
|
|
||||||
|
|
||||||
Reported-by: delogicsreal on github
|
|
||||||
Fixes #15492
|
|
||||||
Closes #15493
|
|
||||||
--- a/lib/cookie.c
|
|
||||||
+++ b/lib/cookie.c
|
|
||||||
@@ -989,7 +989,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;
|
|
||||||
|
|
||||||
@@ -1029,7 +1029,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) {
|
|
||||||
--- a/tests/data/test31
|
|
||||||
+++ b/tests/data/test31
|
|
||||||
@@ -26,6 +26,7 @@ Set-Cookie: blankdomain=sure; domain=; path=/
|
|
||||||
%if !hyper
|
|
||||||
Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure
|
|
||||||
Set-Cookie:ismatch=this ; domain=test31.curl; path=/silly/
|
|
||||||
+Set-Cookie:ISMATCH=this ; domain=test31.curl; path=/silly/
|
|
||||||
Set-Cookie: overwrite=this ; domain=test31.curl; path=/overwrite/
|
|
||||||
Set-Cookie: overwrite=this2 ; domain=test31.curl; path=/overwrite
|
|
||||||
Set-Cookie: sec1value=secure1 ; domain=test31.curl; path=/secure1/ ; secure
|
|
||||||
@@ -75,6 +76,7 @@ Set-Cookie: securewithspace=after ; secure =
|
|
||||||
%else
|
|
||||||
Set-Cookie: foobar=name; domain=anything.com; path=/ ; secure
|
|
||||||
Set-Cookie: ismatch=this ; domain=test31.curl; path=/silly/
|
|
||||||
+Set-Cookie:ISMATCH=this ; domain=test31.curl; path=/silly/
|
|
||||||
Set-Cookie: overwrite=this ; domain=test31.curl; path=/overwrite/
|
|
||||||
Set-Cookie: overwrite=this2 ; domain=test31.curl; path=/overwrite
|
|
||||||
Set-Cookie: sec1value=secure1 ; domain=test31.curl; path=/secure1/ ; secure
|
|
||||||
@@ -181,6 +183,7 @@ test31.curl FALSE /we/want/ FALSE 2118138987 nodomain value
|
|
||||||
#HttpOnly_.test31.curl TRUE /p2/ FALSE 0 httpo2 value2
|
|
||||||
#HttpOnly_.test31.curl TRUE /p1/ FALSE 0 httpo1 value1
|
|
||||||
.test31.curl TRUE /overwrite FALSE 0 overwrite this2
|
|
||||||
+.test31.curl TRUE /silly/ FALSE 0 ISMATCH this
|
|
||||||
.test31.curl TRUE /silly/ FALSE 0 ismatch this
|
|
||||||
test31.curl FALSE / FALSE 0 blankdomain sure
|
|
||||||
</file>
|
|
@ -1,26 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/93c65c00e52c4c8cdc09b2d9194ce63763c7349e
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Fri, 8 Nov 2024 16:31:41 +0100
|
|
||||||
Subject: [PATCH] libssh: when using IPv6 numerical address, add brackets
|
|
||||||
|
|
||||||
Reported-by: henrikjehgmti on github
|
|
||||||
Fixes #15522
|
|
||||||
Closes #15524
|
|
||||||
--- a/lib/vssh/libssh.c
|
|
||||||
+++ b/lib/vssh/libssh.c
|
|
||||||
@@ -2191,7 +2191,14 @@ static CURLcode myssh_connect(struct Curl_easy *data, bool *done)
|
|
||||||
return CURLE_FAILED_INIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
- rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_HOST, conn->host.name);
|
|
||||||
+ if(conn->bits.ipv6_ip) {
|
|
||||||
+ char ipv6[MAX_IPADR_LEN];
|
|
||||||
+ msnprintf(ipv6, sizeof(ipv6), "[%s]", conn->host.name);
|
|
||||||
+ rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_HOST, ipv6);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ rc = ssh_options_set(ssh->ssh_session, SSH_OPTIONS_HOST, conn->host.name);
|
|
||||||
+
|
|
||||||
if(rc != SSH_OK) {
|
|
||||||
failf(data, "Could not set remote host");
|
|
||||||
return CURLE_FAILED_INIT;
|
|
@ -1,195 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/f5c616930b5cf148b1b2632da4f5963ff48bdf88
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Thu, 7 Nov 2024 08:52:38 +0100
|
|
||||||
Subject: [PATCH] duphandle: also init netrc
|
|
||||||
|
|
||||||
The netrc init was only done in the Curl_open, meaning that a duplicated
|
|
||||||
handle would not get inited properly.
|
|
||||||
|
|
||||||
Added test 2309 to verify. It does netrc auth with a duplicated handle.
|
|
||||||
|
|
||||||
Regression from 3b43a05e000aa8f65bda513f733a
|
|
||||||
|
|
||||||
Reported-by: tranzystorekk on github
|
|
||||||
Fixes #15496
|
|
||||||
Closes #15503
|
|
||||||
--- a/lib/easy.c
|
|
||||||
+++ b/lib/easy.c
|
|
||||||
@@ -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;
|
|
||||||
--- a/tests/data/Makefile.am
|
|
||||||
+++ b/tests/data/Makefile.am
|
|
||||||
@@ -255,7 +255,7 @@ test2100 \
|
|
||||||
test2200 test2201 test2202 test2203 test2204 test2205 \
|
|
||||||
\
|
|
||||||
test2300 test2301 test2302 test2303 test2304 test2305 test2306 test2307 \
|
|
||||||
-test2308 \
|
|
||||||
+test2308 test2309 \
|
|
||||||
\
|
|
||||||
test2400 test2401 test2402 test2403 test2404 test2405 test2406 \
|
|
||||||
\
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tests/data/test2309
|
|
||||||
@@ -0,0 +1,66 @@
|
|
||||||
+<testcase>
|
|
||||||
+<info>
|
|
||||||
+<keywords>
|
|
||||||
+netrc
|
|
||||||
+HTTP
|
|
||||||
+</keywords>
|
|
||||||
+</info>
|
|
||||||
+#
|
|
||||||
+# Server-side
|
|
||||||
+<reply>
|
|
||||||
+<data crlf="yes" nocheck="yes">
|
|
||||||
+HTTP/1.1 200 OK
|
|
||||||
+Date: Tue, 09 Nov 2010 14:49:00 GMT
|
|
||||||
+Server: test-server/fake
|
|
||||||
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
|
||||||
+ETag: "21025-dc7-39462498"
|
|
||||||
+Accept-Ranges: bytes
|
|
||||||
+Content-Length: 6
|
|
||||||
+Connection: close
|
|
||||||
+Content-Type: text/html
|
|
||||||
+Funny-head: yesyes
|
|
||||||
+
|
|
||||||
+-foo-
|
|
||||||
+</data>
|
|
||||||
+</reply>
|
|
||||||
+
|
|
||||||
+#
|
|
||||||
+# Client-side
|
|
||||||
+<client>
|
|
||||||
+<server>
|
|
||||||
+http
|
|
||||||
+</server>
|
|
||||||
+<features>
|
|
||||||
+proxy
|
|
||||||
+</features>
|
|
||||||
+
|
|
||||||
+# Reproducing issue 15496
|
|
||||||
+<name>
|
|
||||||
+HTTP with .netrc using duped easy handle
|
|
||||||
+</name>
|
|
||||||
+<tool>
|
|
||||||
+lib%TESTNUMBER
|
|
||||||
+</tool>
|
|
||||||
+<command>
|
|
||||||
+http://github.com %LOGDIR/netrc%TESTNUMBER http://%HOSTIP:%HTTPPORT/
|
|
||||||
+</command>
|
|
||||||
+<file name="%LOGDIR/netrc%TESTNUMBER" >
|
|
||||||
+
|
|
||||||
+machine github.com
|
|
||||||
+
|
|
||||||
+login daniel
|
|
||||||
+password $y$j9T$WUVjiVvDbRAWafDLs6cab1$01NX.oaZKf5lw8MR2Nk9Yaxv4CqbE0IaDF.GpGxPul1
|
|
||||||
+</file>
|
|
||||||
+</client>
|
|
||||||
+
|
|
||||||
+<verify>
|
|
||||||
+<protocol>
|
|
||||||
+GET http://github.com/ HTTP/1.1
|
|
||||||
+Host: github.com
|
|
||||||
+Authorization: Basic %b64[daniel:$y$j9T$WUVjiVvDbRAWafDLs6cab1$01NX.oaZKf5lw8MR2Nk9Yaxv4CqbE0IaDF.GpGxPul1]b64%
|
|
||||||
+Accept: */*
|
|
||||||
+Proxy-Connection: Keep-Alive
|
|
||||||
+
|
|
||||||
+</protocol>
|
|
||||||
+</verify>
|
|
||||||
+</testcase>
|
|
||||||
--- a/tests/libtest/Makefile.inc
|
|
||||||
+++ b/tests/libtest/Makefile.inc
|
|
||||||
@@ -77,7 +77,7 @@ LIBTESTPROGS = libauthretry libntlmconnect libprereq \
|
|
||||||
lib1945 lib1946 lib1947 lib1948 lib1955 lib1956 lib1957 lib1958 lib1959 \
|
|
||||||
lib1960 lib1964 \
|
|
||||||
lib1970 lib1971 lib1972 lib1973 lib1974 lib1975 \
|
|
||||||
- lib2301 lib2302 lib2304 lib2305 lib2306 lib2308 \
|
|
||||||
+ lib2301 lib2302 lib2304 lib2305 lib2306 lib2308 lib2309 \
|
|
||||||
lib2402 lib2404 lib2405 \
|
|
||||||
lib2502 \
|
|
||||||
lib3010 lib3025 lib3026 lib3027 \
|
|
||||||
@@ -683,6 +683,9 @@ lib2306_LDADD = $(TESTUTIL_LIBS)
|
|
||||||
lib2308_SOURCES = lib2308.c $(SUPPORTFILES)
|
|
||||||
lib2308_LDADD = $(TESTUTIL_LIBS)
|
|
||||||
|
|
||||||
+lib2309_SOURCES = lib2309.c $(SUPPORTFILES)
|
|
||||||
+lib2309_LDADD = $(TESTUTIL_LIBS)
|
|
||||||
+
|
|
||||||
lib2402_SOURCES = lib2402.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
|
|
||||||
lib2402_LDADD = $(TESTUTIL_LIBS)
|
|
||||||
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/tests/libtest/lib2309.c
|
|
||||||
@@ -0,0 +1,66 @@
|
|
||||||
+/***************************************************************************
|
|
||||||
+ * _ _ ____ _
|
|
||||||
+ * Project ___| | | | _ \| |
|
|
||||||
+ * / __| | | | |_) | |
|
|
||||||
+ * | (__| |_| | _ <| |___
|
|
||||||
+ * \___|\___/|_| \_\_____|
|
|
||||||
+ *
|
|
||||||
+ * Copyright (C) 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
|
|
||||||
+ * are also available at https://curl.se/docs/copyright.html.
|
|
||||||
+ *
|
|
||||||
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
||||||
+ * copies of the Software, and permit persons to whom the Software is
|
|
||||||
+ * furnished to do so, under the terms of the COPYING file.
|
|
||||||
+ *
|
|
||||||
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
||||||
+ * KIND, either express or implied.
|
|
||||||
+ *
|
|
||||||
+ * SPDX-License-Identifier: curl
|
|
||||||
+ *
|
|
||||||
+ ***************************************************************************/
|
|
||||||
+
|
|
||||||
+#include "test.h"
|
|
||||||
+#include "testtrace.h"
|
|
||||||
+
|
|
||||||
+#include <curl/curl.h>
|
|
||||||
+
|
|
||||||
+static size_t cb_ignore(char *buffer, size_t size, size_t nmemb, void *userp)
|
|
||||||
+{
|
|
||||||
+ (void)buffer;
|
|
||||||
+ (void)size;
|
|
||||||
+ (void)nmemb;
|
|
||||||
+ (void)userp;
|
|
||||||
+ return CURL_WRITEFUNC_ERROR;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+CURLcode test(char *URL)
|
|
||||||
+{
|
|
||||||
+ CURL *curl;
|
|
||||||
+ CURL *curldupe;
|
|
||||||
+ CURLcode res = CURLE_OK;
|
|
||||||
+
|
|
||||||
+ global_init(CURL_GLOBAL_ALL);
|
|
||||||
+ curl = curl_easy_init();
|
|
||||||
+ if(curl) {
|
|
||||||
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cb_ignore);
|
|
||||||
+ curl_easy_setopt(curl, CURLOPT_URL, URL);
|
|
||||||
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
|
||||||
+ curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg3);
|
|
||||||
+ curl_easy_setopt(curl, CURLOPT_NETRC, (long)CURL_NETRC_REQUIRED);
|
|
||||||
+ curl_easy_setopt(curl, CURLOPT_NETRC_FILE, libtest_arg2);
|
|
||||||
+
|
|
||||||
+ curldupe = curl_easy_duphandle(curl);
|
|
||||||
+ if(curldupe) {
|
|
||||||
+ res = curl_easy_perform(curldupe);
|
|
||||||
+ printf("Returned %d, should be %d.\n", res, CURLE_WRITE_ERROR);
|
|
||||||
+ fflush(stdout);
|
|
||||||
+ curl_easy_cleanup(curldupe);
|
|
||||||
+ }
|
|
||||||
+ curl_easy_cleanup(curl);
|
|
||||||
+ }
|
|
||||||
+ curl_global_cleanup();
|
|
||||||
+ return CURLE_OK;
|
|
||||||
+}
|
|
@ -1,71 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/bcf8a848818ca0ca8d292c51c0ddeb93fa17fe62
|
|
||||||
From: Stefan Eissing <stefan@eissing.org>
|
|
||||||
Date: Thu, 7 Nov 2024 10:26:03 +0100
|
|
||||||
Subject: [PATCH] mbedtls: call psa_crypt_init() in global init
|
|
||||||
|
|
||||||
Run mbedtls' psa_crypt_init() in the general global init, optionally
|
|
||||||
protected by mbedtls locks when available.
|
|
||||||
|
|
||||||
CI: when building mbedtls, enabled thread safety
|
|
||||||
|
|
||||||
Reported-by: wxiaoguang on github
|
|
||||||
Fixes #15500
|
|
||||||
Closes #15505
|
|
||||||
--- a/lib/vtls/mbedtls.c
|
|
||||||
+++ b/lib/vtls/mbedtls.c
|
|
||||||
@@ -54,7 +54,7 @@
|
|
||||||
# ifdef MBEDTLS_DEBUG
|
|
||||||
# include <mbedtls/debug.h>
|
|
||||||
# endif
|
|
||||||
-#endif
|
|
||||||
+#endif /* MBEDTLS_VERSION_MAJOR >= 2 */
|
|
||||||
|
|
||||||
#include "cipher_suite.h"
|
|
||||||
#include "strcase.h"
|
|
||||||
@@ -122,7 +122,7 @@ struct mbed_ssl_backend_data {
|
|
||||||
#define HAS_SESSION_TICKETS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if defined(THREADING_SUPPORT)
|
|
||||||
+#ifdef THREADING_SUPPORT
|
|
||||||
static mbedtls_entropy_context ts_entropy;
|
|
||||||
|
|
||||||
static int entropy_init_initialized = 0;
|
|
||||||
@@ -585,16 +585,6 @@ mbed_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|
||||||
return CURLE_NOT_BUILT_IN;
|
|
||||||
}
|
|
||||||
|
|
||||||
-#ifdef TLS13_SUPPORT
|
|
||||||
- ret = psa_crypto_init();
|
|
||||||
- if(ret != PSA_SUCCESS) {
|
|
||||||
- mbedtls_strerror(ret, errorbuf, sizeof(errorbuf));
|
|
||||||
- failf(data, "mbedTLS psa_crypto_init returned (-0x%04X) %s",
|
|
||||||
- -ret, errorbuf);
|
|
||||||
- return CURLE_SSL_CONNECT_ERROR;
|
|
||||||
- }
|
|
||||||
-#endif /* TLS13_SUPPORT */
|
|
||||||
-
|
|
||||||
#ifdef THREADING_SUPPORT
|
|
||||||
mbedtls_ctr_drbg_init(&backend->ctr_drbg);
|
|
||||||
|
|
||||||
@@ -1571,6 +1561,20 @@ static int mbedtls_init(void)
|
|
||||||
#ifdef THREADING_SUPPORT
|
|
||||||
entropy_init_mutex(&ts_entropy);
|
|
||||||
#endif
|
|
||||||
+#ifdef TLS13_SUPPORT
|
|
||||||
+ {
|
|
||||||
+ int ret;
|
|
||||||
+#ifdef THREADING_SUPPORT
|
|
||||||
+ Curl_mbedtlsthreadlock_lock_function(0);
|
|
||||||
+#endif
|
|
||||||
+ ret = psa_crypto_init();
|
|
||||||
+#ifdef THREADING_SUPPORT
|
|
||||||
+ Curl_mbedtlsthreadlock_unlock_function(0);
|
|
||||||
+#endif
|
|
||||||
+ if(ret != PSA_SUCCESS)
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+#endif /* TLS13_SUPPORT */
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/0cdde0fdfbeb8c35420f6d03fa4b77ed73497694
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Thu, 7 Nov 2024 17:03:54 +0100
|
|
||||||
Subject: [PATCH] netrc: support large file, longer lines, longer tokens
|
|
||||||
|
|
||||||
Regression from 3b43a05e000aa8f6 (shipped in 8.11.0)
|
|
||||||
|
|
||||||
Reported-by: Moritz
|
|
||||||
Fixes #15513
|
|
||||||
Closes #15514
|
|
||||||
--- a/lib/netrc.c
|
|
||||||
+++ b/lib/netrc.c
|
|
||||||
@@ -58,9 +58,9 @@ enum found_state {
|
|
||||||
#define NETRC_FAILED -1
|
|
||||||
#define NETRC_SUCCESS 0
|
|
||||||
|
|
||||||
-#define MAX_NETRC_LINE 4096
|
|
||||||
-#define MAX_NETRC_FILE (64*1024)
|
|
||||||
-#define MAX_NETRC_TOKEN 128
|
|
||||||
+#define MAX_NETRC_LINE 16384
|
|
||||||
+#define MAX_NETRC_FILE (128*1024)
|
|
||||||
+#define MAX_NETRC_TOKEN 4096
|
|
||||||
|
|
||||||
static CURLcode file2memory(const char *filename, struct dynbuf *filebuf)
|
|
||||||
{
|
|
@ -1,20 +0,0 @@
|
|||||||
https://github.com/curl/curl/commit/878bc429f26c27294787dc59d7b53345d9edc5aa
|
|
||||||
From: Jesus Malo Poyatos <jmalopoy@opentext.com>
|
|
||||||
Date: Thu, 7 Nov 2024 14:00:53 +0100
|
|
||||||
Subject: [PATCH] setopt: fix CURLOPT_HTTP_CONTENT_DECODING
|
|
||||||
|
|
||||||
Regression from 30da1f5974d34841b30c4f (shipped in 8.11.0)
|
|
||||||
|
|
||||||
Fixes #15511
|
|
||||||
Closes #15510
|
|
||||||
--- a/lib/setopt.c
|
|
||||||
+++ b/lib/setopt.c
|
|
||||||
@@ -1146,7 +1146,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
|
|
||||||
/*
|
|
||||||
* raw data passed to the application when content encoding is used
|
|
||||||
*/
|
|
||||||
- data->set.http_ce_skip = enabled;
|
|
||||||
+ data->set.http_ce_skip = !enabled; /* reversed */
|
|
||||||
break;
|
|
||||||
|
|
||||||
#if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
|
|
@ -1,22 +0,0 @@
|
|||||||
https://patch-diff.githubusercontent.com/raw/curl/curl/pull/13741
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Wed, 22 May 2024 08:43:43 +0200
|
|
||||||
Subject: [PATCH] docs/Makefile.am: make curl-config.1 install
|
|
||||||
|
|
||||||
on "make install" like it should
|
|
||||||
---
|
|
||||||
docs/Makefile.am | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/docs/Makefile.am b/docs/Makefile.am
|
|
||||||
index 83f5b0c461cc0f..e9ef6284860555 100644
|
|
||||||
--- a/docs/Makefile.am
|
|
||||||
+++ b/docs/Makefile.am
|
|
||||||
@@ -28,6 +28,7 @@ if BUILD_DOCS
|
|
||||||
# if we disable man page building, ignore these
|
|
||||||
MK_CA_DOCS = mk-ca-bundle.1
|
|
||||||
CURLCONF_DOCS = curl-config.1
|
|
||||||
+man_MANS = curl-config.1
|
|
||||||
endif
|
|
||||||
|
|
||||||
CURLPAGES = curl-config.md mk-ca-bundle.md
|
|
@ -1,42 +0,0 @@
|
|||||||
https://github.com/curl/curl/pull/13749
|
|
||||||
From: Stefan Eissing <stefan@eissing.org>
|
|
||||||
Date: Wed, 22 May 2024 14:44:56 +0200
|
|
||||||
Subject: [PATCH] mbedtls, check version for cipher id
|
|
||||||
|
|
||||||
- mbedtls_ssl_get_ciphersuite_id_from_ssl() seems to have
|
|
||||||
been added in mbedtls 3.2.0. Check for that version.
|
|
||||||
--- a/lib/vtls/mbedtls.c
|
|
||||||
+++ b/lib/vtls/mbedtls.c
|
|
||||||
@@ -902,8 +902,6 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|
||||||
(struct mbed_ssl_backend_data *)connssl->backend;
|
|
||||||
struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
|
|
||||||
const mbedtls_x509_crt *peercert;
|
|
||||||
- char cipher_str[64];
|
|
||||||
- uint16_t cipher_id;
|
|
||||||
#ifndef CURL_DISABLE_PROXY
|
|
||||||
const char * const pinnedpubkey = Curl_ssl_cf_is_proxy(cf)?
|
|
||||||
data->set.str[STRING_SSL_PINNEDPUBLICKEY_PROXY]:
|
|
||||||
@@ -932,11 +930,18 @@ mbed_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|
||||||
return CURLE_SSL_CONNECT_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
- cipher_id = (uint16_t)
|
|
||||||
- mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl);
|
|
||||||
- mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true);
|
|
||||||
- infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str);
|
|
||||||
-
|
|
||||||
+#if MBEDTLS_VERSION_NUMBER >= 0x03020000
|
|
||||||
+ {
|
|
||||||
+ char cipher_str[64];
|
|
||||||
+ uint16_t cipher_id;
|
|
||||||
+ cipher_id = (uint16_t)
|
|
||||||
+ mbedtls_ssl_get_ciphersuite_id_from_ssl(&backend->ssl);
|
|
||||||
+ mbed_cipher_suite_get_str(cipher_id, cipher_str, sizeof(cipher_str), true);
|
|
||||||
+ infof(data, "mbedTLS: Handshake complete, cipher is %s", cipher_str);
|
|
||||||
+ }
|
|
||||||
+#else
|
|
||||||
+ infof(data, "mbedTLS: Handshake complete");
|
|
||||||
+#endif
|
|
||||||
ret = mbedtls_ssl_get_verify_result(&backend->ssl);
|
|
||||||
|
|
||||||
if(!conn_config->verifyhost)
|
|
@ -1,75 +0,0 @@
|
|||||||
https://github.com/curl/curl/pull/13825
|
|
||||||
From: Stefan Eissing <stefan@eissing.org>
|
|
||||||
Date: Wed, 29 May 2024 17:13:34 +0200
|
|
||||||
Subject: [PATCH] fix multi_wait() timeout handling
|
|
||||||
|
|
||||||
- determine the actual poll timeout *after* all sockets
|
|
||||||
have been collected. Protocols and connection filters may
|
|
||||||
install new timeouts during collection.
|
|
||||||
- add debug logging to test1533 where the mistake was noticed
|
|
||||||
- refs #13782
|
|
||||||
--- a/lib/multi.c
|
|
||||||
+++ b/lib/multi.c
|
|
||||||
@@ -1366,13 +1366,6 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
|
|
||||||
if(timeout_ms < 0)
|
|
||||||
return CURLM_BAD_FUNCTION_ARGUMENT;
|
|
||||||
|
|
||||||
- /* If the internally desired timeout is actually shorter than requested from
|
|
||||||
- the outside, then use the shorter time! But only if the internal timer
|
|
||||||
- is actually larger than -1! */
|
|
||||||
- (void)multi_timeout(multi, &timeout_internal);
|
|
||||||
- if((timeout_internal >= 0) && (timeout_internal < (long)timeout_ms))
|
|
||||||
- timeout_ms = (int)timeout_internal;
|
|
||||||
-
|
|
||||||
memset(ufds, 0, ufds_len * sizeof(struct pollfd));
|
|
||||||
memset(&ps, 0, sizeof(ps));
|
|
||||||
|
|
||||||
@@ -1476,6 +1469,14 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ /* We check the internal timeout *AFTER* we collected all sockets to
|
|
||||||
+ * poll. Collecting the sockets may install new timers by protocols
|
|
||||||
+ * and connection filters.
|
|
||||||
+ * Use the shorter one of the internal and the caller requested timeout. */
|
|
||||||
+ (void)multi_timeout(multi, &timeout_internal);
|
|
||||||
+ if((timeout_internal >= 0) && (timeout_internal < (long)timeout_ms))
|
|
||||||
+ timeout_ms = (int)timeout_internal;
|
|
||||||
+
|
|
||||||
#if defined(ENABLE_WAKEUP) && defined(USE_WINSOCK)
|
|
||||||
if(nfds || use_wakeup) {
|
|
||||||
#else
|
|
||||||
--- a/tests/libtest/Makefile.inc
|
|
||||||
+++ b/tests/libtest/Makefile.inc
|
|
||||||
@@ -487,7 +487,7 @@ lib1551_SOURCES = lib1551.c $(SUPPORTFILES)
|
|
||||||
lib1552_SOURCES = lib1552.c $(SUPPORTFILES) $(TESTUTIL)
|
|
||||||
lib1552_LDADD = $(TESTUTIL_LIBS)
|
|
||||||
|
|
||||||
-lib1553_SOURCES = lib1553.c $(SUPPORTFILES) $(TESTUTIL)
|
|
||||||
+lib1553_SOURCES = lib1553.c $(SUPPORTFILES) $(TSTTRACE) $(TESTUTIL)
|
|
||||||
lib1553_LDADD = $(TESTUTIL_LIBS)
|
|
||||||
|
|
||||||
lib1554_SOURCES = lib1554.c $(SUPPORTFILES)
|
|
||||||
--- a/tests/libtest/lib1553.c
|
|
||||||
+++ b/tests/libtest/lib1553.c
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include "test.h"
|
|
||||||
|
|
||||||
#include "testutil.h"
|
|
||||||
+#include "testtrace.h"
|
|
||||||
#include "warnless.h"
|
|
||||||
#include "memdebug.h"
|
|
||||||
|
|
||||||
@@ -74,6 +75,12 @@ CURLcode test(char *URL)
|
|
||||||
easy_setopt(curls, CURLOPT_XFERINFOFUNCTION, xferinfo);
|
|
||||||
easy_setopt(curls, CURLOPT_NOPROGRESS, 1L);
|
|
||||||
|
|
||||||
+ libtest_debug_config.nohex = 1;
|
|
||||||
+ libtest_debug_config.tracetime = 1;
|
|
||||||
+ test_setopt(curls, CURLOPT_DEBUGDATA, &libtest_debug_config);
|
|
||||||
+ easy_setopt(curls, CURLOPT_DEBUGFUNCTION, libtest_debug_cb);
|
|
||||||
+ easy_setopt(curls, CURLOPT_VERBOSE, 1L);
|
|
||||||
+
|
|
||||||
multi_add_handle(multi, curls);
|
|
||||||
|
|
||||||
multi_perform(multi, &still_running);
|
|
Loading…
x
Reference in New Issue
Block a user