Commit graph

15133 commits

Author SHA1 Message Date
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
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
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
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
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
Viktor Szakats
bf9d9fe0bd
multissl: initialize when requesting a random number
To fix test 1308 in MultiSSL builds.

Failure was caused by the random number generator virtual function being
NULL, instead of pointing to the implementation in the runtime-selected
TLS backend. This could happen in MultiSSL builds when a functionality
was asking for a random number without triggering a VTLS function table
initialization first. Such functionality is MIME, or form data via MIME.

The reason CI did not catch it in an earlier MultiSSL GHA/windows job,
is that it was a debug-enabled one. In debug-enabled builds the test
runner was overriding the random number generator for all tests.

Fixed this by moving the override to the tests requiring it, via
1fcf22585f #17971, enabling debug builds
to catch this issue.

Enable MultiSSL in two CI jobs, to verify this patch.

Fixing:
```
test 1308...[formpost tests]

libtests returned 44, when expecting 0
 1308: exit FAILED
[...]
=== Start of file stderr1308
 URL: log/3/test-1308
 tests/libtest/lib1308.c:70 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:72 Assertion 'total_size == 518' FAILED: curl_formget got wrong size back
 tests/libtest/lib1308.c:88 Assertion 'res == 0' FAILED: curl_formget returned error
 tests/libtest/lib1308.c:89 Assertion 'total_size == 899' FAILED: curl_formget got wrong size back
```
Ref: https://github.com/curl/curl/actions/runs/16387693424/job/46309536359?pr=17963#step:16:2515

Bug: https://github.com/curl/curl/pull/17963#issuecomment-3092282057

Closes #17970
2025-07-20 12:03:56 +02:00
Stefan Eissing
044de8e19b
gnutls: some small cleanups
- de-complex Curl_gtls_verifyserver() by splitting of static
  functions for parts of it.
- follow the `goto out` style with common deallocation code

Closes #17941
2025-07-18 00:41:09 +02:00
Stefan Eissing
3ad4b44073
openssl: some small cleanups
- rename Curl_oss_check_peer_cert() to Curl_ossl_check_peer_cert()
- leave altname match loop after the first success when the match
  was an ip address
- remove static subj_alt_hostcheck() since it did not really do much
- use length based infof() output of altname, even though it does
  seem always to be nul terminated

Closes #17940
2025-07-18 00:40:26 +02:00
Ammar Faizi
5cefe93eb6
socks: do_SOCKS5: Fix invalid buffer content on short send
Ahmad Gani intercepts the sendto syscall to simulate short send, but
curl incorrectly handles it. It keeps resending the version:

  sendto(4, "\x05", 1, MSG_NOSIGNAL, NULL, 0) = 1
  sendto(4, "\x05", 1, MSG_NOSIGNAL, NULL, 0) = 1

Don't restart the buffer in the `CONNECT_SOCKS_INIT` case if
`sx->outstanding` is not zero. It should continue sending the
advanced buffer.

Fixes #17942
Reported-by: Ahmad Gani <reyuki@gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Closes #17943
2025-07-18 00:38:15 +02:00
Viktor Szakats
8535068c24
config-win32: fix to set target version early
To set it before checking for it while enabling `HAVE_INET_NTOP` and
`HAVE_INET_PTON` for Vista (and up) targets.

May have affected winbuild or Visual Studio IDE Project Files.

Follow-up to 68fa9bf3f5 #9712

Closes #17928
2025-07-15 12:56:05 +02:00
Viktor Szakats
3222eabe18
tidy-up: whitespace/indent
Closes #17925
2025-07-14 18:33:43 +02:00
Stefan Eissing
e9ae1bd404
connection: clarify transport
The `transport` to use for a transfer, e.g. TCP/QUIC/UNIX/UDP, is
initially selected by options and protocol used. This is set at the
`struct connectdata` as `transport` member.

During connection establishment, this transport may change due to
Alt-Svc or Happy-Eyeballing. Most common is the switch from TCP to QUIC.

Rename the connection member to `transport_wanted` and add a way to
query the connection for the transport in use via a new connection
filter query.

The filter query can also be used in the happy eyeballing attempts when
code needs to know which transport is used by the "filter below". This
happens in wolfssl initialization, as one example.

Closes #17923
2025-07-14 14:33:18 +02:00
Stefan Eissing
674ad27f77
http/3: report handshake with version and cipher as for TCP connections
Make reporting into separate functions, to be called from QUIC handshakes
as well.

Closes #17922
2025-07-14 14:08:32 +02:00
Viktor Szakats
2f3890baaf
config-win32: fix default targets, shorten macro logic
When using winbuild or Visual Studio IDE Project Files.
To simplify and prepare for dropping support for VS2008.

Details:
- fix VS2012 default target to be Windows 8 (was Vista).
  Confirmed by CI:
  ```
  -- The C compiler identification is MSVC 17.0.61030.0
  -- Found _WIN32_WINNT=0x0602
  ```
  Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51594696/job/elbl0w5n7fmoos2f#L45
  It also aligns with the default being Windows 7 for VS2010,
  and Windows Vista for VS2008.
- bump minimum target to XP (was Windows 2000) when using VS2008.
  curl requires XP.
- add Windows release names to comments for clarity.
- add hex Windows version to a comment for clarity.
- merge VS2008/VS2012 minimum/default logic and comments.
- reduce scope of local minimum/default macros.
- shorten comments to fit within line limit.

Closes #17916
2025-07-14 13:18:32 +02:00
Daniel Stenberg
826a32dff3
altsvc: accept 'clear' without semicolon as well
Extend test 1654 to verify

Fixes #17917
Reported-by: Luke Wilde
Closes #17918
2025-07-13 17:02:34 +02:00
Ryan Hooper
b1fb8da0fa
wolfssl: add support for ML_KEM hybrids
For parity with OpenSSL 3.5

Closes #17902
2025-07-12 22:51:08 +02:00
Daniel McCarney
a2028823a8
lib/vts: fix a copy-pasted early data comment typo
In gtls.c there was a typo'd comment that I think was missing the word
"no" to indicate there's "no GnuTLS way to signal no EarlyData".

This commit fixes that typo, and also updates a copy-pasted instance
that made it into wolfssl.c where it should refer to the WolfSSL API
missing the capability, not GnuTLS.

Closes #17907
2025-07-12 19:27:36 +02:00
Daniel McCarney
d85b5d2656
lib/vtls: log rustls negotiated KEX group name
Closes #17906
2025-07-12 19:26:41 +02:00
Daniel McCarney
308922ed04
lib/vtls: prefer ciphersuite to cipher in msgs
Closes #17906
2025-07-12 19:26:38 +02:00
Daniel McCarney
e23ba71269
lib/vtls: prefer rustls-ffi ciphersuite name API
Closes #17906
2025-07-12 19:26:28 +02:00
Patrick Stoeckle
86f43af951
misc: fix typos
Just fixing some typos using: https://github.com/crate-ci/typos

Closes #17904
2025-07-12 08:59:44 +02:00
Viktor Szakats
c6b2d3d911
connect: drop unused struct member
Follow-up to 283af039c8 #14863

Closes #17908
2025-07-12 08:59:44 +02:00
Viktor Szakats
886389dc01
lib: stop time() debug overrides at the end of source in altsvc, hsts
To avoid applying it to all other sources in unity mode.

This may have affected tests setting a custom time via `CURL_TIME`,
in unity builds: 446, 780, 781, 782, 783, 970, 972, 1654, 1660

Closes #17897
2025-07-12 08:59:44 +02:00
Viktor Szakats
368ba4e13f
tidy-up: drop redundant #ifdef before #undef
Closes #17899
2025-07-12 08:59:44 +02:00
Viktor Szakats
8eab2b7086
tidy-up: whitespace
Cherry-picked from #17877
Cherry-picked from #17876

Closes #17896
2025-07-11 13:32:54 +02:00
Stefan Eissing
695eee432f
h3: fix query of concurrent streams
Queries gave wrong value or ran into NULL pointers when called at
times when connection filter was not fully initialized.

Closes #17886
2025-07-10 17:29:54 +02:00
Stefan Eissing
74a94e699a
socks: fix query when filter context is null
socks connection filter context may be NULL at the time
of a query, accomodate for that.

Closes #17885
2025-07-10 17:28:49 +02:00
Stefan Eissing
51369ae78b
http2: fix var types in is_alive() implementations
Closes #17881
2025-07-10 10:47:04 +02:00
Karthik Dasari
454395ba1e
curl_osslq: fix missing include of url.h
Follow-up to 4ccf3a31f5 #17783
Follow-up to b270fec68d #17858
Ref: #17857
Closes #17864
2025-07-08 19:58:21 +02:00