]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 weeks agofixup bad cmake endif bagder/drop-heimdal 18928/head
Daniel Stenberg [Wed, 8 Oct 2025 09:59:29 +0000 (11:59 +0200)] 
fixup bad cmake endif

4 weeks agofixup configure to not fail on Heimdal, just warn
Daniel Stenberg [Wed, 8 Oct 2025 09:55:00 +0000 (11:55 +0200)] 
fixup configure to not fail on Heimdal, just warn

4 weeks agoconfig: drop support for Heimdal
Daniel Stenberg [Wed, 8 Oct 2025 09:36:56 +0000 (11:36 +0200)] 
config: drop support for Heimdal

The kerberos5 library Heimdal is one of three GSS libraries curl
support. It has a memory leak triggered by the new test in #18917 and
the project seems mostly abandoned.

Drop support and steer users to the MIT krb5 or GNU GSS libraries.

4 weeks agoh3/ngtcp2: close just-opened QUIC stream when submit_request fails
Joshua Rogers [Tue, 7 Oct 2025 05:59:29 +0000 (13:59 +0800)] 
h3/ngtcp2: close just-opened QUIC stream when submit_request fails

Closes #18904

4 weeks agoh3/nghttp3: return NGHTTP3_ERR_CALLBACK_FAILURE from recv_header
Joshua Rogers [Tue, 7 Oct 2025 05:59:09 +0000 (13:59 +0800)] 
h3/nghttp3: return NGHTTP3_ERR_CALLBACK_FAILURE from recv_header

Closes #18904

4 weeks agoopenssl: skip session resumption when verifystatus is set
Joshua Rogers [Tue, 7 Oct 2025 02:31:18 +0000 (10:31 +0800)] 
openssl: skip session resumption when verifystatus is set

Resumed TLS sessions skip OCSP stapled-response verification.
Force a full handshake so verifystatus() runs.

Closes #18902

4 weeks agoexamples/sessioninfo: cast printf string mask length to int
Viktor Szakats [Tue, 7 Oct 2025 18:30:06 +0000 (20:30 +0200)] 
examples/sessioninfo: cast printf string mask length to int

Found via `-Wformat-signedness`:
```
docs/examples/sessioninfo.c: In function 'wrfu':
docs/examples/sessioninfo.c:75:53: error: field precision specifier '.*' expects argument of type 'int', but argument 4 has type 'unsigned int' [-Werror=format=]
  fprintf(stderr, "Certificate #%u: %.*s", i, dn.size, dn.data);
                                      ^
```
Ref: https://github.com/curl/curl/actions/runs/18320729052/job/52172864438?pr=18343#step:13:30
Ref: https://github.com/curl/curl/actions/runs/18320729095/job/52172886899?pr=18343#step:19:27

Also:
- drop unnecessary parenthesis.
- scope variables.

Ref: #18343
Closes #18918

4 weeks agonotify: use 'notify' in public header and docs
Viktor Szakats [Tue, 7 Oct 2025 10:47:19 +0000 (12:47 +0200)] 
notify: use 'notify' in public header and docs

Closes #18915

4 weeks agocmake: support building some complicated examples, build them in CI
Viktor Szakats [Tue, 7 Oct 2025 10:36:49 +0000 (12:36 +0200)] 
cmake: support building some complicated examples, build them in CI

Build these examples when the necessary dependencies are present:
- cacertinmem, usercertinmem (OpenSSL/fork)
- multi-uv (libuv)
- multithread, threaded-ssl (pthread)
- sessioninfo (GnuTLS)

Indicate the necessary dependency via a `Required:` comment placed in
the source file. A single dependency per source is supported as of now.
The name of the dependency should match the variable used within
the cmake scripts, which in turn matches the macro used in the config
header. E.g. for GnuTLS it's `USE_GNUTLS`.

Also:
- GHA/macos: build examples in two job to test GnuTLS and pthread ones.
- GHA/linux: enable libuv to test it with examples.

Follow-up to 6bb77140322565ca17f5a66aa5d8500d8d469cca #18914
Closes #18909

4 weeks agongtcp2: fix handling of blocked stream data
Stefan Eissing [Tue, 7 Oct 2025 09:30:46 +0000 (11:30 +0200)] 
ngtcp2: fix handling of blocked stream data

The stream blocking might not be the one of the current easy handle.
Look up the stream to be marked as blocking via its stream_id in the
internal hash. Theoretically, this does not have to be one of the h3
streams, so not finding it is not an error.

Fixes #18905
Reported-by: Joshua Rogers
Closes #18906

4 weeks agoosslq: set out idle timeout to 0
Stefan Eissing [Tue, 7 Oct 2025 10:05:08 +0000 (12:05 +0200)] 
osslq: set out idle timeout to 0

Similar to our ngtcp2 backend, set our idle timeout for the connection
to 0, meaning we have no such timeout from our side. The effective idle
timeout is then the one announced by the peer.

Closes #18907

4 weeks agoCURLMOPT_NOTIFYFUNCTION.md: minor language polish
Daniel Stenberg [Tue, 7 Oct 2025 14:18:22 +0000 (16:18 +0200)] 
CURLMOPT_NOTIFYFUNCTION.md: minor language polish

- mention the possibility of new types in the future
- s/a an/an

Closes #18913

4 weeks agomulti: use CURLMNOTIFY_ as notification id prefix
Daniel Stenberg [Tue, 7 Oct 2025 14:00:59 +0000 (16:00 +0200)] 
multi: use CURLMNOTIFY_ as notification id prefix

Since CURLM_ is already used as prefix for multi error codes, it makes
it easier to detect and understand the difference between identifiers -
and allows for scripts on the website and elsewhere to separate them
properly.

Follow-up to 53be8166b2b16d9682
Closes #18912

4 weeks agoexamples: fix build issues in 'complicated' examples
Viktor Szakats [Tue, 7 Oct 2025 11:54:17 +0000 (13:54 +0200)] 
examples: fix build issues in 'complicated' examples

- cacertinmem: build cleanly with BoringSSL/AWS-LC.
- cacertinmem: silence `-Wcast-function-type-strict`.
- multi-uv: fix callback prototypes.
- multithread, threaded-ssl: do not pass const as thread arg.
- sessioninfo: fix suppressing deprecated feature warning.
- usercertinmem: sync formatting with cacertinmem.

Follow-up to 4a6bdd5899005c25ce222dc21dcfd1a779544330 #18908
Cherry-picked from #18909
Closes #18914

4 weeks agomulti: notify rename, remove the last stragglers
Stefan Eissing [Tue, 7 Oct 2025 11:40:05 +0000 (13:40 +0200)] 
multi: notify rename, remove the last stragglers

in the public API.

Follow-up to 357808f4addef44c2c48f17d

Closes #18910

4 weeks agocmake: build the "all" examples source list dynamically
Viktor Szakats [Tue, 7 Oct 2025 12:04:12 +0000 (14:04 +0200)] 
cmake: build the "all" examples source list dynamically

To allow building conditional examples, and to simplify by avoiding
cmake-version dependent code.

Follow-up to fe5225b5eaf3a1a0ce149023d38a9922a114798b #18209
Cherry-picked from #18909
Closes #18911

4 weeks agosocks: handle premature close
Stefan Eissing [Mon, 6 Oct 2025 12:08:07 +0000 (14:08 +0200)] 
socks: handle premature close

When expecting to receive a number of bytes during socks connect,
treat an early connection close as error.

Reported-by: Joshua Rogers
Closes #18883

4 weeks agoexamples/usercertinmem: avoid stripping const
Viktor Szakats [Tue, 7 Oct 2025 10:04:03 +0000 (12:04 +0200)] 
examples/usercertinmem: avoid stripping const

This API started accepting a const somewhere between OpenSSL 1.0.2b and
1.0.2t. It means this example, like the other similar one now works best
with those versions or newer:
```
docs/examples/usercertinmem.c:100:33: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual]
  100 |   bio = BIO_new_mem_buf((char *)mypem, -1);
      |                                 ^
docs/examples/usercertinmem.c:121:34: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual]
  121 |   kbio = BIO_new_mem_buf((char *)mykey, -1);
      |                                  ^
```

Closes #18908

4 weeks agovquic/ngtcp2: compare idle timeout in ms to avoid overflow
Joshua Rogers [Tue, 7 Oct 2025 07:48:36 +0000 (15:48 +0800)] 
vquic/ngtcp2: compare idle timeout in ms to avoid overflow

Closes #18903

4 weeks agovquic: fix idle-timeout checks (ngtcp2 ms<-->ns), 64-bit log & honor 0=no-timeout...
Joshua Rogers [Tue, 7 Oct 2025 05:34:26 +0000 (13:34 +0800)] 
vquic: fix idle-timeout checks (ngtcp2 ms<-->ns), 64-bit log & honor 0=no-timeout (osslquic)

Closes #18903

4 weeks agomulti: add notifications API
Stefan Eissing [Mon, 1 Sep 2025 09:58:16 +0000 (11:58 +0200)] 
multi: add notifications API

Add infrastructure to colled and dispatch notifications for transfers
and the multi handle in general. Applications can register a callback
and en-/disable notification type the are interested in.

Without a callback installed, notifications are not collected. Same when
a notification type has not been enabled.

Memory allocation failures on adding notifications lead to a general
multi failure state and result in CURLM_OUT_OF_MEMORY returned from
curl_multi_perform() and curl_multi_socket*() invocations.

Closes #18432

4 weeks agongtcp2: fix returns when TLS verify failed
Stefan Eissing [Mon, 6 Oct 2025 11:16:55 +0000 (13:16 +0200)] 
ngtcp2: fix returns when TLS verify failed

In both send/recv functions of the ngtcp2 filter, when TLS verification
has failed, jump out by skipping ingress/egress handling.

Reported-by: Joshua Rogers
Closes #18881

4 weeks agoexamples/synctime: make the sscanf not overflow the local buffer
Daniel Stenberg [Mon, 6 Oct 2025 14:19:21 +0000 (16:19 +0200)] 
examples/synctime: make the sscanf not overflow the local buffer

If the incoming Date: header has a funky format.

Bonus: remove bad null terminator assumptions for header

Reported-by: Stanislav Fort
Closes #18890

4 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 6 Oct 2025 21:59:33 +0000 (23:59 +0200)] 
RELEASE-NOTES: synced

4 weeks agotelnet: ignore empty suboptions
Daniel Stenberg [Mon, 6 Oct 2025 21:05:10 +0000 (23:05 +0200)] 
telnet: ignore empty suboptions

To avoid printing from en empty buffer

Reported-by: Joshua Rogers
Closes #18899

4 weeks agotftp: return error if it hits an illegal state
Daniel Stenberg [Mon, 6 Oct 2025 16:25:55 +0000 (18:25 +0200)] 
tftp: return error if it hits an illegal state

Reported-by: Joshua Rogers
Closes #18894

4 weeks agotftp: default timeout per block is now 15 seconds
Daniel Stenberg [Mon, 6 Oct 2025 15:32:50 +0000 (17:32 +0200)] 
tftp: default timeout per block is now 15 seconds

Down from the previous (rather ridiculous) 3600.

Reported-by: Joshua Rogers
Closes #18893

4 weeks agotftp: don't pin or check address if recvfrom returns error
Daniel Stenberg [Mon, 6 Oct 2025 15:23:18 +0000 (17:23 +0200)] 
tftp: don't pin or check address if recvfrom returns error

Follow-up to c4f9977c66bbb05a837a7eb0300
Reported-by: Joshua Rogers
Closes #18892

4 weeks agonoproxy: fix the IPV6 network mask pattern match
Daniel Stenberg [Mon, 6 Oct 2025 14:53:27 +0000 (16:53 +0200)] 
noproxy: fix the IPV6 network mask pattern match

It would mismatch if the network prefix length with was not divisible by
8.

Extended test 1614 to verify

Reported-by: Stanislav Fort
Closes #18891

4 weeks agomdlinkcheck: reject URLs containing quotes
Daniel Stenberg [Mon, 6 Oct 2025 14:10:27 +0000 (16:10 +0200)] 
mdlinkcheck: reject URLs containing quotes

Those would be illegal anyway and would make the script misbehave

Reported-by: Stanislav Fort
Closes #18889

4 weeks agotelnet: send failure logged but not returned
Daniel Stenberg [Mon, 6 Oct 2025 13:01:48 +0000 (15:01 +0200)] 
telnet: send failure logged but not returned

Return error correctly when sending fails.

Reported-by: Joshua Rogers
Closes #18887

4 weeks agotelnet: return error if WSAEventSelect fails
Daniel Stenberg [Mon, 6 Oct 2025 12:59:53 +0000 (14:59 +0200)] 
telnet: return error if WSAEventSelect fails

Reported-by: Joshua Rogers
Closes #18886

4 weeks agomanagen: verify the options used in example lines
Daniel Stenberg [Mon, 6 Oct 2025 12:41:14 +0000 (14:41 +0200)] 
managen: verify the options used in example lines

Also fix the --knownhosts typo

Follow-up to aae18c4bdc1a3bf5

Reported-by: Daniel Terhorst-North
URL: https://mas.to/@tastapod/115327102344617386
Closes #18884

4 weeks agopingpong: remove two old leftover debug infof() calls
Daniel Stenberg [Mon, 6 Oct 2025 11:05:01 +0000 (13:05 +0200)] 
pingpong: remove two old leftover debug infof() calls

4 weeks agotest766: verify CURLOPT_SOCKOPTFUNCTION error on accept
Daniel Stenberg [Mon, 6 Oct 2025 10:43:40 +0000 (12:43 +0200)] 
test766: verify CURLOPT_SOCKOPTFUNCTION error on accept

This test does active FTP with a socketopt callback that returns error
for the CURLSOCKTYPE_ACCEPT "purpose" to make sure we test and exercise
this error path - without leaks.

Closes #18879

4 weeks agocurl_osslq: error out properly if BIO_ADDR_rawmake() fails
Daniel Stenberg [Mon, 6 Oct 2025 10:27:36 +0000 (12:27 +0200)] 
curl_osslq: error out properly if BIO_ADDR_rawmake() fails

Reported-by: Joshua Rogers
Closes #18878

4 weeks agolibssh2/sftp_realpath: change state consistently
Daniel Stenberg [Mon, 6 Oct 2025 09:07:47 +0000 (11:07 +0200)] 
libssh2/sftp_realpath: change state consistently

Change the state in this function at a single spot independent of
success or not to simplify.

Reported-by: Joshua Rogers
Closes #18875

4 weeks agolibssh2: fix return code for EAGAIN
Daniel Stenberg [Mon, 6 Oct 2025 09:03:35 +0000 (11:03 +0200)] 
libssh2: fix return code for EAGAIN

In disconnect

Closes #18874

4 weeks agotidy-up: miscellaneous (cont.)
Viktor Szakats [Mon, 29 Sep 2025 10:36:14 +0000 (12:36 +0200)] 
tidy-up: miscellaneous (cont.)

- examples: replace magic numbers with `sizeof()`.
- typos: drop rules no longer needed after excluding tests/data.
- typos: move an exception inline.
- alpha-sort lists.
- fix indentation, whitespace.

Closes #18898

4 weeks agolib: stop overriding system printf symbols
Viktor Szakats [Sat, 4 Oct 2025 10:58:49 +0000 (12:58 +0200)] 
lib: stop overriding system printf symbols

After this patch, the codebase no longer overrides system printf
functions. Instead it explicitly calls either the curl printf functions
`curl_m*printf()` or the system ones using their original names.

Also:
- drop unused `curl_printf.h` includes.
- checksrc: ban system printf functions, allow where necessary.

Follow-up to db98daab05aec251bcb6615d2d38dfebec291736 #18844
Follow-up to 4deea9396bc7dd25c6362fa746a57bf309c74ada #18814

Closes #18866

4 weeks agoREUSE: bump reuse to v6, add more fences to fix issues
Viktor Szakats [Mon, 6 Oct 2025 18:35:38 +0000 (20:35 +0200)] 
REUSE: bump reuse to v6, add more fences to fix issues

Closes #18895
Closes #18897

4 weeks agoGHA/configure-vs-cmake: reduce windows cross-toolchain apt installs
Viktor Szakats [Mon, 6 Oct 2025 18:00:55 +0000 (20:00 +0200)] 
GHA/configure-vs-cmake: reduce windows cross-toolchain apt installs

Download size: 277 MB -> 65 MB (installed: 1293 MB -> 401 MB)

Also as a workaround for Azure Ubuntu mirror slowdown issues:
https://github.com/curl/curl/actions/runs/18289326469/job/52072333582?pr=18866

Follow-up to 0455d8772a1af20ce63c46c5738582aa9b1b8441 #18509

Closes #18896

4 weeks agoldap: tidy-up types, fix error code confusion
Viktor Szakats [Mon, 6 Oct 2025 13:46:29 +0000 (15:46 +0200)] 
ldap: tidy-up types, fix error code confusion

- fix `CURLcode` vs. LDAP result code confusion.
  Return `LDAP_NO_MEMORY` when `Curl_create_sspi_identity()` fails,
  since it can only return `CURLE_OUT_OF_MEMORY` as error.
- use `ULONG` for result code on Windows. Drop casts.
- use portable `curl_ldap_num_t`. Drop casts.
- replace magic number 0 with `LDAP_SUCCESS`.
- compare with `LDAP_SUCCESS` instead of assuming non-zero.
  (where necessary.)
- add/fix `#endif` comments.
- fix indentation.

Closes #18888

4 weeks agotelnet: make bad_option() consider NULL a bad option too
Daniel Stenberg [Mon, 6 Oct 2025 08:56:44 +0000 (10:56 +0200)] 
telnet: make bad_option() consider NULL a bad option too

Follow-up to a72e1552f22
Closes #18873

4 weeks agoftp: remove misleading comments
Daniel Stenberg [Mon, 6 Oct 2025 08:34:22 +0000 (10:34 +0200)] 
ftp: remove misleading comments

They indicated that sockets would not be closed but they are.

Reported-by: Joshua Rogers
Closes #18871

4 weeks agoftp: improve fragile check for first digit > 3
Daniel Stenberg [Mon, 6 Oct 2025 08:20:45 +0000 (10:20 +0200)] 
ftp: improve fragile check for first digit > 3

In a case where rubbish would be sent in the line something that isn't a
digit could be first in line and treated as less than '3'. Prevent this
risk by first doing a check that the byte is a digit.

Reported-by: Joshua Rogers
Closes #18870

4 weeks agoftp: add extra buffer length check
Daniel Stenberg [Mon, 6 Oct 2025 08:11:30 +0000 (10:11 +0200)] 
ftp: add extra buffer length check

This adds an extra check that the buffer really has data enough (at
least 4 bytes) to check for a status code before doing so. It *should*
not be necessary, but this was pointed out by an analyzer and it feels
better to make sure.

Reported-by: Joshua Rogers
Closes #18869

4 weeks agoftp: fix the 213 scanner memchr buffer limit argument
Daniel Stenberg [Mon, 6 Oct 2025 07:54:39 +0000 (09:54 +0200)] 
ftp: fix the 213 scanner memchr buffer limit argument

Reported-by: Joshua Rogers
Closes #18867

4 weeks agocf-socket: check params and remove accept procondition
Stefan Eissing [Mon, 6 Oct 2025 11:45:38 +0000 (13:45 +0200)] 
cf-socket: check params and remove accept procondition

- creating a socket filter with NULL addrinfo fails with
  CURLE_BAD_FUNCTION_ARGUMENT
- remove getsockname use before accept call, serves no purpose
  and did not lead to proper error before

Reported-by: Joshua Rogers
Closes #18882

4 weeks agocf-socket: always check Curl_cf_socket_peek() return code
Daniel Stenberg [Mon, 6 Oct 2025 06:22:39 +0000 (08:22 +0200)] 
cf-socket: always check Curl_cf_socket_peek() return code

Make it trigger a warning if not.

Reported-by: Joshua Rogers
Closes #18862

4 weeks agowindows: use consistent format when showing error codes
Viktor Szakats [Mon, 6 Oct 2025 01:02:24 +0000 (03:02 +0200)] 
windows: use consistent format when showing error codes

For `GetLastError()` and `SECURITY_STATUS`:
0x-prefixed, 8-digit, lowercase, hex: 0x1234abcd

Also: say `GetLastError()` instead of `errno` in one message.

Closes #18877

4 weeks agokrb5_sspi: the chlg argument is NOT optional
Daniel Stenberg [Mon, 6 Oct 2025 07:44:45 +0000 (09:44 +0200)] 
krb5_sspi: the chlg argument is NOT optional

Fix the comment, add assert.

Reported-by: Joshua Rogers
Closes #18865

4 weeks agolibssh2: clarify that sshp->path is always at least one byte
Daniel Stenberg [Mon, 6 Oct 2025 07:38:30 +0000 (09:38 +0200)] 
libssh2: clarify that sshp->path is always at least one byte

Reported-by: Joshua Rogers
Closes #18864

4 weeks agolibssh2: bail out on chgrp and chown number parsing errors
Daniel Stenberg [Mon, 6 Oct 2025 07:02:09 +0000 (09:02 +0200)] 
libssh2: bail out on chgrp and chown number parsing errors

Reported-by: Joshua Rogers
Closes #18863

4 weeks agotest1711: send a >64K mail with SMTP
Daniel Stenberg [Mon, 6 Oct 2025 05:51:48 +0000 (07:51 +0200)] 
test1711: send a >64K mail with SMTP

A failed attempt to reproduce #18798

Closes #18861

4 weeks agotool_getparam: add --knownhosts
Daniel Stenberg [Sun, 5 Oct 2025 21:19:13 +0000 (23:19 +0200)] 
tool_getparam: add --knownhosts

To allow users to specify a known hosts file that is not the default
one: ~/.ssh/known_hosts

URL: https://github.com/curl/curl/discussions/18784
Closes #18859

4 weeks agoquiche: fix possible leaks on teardown
Stefan Eissing [Mon, 6 Oct 2025 11:05:14 +0000 (13:05 +0200)] 
quiche: fix possible leaks on teardown

When the close of the quiche filter was never called, the destroy function
did not release all allicated resources.

When closing a quiche filter, set the connected flag to FALSE.

Reported-by: Joshua Rogers
Closes #18880

4 weeks agowindows: use native error code types more
Viktor Szakats [Mon, 6 Oct 2025 00:33:49 +0000 (02:33 +0200)] 
windows: use native error code types more

- curlx_get_winapi_error: accept DWORD (was: int), move casts one level
  up the callstack.

- sspi: bump some types to `SECURITY_STATUS` (int -> LONG).

- digest_sspi: drop unnecessary cast.

Closes #18868

4 weeks agoopenssl: call SSL_get_error() with proper error
Daniel Stenberg [Mon, 6 Oct 2025 08:39:29 +0000 (10:39 +0200)] 
openssl: call SSL_get_error() with proper error

The error function should be called with the return code from the
previous call to SSL_shutdown() as argument.

Closes #18872

4 weeks agosrc: stop overriding system printf symbols
Viktor Szakats [Sat, 4 Oct 2025 10:24:57 +0000 (12:24 +0200)] 
src: stop overriding system printf symbols

Also:
- tool_operate: use the socket printf mask, drop cast.

Follow-up to 4deea9396bc7dd25c6362fa746a57bf309c74ada #18814

Closes #18844

4 weeks agocurlx: move Curl_strerror, use in src and tests, ban `strerror` globally
Viktor Szakats [Sat, 4 Oct 2025 01:10:37 +0000 (03:10 +0200)] 
curlx: move Curl_strerror, use in src and tests, ban `strerror` globally

Also:
- tests/server: replace local `sstrerror()` with `curlx_strerror()`.
- tests/server: show the error code next to the string, where missing.
- curlx: use `curl_msnprintf()` when building for src and tests.
  (units was already using it.)
- lib: drop unused includes found along the way.
- curlx_strerror(): avoid compiler warning (and another similar one):
  ```
  In file included from servers.c:14:
  ../../lib/../../lib/curlx/strerr.c: In function ‘curlx_strerror’:
  ../../lib/../../lib/curlx/strerr.c:328:32: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
    328 |       SNPRINTF(buf, buflen, "%s", msg);
        |                                ^
  ../../lib/../../lib/curlx/strerr.c:47:18: note: ‘snprintf’ output 1 or more bytes (assuming 2) into a destination of size 1
     47 | #define SNPRINTF snprintf
        |                  ^
  ../../lib/../../lib/curlx/strerr.c:328:7: note: in expansion of macro ‘SNPRINTF’
    328 |       SNPRINTF(buf, buflen, "%s", msg);
        |       ^~~~~~~~
  ```

Follow-up to 45438c8d6f8e70385d66c029568524e9e803c539 #18823

Closes #18840

4 weeks agotests/server: replace banned functions with `curlx_str_hex`
Viktor Szakats [Fri, 3 Oct 2025 22:39:11 +0000 (00:39 +0200)] 
tests/server: replace banned functions with `curlx_str_hex`

Replace an `strtol()` and `strtoul()` call, both used in hex mode, with
`curlx_str_hex()`.

Follow-up to 45438c8d6f8e70385d66c029568524e9e803c539 #18823

Closes #18837

4 weeks agounit1323: sync time types and printf masks, drop casts
Viktor Szakats [Sun, 5 Oct 2025 22:10:13 +0000 (00:10 +0200)] 
unit1323: sync time types and printf masks, drop casts

Closes #18860

4 weeks agotool_filetime: replace cast with the fitting printf mask (Windows)
Viktor Szakats [Sun, 5 Oct 2025 18:36:21 +0000 (20:36 +0200)] 
tool_filetime: replace cast with the fitting printf mask (Windows)

Follow-up to d25b0503795f1fbf557632ce870298f52f2a78c1 #2204

Closes #18858

4 weeks agourl: make Curl_init_userdefined return void
Daniel Stenberg [Sun, 5 Oct 2025 12:07:39 +0000 (14:07 +0200)] 
url: make Curl_init_userdefined return void

It cannot actually return an error, so the parent function does not need
to check for error and have an exit path that cannot be reached.

Pointed out by CodeSonar

Closes #18855

4 weeks agostrerror: drop workaround for SalfordC win32 header bug
Viktor Szakats [Sun, 5 Oct 2025 16:36:06 +0000 (18:36 +0200)] 
strerror: drop workaround for SalfordC win32 header bug

Follow-up to ccf43ce91dd9a56f30a4029377126e4c83c7f08a #15957

Closes #18857

4 weeks agoGHA/http3-linux: cleanup cache entry name after prev
Viktor Szakats [Sun, 5 Oct 2025 09:08:40 +0000 (11:08 +0200)] 
GHA/http3-linux: cleanup cache entry name after prev

To avoid duplicate `no-deprecated` in the cache entry name.

Follow-up to c96bf36557ea2302e4cb838ee1e4bb9827fecee7 #18833

Closes #18853

4 weeks agotelnet: print DISPlay LOCation in printsub without mutating buffer
Joshua Rogers [Sun, 5 Oct 2025 03:07:54 +0000 (11:07 +0800)] 
telnet: print DISPlay LOCation in printsub without mutating buffer

Closes #18852

4 weeks agotelnet: use pointer[0] for "unknown" option instead of pointer[i]
Joshua Rogers [Sun, 5 Oct 2025 02:57:29 +0000 (10:57 +0800)] 
telnet: use pointer[0] for "unknown" option instead of pointer[i]

i is taken from pointer[length-2] (often the IAC byte) before we do
length -= 2, so using pointer[i] indexes an arbitrary/stale byte
unrelated to the option code. pointer[0] is the suboption’s option code
per the telnet SB format, so printing pointer[0] yields correct, stable
diagnostics.

Closes #18851

4 weeks agocpool: make bundle->dest an array; fix UB
Joshua Rogers [Sun, 5 Oct 2025 02:38:14 +0000 (10:38 +0800)] 
cpool: make bundle->dest an array; fix UB

Replace `char *dest[1]` with a proper `char dest[1]` array in
cpool_bundle. This removes undefined behavior from memcpy (writing past
the declared object) while keeping the same key semantics: dest_len is
strlen+1 (includes NUL), and hash add/delete calls remain unchanged.

Closes #18850

4 weeks agoGHA: remove the hacktoberfest label action
Daniel Stenberg [Sat, 4 Oct 2025 21:17:32 +0000 (23:17 +0200)] 
GHA: remove the hacktoberfest label action

No one cares about hacktoberfest anymore.

Closes #18849

4 weeks agochecksrc: fix possible endless loops/errors in the banned function logic
Viktor Szakats [Sat, 4 Oct 2025 11:04:29 +0000 (13:04 +0200)] 
checksrc: fix possible endless loops/errors in the banned function logic

By quoting the search expression to be replaced. This avoid the issue
when the code leading up to a banned function contained regex characters
that the script did not explicitly handle, e.g. `+`.

Assisted-by: Daniel Stenberg
Ref: https://perldoc.perl.org/functions/quotemeta
Follow-up to dd37d6970cfd8b4cf47ebd469f03772813b92c23 #18775

Closes #18845

4 weeks agounit1664: drop casts, expand masks to full values
Viktor Szakats [Sat, 4 Oct 2025 00:53:02 +0000 (02:53 +0200)] 
unit1664: drop casts, expand masks to full values

Follow-up to 4deea9396bc7dd25c6362fa746a57bf309c74ada #18814

Closes #18838

4 weeks agoGHA: drop quictls 3.3.0 builds in favor of openssl 3.5+
Viktor Szakats [Fri, 3 Oct 2025 14:40:28 +0000 (16:40 +0200)] 
GHA: drop quictls 3.3.0 builds in favor of openssl 3.5+

- http3-linux: move local nghttpx (nghttp2) build to openssl (from
  quictls). Also tried LibreSSL, but it made some HTTP/2 tests fails.

- http3-linux: drop quictls ngtcp2 build.

- http3-linux: build local openssl with `no-deprecated`.
  (previously tested in the quictls local build.)

- http3-linux: explicitly disable LDAP in cmake openssl jobs.
  cmake builds auto-detect OpenLDAP (autotools don't), and when enabled,
  linking curl fails because system `libsasl.so` requires MD5 openssl
  functions, which are missing from openssl no-deprecated builds.

- macos: move options tested in quictls jobs to other ones.

- linux: drop unused quictls local build. (it was used for msh3.)
  Follow-up to 91138b014d960d2ef6ce9cd0ca237d0220b2458d #17729

- renovate: drop quictls bump detection.

Closes #18833

4 weeks agoexamples: fix two build issues surfaced with WinCE
Viktor Szakats [Sat, 4 Oct 2025 02:33:49 +0000 (04:33 +0200)] 
examples: fix two build issues surfaced with WinCE

Both may apply to rare non-WinCE Windows builds too.

- fix gcc 4.4.0 preprocessor error:
  ```
  docs/examples/http2-upload.c:43:8: error: "_MSC_VER" is not defined
  ```
  Ref: https://github.com/curl/curl/actions/runs/18238150607/job/51935502616

- fix wrong header order:
  Inlcude `windows.h` after `winsock2.h` via `curl/curl.h`.

Regressions from 45438c8d6f8e70385d66c029568524e9e803c539 #18823

Closes #18843

4 weeks agoexamples: drop unused `curl/mprintf.h` includes
Viktor Szakats [Sat, 4 Oct 2025 02:51:19 +0000 (04:51 +0200)] 
examples: drop unused `curl/mprintf.h` includes

Follow-up to 45438c8d6f8e70385d66c029568524e9e803c539 #18823

Closes #18842

4 weeks agoopenssl: fix build for v1.0.2
Viktor Szakats [Sat, 4 Oct 2025 02:12:17 +0000 (04:12 +0200)] 
openssl: fix build for v1.0.2

```
lib/vtls/openssl.c: In function 'asn1_object_dump':
lib/vtls/openssl.c:299:42: error: passing argument 3 of 'i2t_ASN1_OBJECT' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  299 |   int i = i2t_ASN1_OBJECT(buf, (int)len, a);
      |                                          ^
In file included from /home/runner/djgpp/include/openssl/objects.h:965,
                 from /home/runner/djgpp/include/openssl/evp.h:94,
                 from /home/runner/djgpp/include/openssl/x509.h:73,
                 from /home/runner/djgpp/include/openssl/ssl.h:156,
                 from lib/curl_ntlm_core.c:71,
                 from bld/lib/CMakeFiles/libcurl_static.dir/Unity/unity_0_c.c:88:
/home/runner/djgpp/include/openssl/asn1.h:921:58: note: expected 'ASN1_OBJECT *' {aka 'struct asn1_object_st *'} but argument is of type 'const ASN1_OBJECT *' {aka 'const struct asn1_object_st *'}
  921 | int i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);
      |                                             ~~~~~~~~~~~~~^
```
Ref: https://github.com/curl/curl/actions/runs/18236773678/job/51931937131?pr=18039

Follow-up to bb46d42407cd0503a9c499b4646af594a4db4947 #18647

Closes #18841

4 weeks agolib: drop unused include and duplicate guards
Viktor Szakats [Sat, 4 Oct 2025 01:11:09 +0000 (03:11 +0200)] 
lib: drop unused include and duplicate guards

Closes #18839

4 weeks agotests: stop overriding system printf symbols
Viktor Szakats [Thu, 2 Oct 2025 14:01:15 +0000 (16:01 +0200)] 
tests: stop overriding system printf symbols

To make the source code match the functions called at runtime.
And to avoid the preprocessor trick that may introduces build issues.

Before this patch, libtests, tunits and units were calling a mixture
of curl and system printf calls, then transformed them all to curl
printf calls by including `curl_printf.h`.

Changes made:
- tests: stop including `curl_printf.h`.
- libtest: switch a couple of outlier system printf calls to curl
  printf.
- unit: use more curl printf to avoid casts and show whole values.
- unit: switch remaining calls to curl printf explicitly.
- tunit: switch to call curl printf explicitly.
- libtest, tunit, unit: ban system printf.
- unit1307, unit1607, unit1609, unit1652, unit1655, unit3214: bump
  types/masks to avoid casts.

After this patch:
- libtests, tunits, units: use exclusively curl printf.
  (as before, but explicitly, without relying on redefinitions.)
- servers: is unchanged (it can only use system printf).

Closes #18814

4 weeks agochecksrc: reduce directory-specific exceptions
Viktor Szakats [Thu, 2 Oct 2025 19:33:48 +0000 (21:33 +0200)] 
checksrc: reduce directory-specific exceptions

By making them defaults, then fixing and/or reshuffling remaining
exceptions as necessary.

- checksrc: ban by default: `snprintf`, `vsnprintf`, `sscanf`, `strtol`.
- examples: replace `strtol` with `atoi` to avoid a checksrc exception.
- tests/libtest: replace `strtol` with `atol`.
- tests/server: replace most `strtol` with `atol`.
- tests/server: replace most `strtoul` with `atol`/`atoi`.
- tests/server: drop no longer used `util_ultous`.
- fix typo in checksrc rules: `vsnprint` -> `vsnprintf`.
- update local exceptions.

Also:
- examples: ban curl printf functions. They're discouraged in user code.
- examples: replace curl printf with system printf.
  Add `snprintf` workaround for <VS2015.
- examples/synctime: fix `-Wfloat-equal`.
- examples/synctime: exclude for non-Windows and non-UWP Windows.
- examples/synctime: build by default.

Closes #18823

4 weeks agochecksrc: fix to handle `)` predecing a banned function
Viktor Szakats [Fri, 3 Oct 2025 01:12:39 +0000 (03:12 +0200)] 
checksrc: fix to handle `)` predecing a banned function

Fixing:
```
Unmatched ) in regex; marked by <-- HERE in m/  \*buffer_len = \(ssize_t) <-- HERE
  strtol\(/ at /home/runner/work/curl/curl/scripts/checksrc.pl line 916, <$R> line 380.
```
Ref: https://github.com/curl/curl/actions/runs/18209824275/job/51848079550#step:3:5

Also add a test case.

Follow-up to 684f4cdd3ef0cc41c547fce0e45d8a059a3058b3 #18779
Cherry-picked from #18823
Closes #18836

4 weeks agoGHA: update dependency google/boringssl to v0.20251002.0
renovate[bot] [Fri, 3 Oct 2025 15:54:06 +0000 (15:54 +0000)] 
GHA: update dependency google/boringssl to v0.20251002.0

Closes #18834

4 weeks agoMakefile.example: fix option order [ci skip]
Viktor Szakats [Fri, 3 Oct 2025 19:15:33 +0000 (21:15 +0200)] 
Makefile.example: fix option order [ci skip]

The `ld` linker is sensitive to this, and did not find libcurl symbol
with the order before this patch. Seen with mingw-w64 gcc.

Follow-up to f6ddc1fc1e25ff8ea866f90942719af898d0ef0c #18554

Closes #18835

5 weeks agodoh: inherit new custom ssl flags
Stefan Eissing [Fri, 3 Oct 2025 12:15:04 +0000 (14:15 +0200)] 
doh: inherit new custom ssl flags

The new custom_* flags in the SSL config need to be inherited when
setting up the doh easy handle, so that defaults apply the same way as
for the original easy handle.

Closes #18831

5 weeks agoGHA: show full versions next to pinned actions
Viktor Szakats [Fri, 3 Oct 2025 12:27:28 +0000 (14:27 +0200)] 
GHA: show full versions next to pinned actions

Also quotes to a configuration entry.

Follow-up to 2e5993ab0812fd1a983738f6d6efbc7bb0806144 #18827

Closes #18832

5 weeks agoprogress: expand to use 6 characters per size
Daniel Stenberg [Fri, 3 Oct 2025 08:51:46 +0000 (10:51 +0200)] 
progress: expand to use 6 characters per size

Previously the progress meter used a maximum of five digits+letter in
the progress meter output: up to 99999 bytes and then 9999k, 9999M etc.
The output then used two spaces after the size between the next field in
the display.

This new approach uses one letter more with only one space in between
the fields. It makes it possible to show up to 999999 bytes and then
99999k, 99999M etc. The function uses a single decimal when outputting a
value less than 1000 in any unit. Like 999.9M.

Closes #18828

5 weeks agoGHA: update actions/upload-artifact action to v4.6.2
renovate[bot] [Fri, 3 Oct 2025 11:55:38 +0000 (11:55 +0000)] 
GHA: update actions/upload-artifact action to v4.6.2

Closes #18830

5 weeks agoGHA/checksrc: pass zizmor a GH token, fix warnings found
Viktor Szakats [Fri, 3 Oct 2025 09:43:10 +0000 (11:43 +0200)] 
GHA/checksrc: pass zizmor a GH token, fix warnings found

For a complete, online, check.

After this patch the check takes 30s, up from a fraction of a second.

Also bump CodeQL actions to their latest version.

Closes #18827

5 weeks agotool_progress: fix < 10000 output
Daniel Stenberg [Fri, 3 Oct 2025 08:18:27 +0000 (10:18 +0200)] 
tool_progress: fix < 10000 output

Follow-up to e49698925c7f90e

Closes #18826

5 weeks agodocs/cmdline-opts: drop double quotes from GLOBBING and URL examples
Daniel Stenberg [Fri, 3 Oct 2025 10:38:40 +0000 (12:38 +0200)] 
docs/cmdline-opts: drop double quotes from GLOBBING and URL examples

It looks easier on the eye without them

Closes #18829

5 weeks agovquic: handling of io improvements
Stefan Eissing [Thu, 2 Oct 2025 12:20:05 +0000 (14:20 +0200)] 
vquic: handling of io improvements

- better tracing of what system call is used and how often
- ngtcp2: combine vquic_send into larger chunks
- ngtcp2: define own PMTU values and enable MTU probing
- ngtcp2: trace interesting remote transport parameters

Closes #18812

5 weeks agossl: support Apple SecTrust configurations
Stefan Eissing [Wed, 24 Sep 2025 08:19:46 +0000 (10:19 +0200)] 
ssl: support Apple SecTrust configurations

- configure/cmake support for enabling the option
- supported in OpenSSL and GnuTLS backends
- when configured, Apple SecTrust is the default trust store
  for peer verification. When one of the CURLOPT_* for adding
  certificates is used, that default does not apply.
- add documentation of build options and SSL use

Closes #18703

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 3 Oct 2025 06:30:55 +0000 (08:30 +0200)] 
RELEASE-NOTES: synced

Add OpenSSL-QUIC as an item to get removed

5 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 3 Oct 2025 06:26:56 +0000 (08:26 +0200)] 
RELEASE-NOTES: synced

5 weeks agoDEPRECATE.md: remove OpenSSL 1.1.1 support already in December 2025
Daniel Stenberg [Thu, 2 Oct 2025 21:00:24 +0000 (23:00 +0200)] 
DEPRECATE.md: remove OpenSSL 1.1.1 support already in December 2025

No sponsors == remove it

Closes #18822

5 weeks agoDEPRECATE.md: We remove the OpenSSL-QUIC backend in March 2026
Daniel Stenberg [Thu, 2 Oct 2025 20:50:25 +0000 (22:50 +0200)] 
DEPRECATE.md: We remove the OpenSSL-QUIC backend in March 2026

URL: https://curl.se/mail/lib-2025-10/0000.html

Closes #18820

5 weeks agotime-cond.md: refer to the singular curl_getdate man page
Daniel Stenberg [Thu, 2 Oct 2025 15:07:05 +0000 (17:07 +0200)] 
time-cond.md: refer to the singular curl_getdate man page

Closes #18816

5 weeks agotcp-nodelay.md: expand the documentation
Daniel Stenberg [Thu, 2 Oct 2025 12:41:41 +0000 (14:41 +0200)] 
tcp-nodelay.md: expand the documentation

Instead of referring to another document.

Closes #18811

5 weeks agocmdline-opts/_PROGRESS.md: explain the suffixes
Daniel Stenberg [Thu, 2 Oct 2025 15:17:22 +0000 (17:17 +0200)] 
cmdline-opts/_PROGRESS.md: explain the suffixes

Closes #18817

5 weeks agoip-happy: prevent event-based stall on retry
Stefan Eissing [Thu, 2 Oct 2025 14:39:37 +0000 (16:39 +0200)] 
ip-happy: prevent event-based stall on retry

When delaying an IP happy eyeball restart, set an actual timer or the
connection will stall when running event based.

Closes #18815