Commit graph

35640 commits

Author SHA1 Message Date
Viktor Szakats
674f2a37ec
cmake: add _CURL_SKIP_BUILD_CERTS internal option
To disable automatically building certs with the testdeps target.
To improve performance when testing builds.
2025-07-23 19:57:19 +02:00
Viktor Szakats
72b2f990cf
Revert "try without singleuse.pl update"
This reverts commit 93db2c669885e6c169731a60ae93c300ed3beb1b.

CI is clean without these exceptions. Probably depends of configuration
options.
2025-07-23 19:55:14 +02:00
Viktor Szakats
4835982034
try without singleuse.pl update 2025-07-23 19:55:14 +02:00
Viktor Szakats
f9db1d1302
rework gnutls md4 type clash to also cover aws-lc and possibly boringssl
de-prioritze the gnutls implementation. this works better because we can
avoid include its explicit md4 header, but with wolfssl we need to set
a macro and with some openssl forks there is no way to exclude the md4
type because it's included via openssl/base.h (boringssl, aws-lc).

options='-DCURL_USE_SCHANNEL=OFF -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON -DCURL_USE_OPENSSL=ON
 -DOPENSSL_ROOT_DIR=/opt/homebrew/opt/aws-lc -DCURL_ZLIB=ON -DCURL_USE_LIBSSH=ON -DCURL_USE_GSASL=ON -DCURL_USE_GSSAPI=ON
 -DUSE_LIBRTMP=OFF -DUSE_NGHTTP2=ON -DCURL_CA_FALLBACK=ON -DCURL_CA_SEARCH_SAFE=ON -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BASIC_AUTH=ON
 -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON
 -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_HEADERS_API=ON
 -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON
 -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON
 -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON
 -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SOCKETPAIR=ON
 -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_DEBUG=ON -DUSE_ECH=ON -DUSE_HTTPSRR=ON -DENABLE_IPV6=OFF
 -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_CURL=OFF -DENABLE_CURLDEBUG=ON'

lib/md4.c:98:24: error: typedef redefinition with different types ('struct md4_ctx' vs 'struct md4_state_st')
   98 | typedef struct md4_ctx MD4_CTX;
      |                        ^
/opt/homebrew/opt/aws-lc/include/openssl/base.h:379:29: note: previous definition is here
  379 | typedef struct md4_state_st MD4_CTX;
      |                             ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:102:12: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct md4_state_st *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  102 |   md4_init(ctx);
      |            ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:66:26: note: passing argument to parameter 'ctx' here
   66 | md4_init(struct md4_ctx *ctx);
      |                          ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:108:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct md4_state_st *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  108 |   md4_update(ctx, size, data);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:69:28: note: passing argument to parameter 'ctx' here
   69 | md4_update(struct md4_ctx *ctx,
      |                            ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:113:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct md4_state_st *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  113 |   md4_digest(ctx, MD4_DIGEST_SIZE, result);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:74:28: note: passing argument to parameter 'ctx' here
   74 | md4_digest(struct md4_ctx *ctx,
      |                            ^
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_2_c.c:55:
lib/md4.c:528:11: error: variable has incomplete type 'MD4_CTX' (aka 'struct md4_state_st')
  528 |   MD4_CTX ctx;
      |           ^
/opt/homebrew/opt/aws-lc/include/openssl/base.h:379:16: note: forward declaration of 'struct md4_state_st'
  379 | typedef struct md4_state_st MD4_CTX;
      |                ^
5 errors generated.
2025-07-23 19:55:14 +02:00
Viktor Szakats
0e21d729f8
try including curlx base64 functions always, and allowlist in singleuse.pl
these functions are used by these places:

unit1302: curlx_base64_decode, curlx_base64_encode, curlx_base64url_encode
src/tool_ssls_load: curlx_base64_decode, curlx_base64_encode
src/varfunc: curlx_base64_decode, curlx_base64_encode

Reproducers:
- unit: -DCURL_ENABLE_SSL=OFF -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_HTTP=ON -DHTTP_ONLY=ON
- src:  -DCURL_ENABLE_SSL=OFF -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_HTTP=ON -DHTTP_ONLY=ON -DBUILD_SHARED_LIBS=OFF
2025-07-23 19:55:14 +02:00
Viktor Szakats
281f181ada
vtls: fix unused const variable
lib/vtls/vtls.c:140:31: error: 'ALPN_SPEC_H11' defined but not used [-Werror=unused-const-variable=]
  140 | static const struct alpn_spec ALPN_SPEC_H11 = {
      |                               ^~~~~~~~~~~~~

options='-DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER_TARGET=x86_64-w64-mingw32 -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCURL_USE_LIBPSL=OFF -DCMAKE_IGNORE_PREFIX_PATH=/opt/homebrew -DCURL_USE_SCHANNEL=ON -DUSE_APPLE_IDN=ON -DUSE_LIBIDN2=ON -DUSE_WIN32_IDN=ON -DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_WINDOWS_SSPI=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_HTTPSRR=ON -DUSE_SSLS_EXPORT=ON -DENABLE_THREADED_RESOLVER=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_CURL=OFF -DENABLE_CURLDEBUG=OFF'
2025-07-23 19:55:14 +02:00
Viktor Szakats
2bbdb6865a
curl_setup.h long line 2025-07-23 19:55:14 +02:00
Viktor Szakats
1753360f10
libssh: fix unused variable
lib/vssh/libssh.c:235:33: error: unused parameter 'lineno' [-Werror,-Wunused-parameter]
  235 |                           , int lineno
      |                                 ^

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DCURL_ENABLE_SSL=OFF -DENABLE_IPV6=OFF -DENABLE_CURLDEBUG=ON -DCURL_USE_LIBSSH=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_WOLFSSL=ON -DUSE_ECH=OFF '
2025-07-23 19:55:14 +02:00
Viktor Szakats
bdf240b7fa
curl_setup.h avoid GnuTLS wolfSSL MD4_CTX type conflict
-DCURL_USE_GNUTLS=ON -DCURL_USE_WOLFSSL=ON

```
lib/md4.c:98:24: error: typedef redefinition with different types ('struct md4_ctx' vs 'WOLFSSL_MD4_CTX' (aka 'struct WOLFSSL_MD4_CTX'))
   98 | typedef struct md4_ctx MD4_CTX;
      |                        ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:51:25: note: previous definition is here
   51 | typedef WOLFSSL_MD4_CTX MD4_CTX;
      |                         ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c💯12: error: static declaration of 'wolfSSL_MD4_Init' follows non-static declaration
  100 | static int MD4_Init(MD4_CTX *ctx)
      |            ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:859:41: note: expanded from macro 'MD4_Init'
  859 | #define MD4_Init                        wolfSSL_MD4_Init
      |                                         ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:44:18: note: previous declaration is here
   44 | WOLFSSL_API void wolfSSL_MD4_Init(WOLFSSL_MD4_CTX* md4);
      |                  ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:102:12: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  102 |   md4_init(ctx);
      |            ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:66:26: note: passing argument to parameter 'ctx' here
   66 | md4_init(struct md4_ctx *ctx);
      |                          ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:106:13: error: static declaration of 'wolfSSL_MD4_Update' follows non-static declaration
  106 | static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
      |             ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:860:41: note: expanded from macro 'MD4_Update'
  860 | #define MD4_Update                      wolfSSL_MD4_Update
      |                                         ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:45:18: note: previous declaration is here
   45 | WOLFSSL_API void wolfSSL_MD4_Update(WOLFSSL_MD4_CTX* md4, const void* data,
      |                  ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:108:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  108 |   md4_update(ctx, size, data);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:69:28: note: passing argument to parameter 'ctx' here
   69 | md4_update(struct md4_ctx *ctx,
      |                            ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:111:13: error: static declaration of 'wolfSSL_MD4_Final' follows non-static declaration
  111 | static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
      |             ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:861:41: note: expanded from macro 'MD4_Final'
  861 | #define MD4_Final                       wolfSSL_MD4_Final
      |                                         ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:47:18: note: previous declaration is here
   47 | WOLFSSL_API void wolfSSL_MD4_Final(unsigned char* digest, WOLFSSL_MD4_CTX* md4);
      |                  ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:113:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
  113 |   md4_digest(ctx, MD4_DIGEST_SIZE, result);
      |              ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:74:28: note: passing argument to parameter 'ctx' here
   74 | md4_digest(struct md4_ctx *ctx,
      |                            ^
7 errors generated.
```
2025-07-23 19:55:14 +02:00
Viktor Szakats
c7cf70453b
apply !http + h3 fix to ngtcp2/quiche (untested) 2025-07-23 19:55:14 +02:00
Viktor Szakats
433c45d2df
wolfssl: fix wolfssl !proxy unused variable 2025-07-23 19:55:14 +02:00
Viktor Szakats
bc7718a5d0
fix trc for !http + http3
lib/curl_trc.c:486:6: error: use of undeclared identifier 'Curl_cft_http3'
  486 |   { &Curl_cft_http3,          TRC_CT_PROTOCOL },
      |      ^
lib/curl_trc.c:497:18: error: invalid application of 'sizeof' to an incomplete type 'struct trc_cft_def[]'
  497 |   for(i = 0; i < CURL_ARRAYSIZE(trc_cfts); ++i) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~
lib/curl_setup.h:957:34: note: expanded from macro 'CURL_ARRAYSIZE'
  957 | #define CURL_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
      |                                  ^~~
In file included from _buildroulette/bld/lib/CMakeFiles/libcurl_shared.dir/Unity/unity_1_c.c:13:
lib/curl_trc.c:515:18: error: invalid application of 'sizeof' to an incomplete type 'struct trc_cft_def[]'
  515 |   for(i = 0; i < CURL_ARRAYSIZE(trc_cfts); ++i) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~
lib/curl_setup.h:957:34: note: expanded from macro 'CURL_ARRAYSIZE'
  957 | #define CURL_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
      |                                  ^~~
3 errors generated.

options='-DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON   -DENABLE_CURLDEBUG=OFF -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
2025-07-23 19:55:14 +02:00
Viktor Szakats
f2321419e3
fix !http + http3 builds
lib/vquic/curl_osslq.c:579:24: error: field has incomplete type 'struct h1_req_parser'
  579 |   struct h1_req_parser h1; /* h1 request parsing */
      |                        ^
lib/vquic/curl_osslq.c:579:10: note: forward declaration of 'struct h1_req_parser'
  579 |   struct h1_req_parser h1; /* h1 request parsing */
      |          ^
lib/vquic/curl_osslq.c:598:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  598 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
lib/vquic/curl_osslq.c:635:3: error: call to undeclared function 'Curl_h1_req_parse_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  635 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |   ^
lib/vquic/curl_osslq.c:635:39: error: use of undeclared identifier 'H1_PARSE_DEFAULT_MAX_LINE_LEN'
  635 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |                                       ^
lib/vquic/curl_osslq.c:1889:14: error: call to undeclared function 'Curl_h1_req_parse_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1889 |   nwritten = Curl_h1_req_parse_read(&stream->h1, buf, len, NULL, 0, err);
      |              ^
lib/vquic/curl_osslq.c:1904:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 1904 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
6 errors generated.

lib/vquic/vquic.c:76:3: error: call to undeclared function 'Curl_osslq_ver'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   76 |   Curl_osslq_ver(p, len);
      |   ^
lib/vquic/vquic.c:691:10: error: call to undeclared function 'Curl_cf_osslq_create'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  691 |   return Curl_cf_osslq_create(pcf, data, conn, ai);
      |          ^
2 errors generated.

Undefined symbols for architecture arm64:
  "_Curl_cf_quic_create", referenced from:
      _transport_providers in unity_0_c.c.o
  "_Curl_vquic_init", referenced from:
      _global_init in unity_1_c.c.o

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON   -DENABLE_CURLDEBUG=ON -DCURL_USE_OPENSSL=ON -DUSE_OPENSSL_QUIC=ON'
2025-07-23 19:55:14 +02:00
Viktor Szakats
b3ee0a9638
curl_trc: add missing guard for Curl_trc_ssls when !verbose
lib/curl_trc.c:643:6: error: no previous prototype for function 'Curl_trc_ssls' [-Werror,-Wmissing-prototypes]
  643 | void Curl_trc_ssls(struct Curl_easy *data, const char *fmt, ...)
      |      ^
lib/curl_trc.c:643:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  643 | void Curl_trc_ssls(struct Curl_easy *data, const char *fmt, ...)
      | ^
      | static
1 error generated.

options='-DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_UNICODE=ON  -DCURL_ENABLE_SSL=OFF'
2025-07-23 19:55:14 +02:00
Viktor Szakats
ad5e7e2e0e
catch !ssl + ssls_export combination in source, convert error to warning in builds
To make it build-system agnostic.

-DCURL_ENABLE_SSL=OFF -DUSE_SSLS_EXPORT=ON
2025-07-23 19:55:13 +02:00
Viktor Szakats
208f5642aa
fix missing declaration
lib/sha256.c:506:26: error: variable has incomplete type 'const struct HMAC_params'
  506 | const struct HMAC_params Curl_HMAC_SHA256 = {
      |                          ^
lib/curl_sha256.h:34:21: note: forward declaration of 'struct HMAC_params'
   34 | extern const struct HMAC_params Curl_HMAC_SHA256;
      |                     ^
1 error generated.

-DCURL_DISABLE_AWS=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_ENABLE_SSL=OFF + libssh2
2025-07-23 19:55:13 +02:00
Viktor Szakats
904ddd39c6
smtp fix unsued variable
lib/smtp.c:356:42: error: unused parameter 'data' [-Werror,-Wunused-parameter]
  356 | static void smtp_state(struct Curl_easy *data,
      |                                          ^

-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_CURLDEBUG=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON
2025-07-23 19:54:57 +02:00
Viktor Szakats
3c1c1e4c7d
http: fix unused variables
lib/http.c:1002:49: error: unused parameter 'data' [-Werror,-Wunused-parameter]
 1002 | CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
      |                                                 ^
lib/http.c:1003:43: error: unused parameter 'auth' [-Werror,-Wunused-parameter]
 1003 |                               const char *auth) /* the first non-space */
      |                                           ^
2 errors generated.

options='-DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_CURLDEBUG=ON -DENABLE_DEBUG=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON '
2025-07-23 19:54:56 +02:00
Viktor Szakats
e70938193a
cf-h2-proxy: disable when !http + nghttp2
lib/cf-h2-proxy.c:97:12: error: call to undeclared function 'Curl_http_proxy_get_destination'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   97 |   result = Curl_http_proxy_get_destination(cf, &hostname, &port, &ipv6_ip);
      |            ^
lib/cf-h2-proxy.c:937:12: error: call to undeclared function 'Curl_http_proxy_create_CONNECT'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  937 |   result = Curl_http_proxy_create_CONNECT(&req, cf, data, 2);
      |            ^
lib/cf-h2-proxy.c:986:14: error: call to undeclared function 'Curl_http_input_auth'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  986 |     result = Curl_http_input_auth(data, ts->resp->status == 407,
      |              ^
lib/cf-h2-proxy.c:986:14: note: did you mean 'Curl_http_output_auth'?
lib/http.h:209:1: note: 'Curl_http_output_auth' declared here
  209 | Curl_http_output_auth(struct Curl_easy *data,
      | ^
3 errors generated.

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_TFTP=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON  -DENABLE_IPV6=OFF'
2025-07-23 19:54:56 +02:00
Viktor Szakats
207f25c004
fix missing function !http + nghttp2
Undefined symbols for architecture arm64:
  "_Curl_cft_nghttp2", referenced from:
      _trc_cfts in unity_1_c.c.o

options='-DCURL_DISABLE_AWS=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_KERBEROS_AUTH=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_NEGOTIATE_AUTH=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SMB=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_WEBSOCKETS=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON'
2025-07-23 19:54:56 +02:00
Viktor Szakats
0482130edc
fix builds with !http + nghttp2
_buildroulette/lib/http2.c:218:24: error: field has incomplete type 'struct h1_req_parser'
  218 |   struct h1_req_parser h1; /* parsing the request */
      |                        ^
_buildroulette/lib/http2.c:218:10: note: forward declaration of 'struct h1_req_parser'
  218 |   struct h1_req_parser h1; /* parsing the request */
      |          ^
_buildroulette/lib/http2.c:258:3: error: call to undeclared function 'Curl_h1_req_parse_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-funct
  258 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |   ^
_buildroulette/lib/http2.c:258:39: error: use of undeclared identifier 'H1_PARSE_DEFAULT_MAX_LINE_LEN'
  258 |   Curl_h1_req_parse_init(&stream->h1, H1_PARSE_DEFAULT_MAX_LINE_LEN);
      |                                       ^
_buildroulette/lib/http2.c:282:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-funct
  282 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
_buildroulette/lib/http2.c:2237:14: error: call to undeclared function 'Curl_h1_req_parse_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-fun
 2237 |   nwritten = Curl_h1_req_parse_read(&stream->h1, buf, len, NULL, 0, &result);
      |              ^
_buildroulette/lib/http2.c:2251:3: error: call to undeclared function 'Curl_h1_req_parse_free'; ISO C99 and later do not support implicit function declarations [-Wimplicit-func
 2251 |   Curl_h1_req_parse_free(&stream->h1);
      |   ^
_buildroulette/lib/http2.c:2866:19: error: no member named 'http_neg' in 'struct UrlState'
 2866 |      (data->state.http_neg.wanted & CURL_HTTP_V2x) &&
      |       ~~~~~~~~~~~ ^
_buildroulette/lib/http2.c:2867:18: error: no member named 'http_neg' in 'struct UrlState'
 2867 |      data->state.http_neg.h2_prior_knowledge) {
      |      ~~~~~~~~~~~ ^
8 errors generated.
2025-07-23 19:54:56 +02:00
Viktor Szakats
4f1cfdc2de
vtls fix unused function
```
lib/vtls/vtls.c:153:1: error: unused function 'alpn_get_spec' [-Werror,-Wunused-function]
  153 | alpn_get_spec(http_majors allowed, bool use_alpn)
      | ^~~~~~~~~~~~~
```

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON'
2025-07-23 19:54:56 +02:00
Viktor Szakats
402230626a
ftp fix unused var
lib/ftp.c:145:42: error: unused parameter 'data' [-Werror,-Wunused-parameter]
  145 | static void _ftp_state(struct Curl_easy *data,
      |                                          ^

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_AWS=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_BEARER_AUTH=ON -DCURL_DISABLE_BINDLOCAL=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DICT=ON -DCURL_DISABLE_DIGEST_AUTH=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FILE=ON -DCURL_DISABLE_FORM_API=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_HEADERS_API=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_HTTP=ON -DCURL_DISABLE_HTTP_AUTH=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_IPFS=ON -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DCURL_DISABLE_LIBCURL_OPTION=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_NETRC=ON -DCURL_DISABLE_NTLM=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SHA512_256=ON -DCURL_DISABLE_SHUFFLE_DNS=ON -DCURL_DISABLE_SMTP=ON -DCURL_DISABLE_SOCKETPAIR=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_TELNET=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DENABLE_UNICODE=ON -DUSE_SSLS_EXPORT=ON'
2025-07-23 19:54:56 +02:00
Viktor Szakats
4cb031f1f6
sync Curl_trc_ws guard with declaration
```
lib/curl_trc.c:637:6: error: no previous prototype for function 'Curl_trc_ws' [-Werror,-Wmissing-prototypes]
  637 | void Curl_trc_ws(struct Curl_easy *data, const char *fmt, ...)
      |      ^
lib/curl_trc.c:637:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  637 | void Curl_trc_ws(struct Curl_easy *data, const char *fmt, ...)
      | ^
      | static
```

options='-DCURL_DISABLE_ALTSVC=ON -DCURL_DISABLE_BASIC_AUTH=ON -DCURL_DISABLE_CA_SEARCH=ON -DCURL_DISABLE_COOKIES=ON -DCURL_DISABLE_DOH=ON -DCURL_DISABLE_FTP=ON -DCURL_DISABLE_GETOPTIONS=ON -DCURL_DISABLE_GOPHER=ON -DCURL_DISABLE_HSTS=ON -DCURL_DISABLE_IMAP=ON -DCURL_DISABLE_INSTALL=ON -DCURL_DISABLE_MIME=ON -DCURL_DISABLE_MQTT=ON -DCURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG=ON -DCURL_DISABLE_PARSEDATE=ON -DCURL_DISABLE_POP3=ON -DCURL_DISABLE_PROGRESS_METER=ON -DCURL_DISABLE_PROXY=ON -DCURL_DISABLE_RTSP=ON -DCURL_DISABLE_SRP=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON -DCURL_DISABLE_WEBSOCKETS=ON -DENABLE_UNICODE=ON -DHTTP_ONLY=ON -DUSE_SSLS_EXPORT=ON -DENABLE_UNIX_SOCKETS=OFF'
2025-07-23 19:54:56 +02:00
Viktor Szakats
1c48966315
fixed potential unused variable
lib/vtls/vtls.c:1634:51: error: unused parameter 'conn' [-Werror,-Wunused-parameter]
 1634 |                               struct connectdata *conn)
      |                                                   ^
2025-07-23 19:54:56 +02:00
Viktor Szakats
8a51ff0670
cmake: fix to disable Schannel and SSPI for non-Windows targets
Fixing:
```
In file included from lib/vtls/vtls.c:50:
In file included from lib/vtls/../urldata.h:314:
lib/vtls/../curl_sspi.h:41:10: fatal error: 'security.h' file not found
   41 | #include <security.h>
      |          ^~~~~~~~~~~~
1 error generated.

lib/curl_sspi.h:41:10: fatal error: 'security.h' file not found
   41 | #include <security.h>
      |          ^~~~~~~~~~~~
1 error generated.
```

Cherry-picked from #17988
2025-07-23 19:53:44 +02:00
Viktor Szakats
c85ee70e21
cmake: fix ENABLE_UNIX_SOCKETS=OFF with pre-fill enabled on unix
Cherry-picked from #17988
2025-07-23 19:52:18 +02:00
Viktor Szakats
f99210b49c
cmake: keep websockets disabled if HTTP is disabled
Syncing with autotools, and fixing the `Protocols:` verifier test.

Cherry-picked from #17988
2025-07-23 19:50:16 +02:00
Viktor Szakats
548d8a8421
cmake: capitalize 'Rustls' in the config summary
Cherry-picked from #17988
2025-07-23 19:48:35 +02:00
Stefan Eissing
ab5e0bfddc
pytest: add SOCKS tests and scoring
Configure curl with `--with-test-sockd=<path to sockd>` for a locally
installed dante sockd server and new `test_40_*` will verify that
down- and uploads work via SOCKS.

Invoke scorecard.py with `--socks4` or `--socks5` to run performance
tests with SOCKS. Note that SOCKS is not supported for HTTP/3.

Ref: #17969
Closes #17986
2025-07-23 18:12:31 +02:00
Caolán McNamara
fb0b4c8710
http: const up readonly H2_NON_FIELD
Closes #17996
2025-07-23 16:23:39 +02:00
Stefan Eissing
293d922916
test1: raise alloc limits
After failures on certain build/platform combinations.

See: https://github.com/curl/curl/actions/runs/16464320627/job/46537983882?pr=17992

Closes #18004
2025-07-23 16:22:35 +02:00
Stefan Eissing
338f7e9e89
docs: fix name in curl_easy_ssls_export man page
The name of the man page was wrongly given as curl_easy_sssl_export
which seems to have confused our HTTML man page generation.

Reported-by: Qriist on github
Ref: https://github.com/curl/curl-www/issues/458

Closes #17995
2025-07-23 00:56:11 +02:00
Viktor Szakats
31b2c537e6
test1148: drop redundant LC_NUMBER= env setting
No longer necessary after a previous change made sure to strip
the '100.0%' number from the result, before checking it. The dot is
a regex character catching any decimal separator.

Follow-up to 17c18fbc30 #5194
Ref: #2436
Cherry-picked from #17988
Closes #17993
2025-07-22 23:06:10 +02:00
Viktor Szakats
2c0a9c26c8
GHA/non-native: FreeBSD 14.3
Follow-up to f097eaea18 #18000
Closes #18001
2025-07-22 20:18:26 +02:00
renovate[bot]
f097eaea18
GHA: update cross-platform-actions/action action to v0.29.0
Closes #18000
2025-07-22 19:47:47 +02:00
renovate[bot]
6ac97b091d
GHA: update debian:bookworm-slim Docker digest to 2424c18
Closes #17999
2025-07-22 19:47:47 +02:00
Viktor Szakats
5cdb9b44bd
lib1560: fix memory leak when run without UTF-8 support
The issue is missed in CI, because valgrind jobs all run with UTF-8
support.

Fixing:
```
test 1560...[URL API]
 valgrind ERROR ==13362== 104 bytes in 1 blocks are definitely lost in loss record 1 of 1
==13362==    at 0x484D953: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==13362==    by 0x48E1302: curl_dbg_calloc (in /curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x4931D12: curl_url (in /curl/bld/lib/libcurl.so.4.8.0)
==13362==    by 0x14F658: get_parts (in /curl/bld/tests/libtest/libtests)
==13362==    by 0x150AC6: test_lib1560 (in /curl/bld/tests/libtest/libtests)
==13362==    by 0x17F5D5: main (in /curl/bld/tests/libtest/libtests)
```
Ref: https://github.com/curl/curl/actions/runs/16446352985/job/46479298080?pr=17988#step:41:3007

Follow-up to 7d1ca2e7e1 #17933

Closes #17998
2025-07-22 17:16:32 +02:00
Stefan Eissing
9657a2041e
curl: tool_read_cb fix of segfault
When transfers read client input without an upload file, the check if
upload file is '.' strcompared a NULL.

Add test 1548 to reproduce and verify fix.

Reported-by: d1r3ct0r
Fixes #17978
Closes #17987
2025-07-21 19:11:37 +02:00
Viktor Szakats
c221c0ee59
test1560: set locale/codeset with LC_ALL (was: LANG), test in CI
To fix running test 1560 when `LC_ALL` is set to something unexpected
(e.g. `C`). Also syncing it with the rest of tests.

Also:
- GHA/linux: enable `libidn2` in more jobs.
  Also to enable test 1560 reproducing this issue in more jobs.
- GHA/linux: run tests with `LC_ALL=C` in one of the jobs.
- GHA/linux: switch to the non-deprecated package name for libidn2.
- GHA/macos: run tests with non-default locale settings in one job.
- GHA/macos: enable AppleIDN in that job.

Ref: https://github.com/curl/curl/pull/17933#issuecomment-3074582840
Follow-up to f27262b179 #10196

Closes #17938
2025-07-21 17:27:23 +02:00
Viktor Szakats
ee232917dc
tidy-up: Curl_thread_create() callback return type
Replace repeat `#ifdef` code with a macro for the return type of
the thread function.

Also:
- always define `CURL_STDCALL`, allowing to use it without guards.
- lib1307: drop single-use macro `CAINFO`.

Closes #17889
2025-07-21 16:17:42 +02:00
Viktor Szakats
8ae93a95f8
curl_fnmatch, servers: drop local macros in favour of sizeof()
Closes #17898
2025-07-21 16:14:14 +02:00
Viktor Szakats
0260e8465a
GHA/checksrc: expand spellcheck, fix issues found
- codespell: break logic out into its own runnable script. Allowing
  to run it on local machines.
- codespell: install via `pip`, bump to latest version.
- codespell: show version number in CI log.
- codespell: drop no longer needed word exception: `msdos`.
- codespell: include all curl source tree, except `packages` and
  `winbuild`. Drop an obsolete file exclusion.
- add new spellchecker job using the `typos` tool. It includes
  the codespell dictionary and a couple more. Use linuxbrew to install
  it. This takes 10 seconds, while installing via `cargo` from source
  would take over a minute.
- codespell: introduce an inline ignore filter compatible with `cspell`
  Make `typos` recognize it, too. Move single exceptions inline.

Fix new typos found. Also rename variables and words to keep
spellchecking exceptions at minumum. This involves touching some tests.
Also switch base64 strings to `%b64[]` to avoid false positives.

Ref: https://github.com/crate-ci/typos/blob/master/docs/reference.md
Ref: https://github.com/codespell-project/codespell?tab=readme-ov-file#inline-ignore
Ref: https://github.com/codespell-project/codespell/issues/1212#issuecomment-1721152455
Ref: https://cspell.org/docs/Configuration/document-settings

Closes #17905
2025-07-21 16:09:01 +02:00
Viktor Szakats
792a61e204
curl_setup.h: move UWP detection after config-win32.h
To honor a `_WIN32_WINNT` set by `config-win32.h`.

Closes #17980
2025-07-21 15:02:21 +02:00
Viktor Szakats
a75110570a
windows: fix if_nametoindex() detection with autotools, improve with cmake
- autotools: fix auto-detection on the Windows platform.
  It was mis-detected when targeting Windows XP/2003 64-bit.
  It was permanently undetected when building for Windows 32-bit.
  ```
  lib/url.c: In function 'zonefrom_url':
  lib/url.c:1802:18: error: implicit declaration of function 'if_nametoindex' [-Wimplicit-function-declaration]
   1802 |       scopeidx = if_nametoindex(zoneid);
        |                  ^~~~~~~~~~~~~~
  lib/url.c:1802:18: error: nested extern declaration of 'if_nametoindex' [-Werror=nested-externs]
  ```
  Ref: https://github.com/curl/curl/actions/runs/16405598782/job/46351023138?pr=17982#step:10:29

  Reported-by: LoRd_MuldeR
  Fixes #17979

  Without this patch the workaround for the 8.15.0 release is:
  `export ac_cv_func_if_nametoindex=0` for Windows XP/2003 64-bit.

  Background: Checking for the `if_nametoindex()` function via
  `AC_CHECK_FUNCS()` (autotools) or `check_function_exists()` (cmake) do
  not work on Windows, for two reasons:
  - the function may be disabled at compile-time in Windows headers
    when targeting old Windows versions (XP or WS2003 in curl context)
    via `_WIN32_WINNT`. But it's always present in the system implib
    `iphlpapi` where these checks are looking.
  - for 32-bit Windows the function signature in the implib requires
    a 4-byte argument, while these checks always use no arguments,
    making them always fail.

- cmake: call `if_nametoindex` dynamically with mingw-w64 v1.0.
  This mingw-w64 version lacks prototype and implib entry for it.

- cmake: add auto-detection for Windows and use as a fallback for
  non-pre-fill cases.

- cmake: disable pre-fill with `_CURL_PREFILL=OFF`. (for testing)

- cmake: disable pre-fill for untested compilers. (i.e. non-MSVC,
  non-mingw64)

- GHA/windows: make an autotools job build for Windows XP.

Follow-up to 0d71b18153 #17413

Closes #17982
2025-07-21 13:30:01 +02:00
Stefan Eissing
3d302250ec
multi event: remove only announced
When a socket is closed, only inform the application
socket callback about it if the socket had been announced
before to the callback.

Reported-by: yaoy6 on github
Fixes #17949
Closes #17950
2025-07-20 23:17:28 +02:00
Stefan Eissing
53e5cdc47b
pytest: increase server KeepAliveTimeout
When CI is not able to give clients enough cpu, the default Apache
KeepAliveTimeout of 5 seconds may trigger and cause tests to fail.

Increase the timeout to 30 seconds for reliability.

Ref: #17963
Closes #17968
2025-07-20 23:15:11 +02:00
Pino Toscano
bed83d9d33
build: enable _GNU_SOURCE on GNU/Hurd
Unconditionally enable _GNU_SOURCE when building on GNU/Hurd; this way
it is possible to properly use/rely on GNU extensions e.g. accept4(),
memrchr(), and the GNU strerror_r().

Closes #17975
2025-07-20 23:13:41 +02:00
Stefan Eissing
960fb49245
easy handle: check validity on external calls
In each external API function passing a `CURL *` into the library, check
`GOOD_EASY_HANDLE()` if its magic is still there.

Ref: #17957
Closes #17958
2025-07-20 23:11:05 +02:00
Stefan Eissing
a15a5f4d29
vquic-tls: fix SSL backend type for QUIC connections using gnutls
Fix the copy&paste error when querying ssl info for gnutls
on QUIC connections.

Reported-by: Harry Sintonen
Closes #17976
2025-07-20 23:10:15 +02:00