]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 15 May 2025 12:16:15 +0000 (14:16 +0200)] 
RELEASE-NOTES: synced

6 months agoCONTRIBUTE: add project guidelines for AI use
Daniel Stenberg [Mon, 12 May 2025 10:55:20 +0000 (12:55 +0200)] 
CONTRIBUTE: add project guidelines for AI use

Feedback-by: Daniel Fosco
Feedback-by: Jimmy Sjölund
Feedback-by: Christoph Jabs
Feedback-by: Manuel Strehl
Feedback-by: Dan Fandrich
Feedback-by: Sarah Gooding
Closes #17325

6 months agongtcp2: clarify ignoring of result
Stefan Eissing [Thu, 15 May 2025 08:48:12 +0000 (10:48 +0200)] 
ngtcp2: clarify ignoring of result

In shutdown, the result of a bufq_write() is intentionally ignored, but
it was not obvious why. Add a (void) cast to declare intent and a
comment explaining why.

Closes #17354

6 months agopytest: give parameterised tests better ids for read- and parsability
Stefan Eissing [Tue, 13 May 2025 10:55:16 +0000 (12:55 +0200)] 
pytest: give parameterised tests better ids for read- and parsability

Closes #17340

6 months agonetrc: deal with null token better
Daniel Stenberg [Wed, 14 May 2025 22:05:11 +0000 (00:05 +0200)] 
netrc: deal with null token better

If there is no length of the token, assign a blank string to avoid
risking it being NULL.

Pointed out by Coverity

Closes #17351

6 months agotests/FILEFORMAT.md: document the aws feature
Daniel Stenberg [Wed, 14 May 2025 21:39:44 +0000 (23:39 +0200)] 
tests/FILEFORMAT.md: document the aws feature

Closes #17350

6 months agotests: add aws feature to the related tests
Maksim Ściepanienka [Wed, 14 May 2025 19:55:47 +0000 (21:55 +0200)] 
tests: add aws feature to the related tests

Closes #17347

6 months agoGHA: add libssh to the openssl O3 job
Daniel Stenberg [Wed, 14 May 2025 09:50:01 +0000 (11:50 +0200)] 
GHA: add libssh to the openssl O3 job

To make sure we run libssh tests with valgrind enabled

Closes #17345

6 months ago_SEEALSO.md: remove spaces around command and man page section
Daniel Stenberg [Wed, 14 May 2025 21:07:30 +0000 (23:07 +0200)] 
_SEEALSO.md: remove spaces around command and man page section

Follows traditions better

Closes #17348

6 months agolibssh: split up the state machine function
Daniel Stenberg [Wed, 14 May 2025 09:46:11 +0000 (11:46 +0200)] 
libssh: split up the state machine function

This reduces the "complexity score" for myssh_statemach_act from 160 to
100, taking it down from the most complex function in libcurl to the
5th.

Also fixes a memory leak of the sftp session.

Closes #17346

6 months agoscripts: move the ruff linter command into a script 17343/head
Dan Fandrich [Tue, 13 May 2025 23:14:57 +0000 (16:14 -0700)] 
scripts: move the ruff linter command into a script

This makes it easier for users to run it with the correct options
locally. Also, update the ruff, pytype and cmakelint versions to the
latest current ones.

Closes #17343

6 months agospacecheck.pl: drop more exceptions
Viktor Szakats [Tue, 13 May 2025 09:11:55 +0000 (11:11 +0200)] 
spacecheck.pl: drop more exceptions

- replace ß (scharfes S) with links.
- replace § (section sign) with links.
- replace 🙏 emoji with `:pray:`.
 Supported by GitHub, Forgejo/Gitea and most likely GitLab.
- docs/libcurl/curl_mprintf.md: replace Unicode ± with `{+|-}`.
- docs/CIPHERS.md: URL encode Unicode in URLs.
- lib1560: use hex encoding in `räksmörgås.se`.
- unit1307: use hex encoding in `Lindmätarv`.
- drop LATIN SMALL LETTER A WITH ACUTE exception.
  No longer appears in tests.

This leaves the single character exception: `ö`
And file exceptions holding contributor names.

Follow-up to 9243ed59b387a90940fa4a16ebfd99ad7d6c2f63 #17329
Follow-up to 838dc53bb7bf52039b23af0e9ccffa51cf9ad7d0 #17247

Closes #17335

6 months agotests/server/Makefile.inc: cleanup
Daniel Stenberg [Tue, 13 May 2025 10:05:39 +0000 (12:05 +0200)] 
tests/server/Makefile.inc: cleanup

- drop curl_ctype.h as it is not used by test servers
- list all curlx files in the CURLX_* lists
- sort the lists alphabetically

Closes #17339

6 months agosetopt: provide info for CURLE_BAD_FUNCTION_ARGUMENT
Daniel Stenberg [Tue, 13 May 2025 09:25:43 +0000 (11:25 +0200)] 
setopt: provide info for CURLE_BAD_FUNCTION_ARGUMENT

If CURLE_BAD_FUNCTION_ARGUMENT is returned and failf() has not provided
any details, this adds a generic error string that includes the option
number.

This helps debugging for example the curl tool which does a lot of
setopt calls and in reading post fact logs it is not always easy to tell
exactly which call that failed.

Closes #17337

6 months agoheaders: set an error message on illegal response headers
Daniel Stenberg [Tue, 13 May 2025 09:19:40 +0000 (11:19 +0200)] 
headers: set an error message on illegal response headers

Makes it report "Invalid response header" instead of the slightly odd "A
libcurl function was given a bad argument".

Add test 749 and 750 for more CONNECT response testing.

Reported-by: Int64x86 on github
Fixes #17330
Closes #17336

6 months agolib1560: use hex notation, drop non-ASCII exception
Viktor Szakats [Tue, 13 May 2025 08:35:26 +0000 (10:35 +0200)] 
lib1560: use hex notation, drop non-ASCII exception

Closes #17334

6 months agotests: provide all non-ascii data hex encoded
Daniel Stenberg [Tue, 13 May 2025 06:12:26 +0000 (08:12 +0200)] 
tests: provide all non-ascii data hex encoded

- make the scanner not whitelist anything for test cases making
  everything non-ascii forced to be hex encoded

- update all tests using non-ascii bytes to use %hex[] sequences

Closes #17331

6 months agocurlx: move the docs to docs/internals/
Daniel Stenberg [Tue, 13 May 2025 06:18:30 +0000 (08:18 +0200)] 
curlx: move the docs to docs/internals/

Closes #17333

6 months agotests/server: stop using libcurl string comparisons
Daniel Stenberg [Mon, 12 May 2025 20:48:47 +0000 (22:48 +0200)] 
tests/server: stop using libcurl string comparisons

Further untangle the test server code from curl code. While the string
comparison functions are available in the libcurl API, the tests servers
don't link with libcurl. Use native functions instead.

Closes #17328

6 months agotests/FILEFORMAT.md: clarify %hex[] formatting
Daniel Stenberg [Tue, 13 May 2025 06:15:57 +0000 (08:15 +0200)] 
tests/FILEFORMAT.md: clarify %hex[] formatting

Closes #17332

6 months agospacecheck.pl: verify `tests/data/test*` for non-ASCII chars
Viktor Szakats [Mon, 12 May 2025 17:20:40 +0000 (19:20 +0200)] 
spacecheck.pl: verify `tests/data/test*` for non-ASCII chars

Exclude test data files (4 of them) based on existing feature tags:
`codeset-utf8` and `Unicode`.

Add the new keyword `non-ascii` to mark remaining exceptions (9 files).

Follow-up to 838dc53bb7bf52039b23af0e9ccffa51cf9ad7d0 #17247

Closes #17329

6 months agodocs: update distros links
Dan Fandrich [Mon, 12 May 2025 20:51:38 +0000 (13:51 -0700)] 
docs: update distros links

6 months agotests/server: stop using libcurl's printf functions
Daniel Stenberg [Fri, 9 May 2025 08:46:42 +0000 (10:46 +0200)] 
tests/server: stop using libcurl's printf functions

Since the test servers are not built with libcurl the *printf code
needed to get built separately, and they are not in the curlx
collection.

snprintf() is provided in all modern systems these days.

Move curlx functions from lib/strerror.c to lib/curlx/winapi.c

Assisted-by: Viktor Szakats
Closes #17294

6 months agoasny-thrdd: fix detach from running thread
Stefan Eissing [Mon, 12 May 2025 08:08:21 +0000 (10:08 +0200)] 
asny-thrdd: fix detach from running thread

When cancelling a threaded resolve and the thread is
still running, detach from it under the mutex lock.

Otherwise, the detach might happen after the thread finished
and access already freed memory.

Fixes #17256
Reported-by: Mathieu Garaud
Closes #17320

6 months agoTODO: Retry SOCKS handshake
Daniel Stenberg [Mon, 12 May 2025 11:51:27 +0000 (13:51 +0200)] 
TODO: Retry SOCKS handshake

Closes #17222
Closes #17326

6 months agotests/server: remove TEST use, include <memdebug.h>
Daniel Stenberg [Mon, 12 May 2025 10:13:15 +0000 (12:13 +0200)] 
tests/server: remove TEST use, include <memdebug.h>

- The TEST define is never set
- memdebug.h is not in the local dir, using angle bracket include

Closes #17323

6 months agotests/server: check for `stream != NULL` in mqttd
Viktor Szakats [Mon, 12 May 2025 10:33:35 +0000 (12:33 +0200)] 
tests/server: check for `stream != NULL` in mqttd

To avoid an assert in `fgets()` on MSVC when the test case is missing.

Bug: https://github.com/curl/curl/pull/17294#issuecomment-2867501300

Closes #17324

6 months agomk-ca-bundle: switch URLs to GitHub versions
Daniel Stenberg [Mon, 12 May 2025 08:09:39 +0000 (10:09 +0200)] 
mk-ca-bundle: switch URLs to GitHub versions

The offical Firefox source code has moved to GitHub:
https://github.com/mozilla-firefox/firefox

This change adjusts to the new URLs. The old branches nss and central
are not provided so they are removed and the new 'autoland' is added.

Closes #17321

6 months agoimap: remove redundant condition
Daniel Stenberg [Mon, 12 May 2025 07:17:00 +0000 (09:17 +0200)] 
imap: remove redundant condition

'imap' always evaluates to true. Spotted by CodeSonar.

Closes #17318

6 months agortsp: remove redundant condition
Daniel Stenberg [Mon, 12 May 2025 07:13:10 +0000 (09:13 +0200)] 
rtsp: remove redundant condition

'rtsp' always evaluates to true. Spotted by CodeSonar.

Closes #17317

6 months agonetrc: avoid strdup NULL
Daniel Stenberg [Mon, 12 May 2025 07:21:31 +0000 (09:21 +0200)] 
netrc: avoid strdup NULL

Coverity found a code path where this might happen. Avoid it.

Closes #17319

6 months agohttp_chunks: narrow variable scope for 'trlen'
Daniel Stenberg [Mon, 12 May 2025 07:07:50 +0000 (09:07 +0200)] 
http_chunks: narrow variable scope for 'trlen'

CodeSonar found a case where it would be assigned but never used and
narrowing the scope makes sense anyway.

Closes #17316

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 12 May 2025 05:47:34 +0000 (07:47 +0200)] 
RELEASE-NOTES: synced

6 months agomprintf: provide hex digits for escape.c to use
Daniel Stenberg [Sun, 11 May 2025 12:56:16 +0000 (14:56 +0200)] 
mprintf: provide hex digits for escape.c to use

Since they need the exact same set, use the same set. The mprintf string
was longer than it had to be.

Closes #17311

6 months agomprintf: remove outdated comment about SIZEOF_SIZE_T
Daniel Stenberg [Sun, 11 May 2025 21:40:53 +0000 (23:40 +0200)] 
mprintf: remove outdated comment about SIZEOF_SIZE_T

It was now plain wrong

Closes #17312

6 months agoinet_ntop: rename curlx_inet_ntop to Curl_inet_ntop
Daniel Stenberg [Sun, 11 May 2025 21:48:10 +0000 (23:48 +0200)] 
inet_ntop: rename curlx_inet_ntop to Curl_inet_ntop

It is not part of the curlx club.

Closes #17313

6 months agocurl_version_info.md: clarify ssl_version for MultiSSL
Jay Satiro [Sat, 10 May 2025 07:43:04 +0000 (03:43 -0400)] 
curl_version_info.md: clarify ssl_version for MultiSSL

- Clarify that the ssl_version in MultiSSL builds contains all SSL
  backend names with the inactive backend names in parentheses.

Closes https://github.com/curl/curl/pull/17308

6 months agotimeval.c: #include fix
Daniel Stenberg [Sun, 11 May 2025 10:24:10 +0000 (12:24 +0200)] 
timeval.c: #include fix

6 months agotest1621: Improve stripcredentials tests
Dan Fandrich [Wed, 7 May 2025 06:39:22 +0000 (23:39 -0700)] 
test1621: Improve stripcredentials tests

- add more unusual input cases
- add a valid non-http protocol
- fix tests so an input that should be stripped but isn't is a failure
- fix detection of when stripcredentials() would be available to test
- avoid using a NULL pointer

Closes #17304

6 months agomime: reuse the base64 string from the base64 code
Daniel Stenberg [Sat, 10 May 2025 09:12:22 +0000 (11:12 +0200)] 
mime: reuse the base64 string from the base64 code

Avoids duplicating an identical string here.

Closes #17309

6 months agobase64: pass in the padding byte separately
Daniel Stenberg [Sat, 10 May 2025 09:05:56 +0000 (11:05 +0200)] 
base64: pass in the padding byte separately

The makes the string with base64 octets "pure" to be used elsewhere as
well.

Closes #17309

6 months agocurl: fix memory leak when -h is used in config file
Daniel Stenberg [Fri, 9 May 2025 21:43:22 +0000 (23:43 +0200)] 
curl: fix memory leak when -h is used in config file

Reported-by: antypanty on hackerone
Add test 748 to reproduce and verify fix

Closes #17306

6 months agoCURLMOPT_TIMERFUNCTION.md: correct the example
Daniel Stenberg [Fri, 9 May 2025 13:41:48 +0000 (15:41 +0200)] 
CURLMOPT_TIMERFUNCTION.md: correct the example

Fixes #17301
Reported-by: Dirk Feytons
Closes #17303

6 months agowindows: fix to preserve error code in `curlx_winapi_strerror()`
Viktor Szakats [Fri, 9 May 2025 13:18:51 +0000 (15:18 +0200)] 
windows: fix to preserve error code in `curlx_winapi_strerror()`

Drop the interim macro `PRESERVE_WINDOWS_ERROR_CODE` and always preserve
error code for `_WIN32`. To make sure this is always done in
`curlx_winapi_strerror()`.

Follow-up to c74d3e10d2935a9a37ffe6b2f7a4ecb0f81e974f #17299

Closes #17302

6 months agocurlx: move curlx_inet_pton
Daniel Stenberg [Fri, 9 May 2025 11:26:00 +0000 (13:26 +0200)] 
curlx: move curlx_inet_pton

Used by test server code.

Closes #17300

6 months agocurlx: add curlx_winapi_ functions
Daniel Stenberg [Fri, 9 May 2025 08:21:53 +0000 (10:21 +0200)] 
curlx: add curlx_winapi_ functions

Split them out from lib/strerror. Used by test code.

Closes #17299

6 months agotests: stop using libcurl's strdup
Daniel Stenberg [Thu, 8 May 2025 21:29:24 +0000 (23:29 +0200)] 
tests: stop using libcurl's strdup

It is not provided as a curlx function so should not be used outside of
libcurl.

I strongly suspect that no system we build the test suite on lack strdup
so this will not cause any harm.

The private version was added in b0936b800719f915ff2a59a for Ultrix.

Closes #17297

6 months agolib: drop curlx_getpid, use fake pid in SMB
Daniel Stenberg [Fri, 9 May 2025 07:36:05 +0000 (09:36 +0200)] 
lib: drop curlx_getpid, use fake pid in SMB

It was not a function properly exposed in the curlx set. SMB cannot
possibly need to send a real pid, now sends a made up number.

The only real users of this function are test servers, so move the logic
over there.

Closes #17298

6 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 8 May 2025 20:33:01 +0000 (22:33 +0200)] 
RELEASE-NOTES: synced

6 months agocurlx: move version_win32.[ch] to curlx/
Daniel Stenberg [Thu, 8 May 2025 09:35:37 +0000 (11:35 +0200)] 
curlx: move version_win32.[ch] to curlx/

For curlx_verify_windows_version

Closes #17290

6 months agocmake: test integration with old cmake (v3.11.4 2018-03-28)
Viktor Szakats [Thu, 8 May 2025 11:09:29 +0000 (13:09 +0200)] 
cmake: test integration with old cmake (v3.11.4 2018-03-28)

Tests with old cmake are slow. (no Ninja, no unity, and running slower
than recent versions.)

It also revealed that 3.7.2 2017-01-13 is too old to consume curl via
`find_package()` due to:
```
CMake Error at bld-curl/_pkg/lib/cmake/CURL/CURLConfig.cmake:69 (add_library):
  add_library cannot create ALIAS target "CURL::libcurl" because target
  "CURL::libcurl_shared" is IMPORTED.
Call Stack (most recent call first):
  CMakeLists.txt:48 (find_package)

CMake Error at bld-curl/_pkg/lib/cmake/CURL/CURLConfig.cmake:69 (add_library):
  add_library cannot create ALIAS target "CURL::libcurl" because target
  "CURL::libcurl_shared" is IMPORTED.
Call Stack (most recent call first):
  CMakeLists.txt:49 (find_package)
```
The mitigation for this issue requires 3.11.

Also:
- rename a few existing envs to use the `TEST_` prefix.
- make the `find_package` test provider stage verbose.
- fix issue when consuming with cmake 3.7.2 (all platforms):
  ```
  CMake Error at /home/runner/cmake-3.7.2-Linux-x86_64/share/cmake-3.7/Modules/CMakeFindDependencyMacro.cmake:25 (message):
    Invalid arguments to find_dependency.  VERSION is empty
  Call Stack (most recent call first):
    bld-curl/_pkg/lib/cmake/CURL/CURLConfig.cmake:52 (find_dependency)
    CMakeLists.txt:48 (find_package)
  ```
  Ref: https://github.com/curl/curl/actions/runs/14906066962/job/41868621979?pr=17293#step:9:1199

Closes #17293

6 months agocurlx: move nonblock.[ch] into curlx/
Daniel Stenberg [Thu, 8 May 2025 08:52:57 +0000 (10:52 +0200)] 
curlx: move nonblock.[ch] into curlx/

Closes #17288

6 months agofile: use easy handle meta for protocol struct
Stefan Eissing [Thu, 8 May 2025 09:01:24 +0000 (11:01 +0200)] 
file: use easy handle meta for protocol struct

Closes #17292

6 months agocurlx: simplify the curlx_unicodefree macro
Daniel Stenberg [Thu, 8 May 2025 08:40:17 +0000 (10:40 +0200)] 
curlx: simplify the curlx_unicodefree macro

- explain its purpose in a comment

Closes #17287

6 months agossh: move easy handle/connection protocol structs to meta
Stefan Eissing [Wed, 7 May 2025 11:45:41 +0000 (13:45 +0200)] 
ssh: move easy handle/connection protocol structs to meta

Closes #17273

6 months agosrc: drop strcase.[ch] from tool builds
Daniel Stenberg [Thu, 8 May 2025 09:15:09 +0000 (11:15 +0200)] 
src: drop strcase.[ch] from tool builds

They're not used there anymore.

Closes #17289

6 months agowinbuild: curl_get_line is not used for tool builds
Daniel Stenberg [Thu, 8 May 2025 08:00:11 +0000 (10:00 +0200)] 
winbuild: curl_get_line is not used for tool builds

Drop it from the build. Also remove it from the tests/server makefile.

Follow-up to d8618f4d8480a8aa245c14f9cf3f1bcab92846c1

Closes #17286

6 months agortmp: remove no longer used proto member
Stefan Eissing [Tue, 6 May 2025 08:17:41 +0000 (10:17 +0200)] 
rtmp: remove no longer used proto member

Add src/curlinfo to gitignore while we are here.
Add tests/server/dnsd to gitignore while we are here.

Closes #17252

6 months agosrc: include memdebug.h consistently with angle brackets <>
Daniel Stenberg [Thu, 8 May 2025 07:42:51 +0000 (09:42 +0200)] 
src: include memdebug.h consistently with angle brackets <>

Not double quotes. Since the file is never local.

Closes #17284

6 months agolib: move multibyte.[ch] to curlx/
Daniel Stenberg [Thu, 8 May 2025 07:57:15 +0000 (09:57 +0200)] 
lib: move multibyte.[ch] to curlx/

This file provides functions in the curlx set.

Closes #17285

6 months agotelnet: keep protocol struct at easy handle meta
Stefan Eissing [Wed, 7 May 2025 10:27:06 +0000 (12:27 +0200)] 
telnet: keep protocol struct at easy handle meta

Remove the member of data->req.p

Closes #17271

6 months agoheaders: enforce a max number of response header to accept
Daniel Stenberg [Wed, 7 May 2025 22:21:26 +0000 (00:21 +0200)] 
headers: enforce a max number of response header to accept

The limit is 5000 headers in a single transfer. To avoid problems caused
by mistakes or malice.

Add test 747 to verify

Reported-by: wolfsage on hackerone
Closes #17281

6 months agosrc: rename curlx_safefree to tool_safefree
Daniel Stenberg [Wed, 7 May 2025 09:36:50 +0000 (11:36 +0200)] 
src: rename curlx_safefree to tool_safefree

It is not part of the curlx function collection, just a macro that might
as well be a local version.

Closes #17270

6 months agoGHA/checksrc: check GHA rules with zizmor
Viktor Szakats [Wed, 7 May 2025 16:56:27 +0000 (18:56 +0200)] 
GHA/checksrc: check GHA rules with zizmor

The pedantic level is experimental. If it causes issues, we may just
disable it alongside the ignore comments.

Also:
- silence error:
  ```
   INFO audit: zizmor: completed label.yml
  error[dangerous-triggers]: use of fundamentally insecure workflow trigger
    --> label.yml:13:1
     |
  13 | 'on': [pull_request_target]
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ pull_request_target is almost always used insecurely
     |
     = note: audit confidence -> Medium
  ```
- fix pedantic warning:
  ```
   INFO audit: zizmor: completed label.yml
  warning[excessive-permissions]: overly broad permissions
    --> label.yml:1:1
  ...  |
  24 | |         with:
  25 | |           repo-token: '${{ secrets.GITHUB_TOKEN }}'
     | |____________________________________________________- default permissions used due to no permissions: block
     |
     = note: audit confidence -> Medium
  ```
- silence `template-injection` false positives like:
  ```
  - note: ${{ matrix.build.torture && 'test-torture' || 'test-ci' }} may expand into attacker-controllable code
  - note: ${{ contains(matrix.build.install_steps, 'pytest') && 'caddy httpd vsftpd' || '' }} may expand into attacker-controllable code
  ```
  It doesn't seem like these could be controlled by an attacker.
  Let me know if I'm missing something.

Closes #17278

6 months agoGHA/windows: set `persist-credentials: false` where missing
Viktor Szakats [Wed, 7 May 2025 16:41:21 +0000 (18:41 +0200)] 
GHA/windows: set `persist-credentials: false` where missing

Found by zizmor.

Closes #17277

6 months agonetrc: avoid NULL deref on weird input
Daniel Stenberg [Wed, 7 May 2025 14:36:08 +0000 (16:36 +0200)] 
netrc: avoid NULL deref on weird input

A dynbuf that never gets populated might return a NULL, and Coverity
could find a way through like that.

Closes #17275

6 months agoldap: move easy handle protocol struct into meta hash
Stefan Eissing [Wed, 7 May 2025 09:15:40 +0000 (11:15 +0200)] 
ldap: move easy handle protocol struct into meta hash

Removing the member of data->req.p

Closes #17269

6 months agovtls: avoid NULL deref on bad PEM input
Daniel Stenberg [Wed, 7 May 2025 14:09:55 +0000 (16:09 +0200)] 
vtls: avoid NULL deref on bad PEM input

Spotted by Coverity

Closes #17274

6 months agosmtp: use easy handle/connectin meta for proto structs
Stefan Eissing [Tue, 6 May 2025 10:38:15 +0000 (12:38 +0200)] 
smtp: use easy handle/connectin meta for proto structs

Move `struct smtp_conn` and `struct STMP` into the meta data at easy
handle/connection. Remove it from the unions at connectdata and request.

Closes #17257

6 months agoRELEASE-PROCEDURE: update the coming release dates
Daniel Stenberg [Wed, 7 May 2025 12:39:18 +0000 (14:39 +0200)] 
RELEASE-PROCEDURE: update the coming release dates

6 months agometahash: add asserts to help analyzers
Daniel Stenberg [Wed, 7 May 2025 08:49:13 +0000 (10:49 +0200)] 
metahash: add asserts to help analyzers

Where NULL pointers are not acceptable input.

Closes #17268

6 months agocurlx: move into to curlx/ 17253/head
Daniel Stenberg [Wed, 7 May 2025 09:00:59 +0000 (11:00 +0200)] 
curlx: move into to curlx/

Move curlx_ functions into its own subdir.

The idea is to use the curlx_ prefix proper on these functions, and use
these same function names both in tool, lib and test suite source code.
Stop the previous special #define setup for curlx_ names.

The printf defines are now done for the library alone. Tests no longer
use the printf defines. The tool code sets its own defines. The printf
functions are not curlx, they are publicly available.

The strcase defines are not curlx_ functions and should not be used by
tool or server code.

dynbuf, warnless, base64, strparse, timeval, timediff are now proper
curlx functions.

When libcurl is built statically, the functions from the library can be
used as-is. The key is then that the functions must work as-is, without
having to be recompiled for use in tool/tests. This avoids symbol
collisions - when libcurl is built statically, we use those functions
directly when building the tool/tests. When libcurl is shared, we
build/link them separately for the tool/tests.

Assisted-by: Jay Satiro
Closes #17253

6 months agoimap: use easy handle/connection meta for proto structs
Stefan Eissing [Tue, 6 May 2025 14:27:43 +0000 (16:27 +0200)] 
imap: use easy handle/connection meta for proto structs

Remove the imap protocol structs from connectdata->proto union
and data->req.p and use the easy handle/connection meta hash
for keeping them.

Closes #17261

6 months agocmake: set `BUILDING_LIBCURL` directly for unit test targets
Viktor Szakats [Tue, 6 May 2025 23:29:32 +0000 (01:29 +0200)] 
cmake: set `BUILDING_LIBCURL` directly for unit test targets

To avoid adding this macro to the global `CURL_DEBUG_MACROS` variable,
which may be used for targets defined after unit tests, and where this
macro may not be necessary.

As of this commit unit tests are defined last, so extending the global
variable did not cause any issue.

Follow-up to 220eda34cdfdcc4316845d2e2bbe5bd8b10305e0 #17259

Closes #17264

6 months agogenerate.bat: exclude curlinfo.c from legacy VS projects
Jay Satiro [Tue, 6 May 2025 21:47:37 +0000 (17:47 -0400)] 
generate.bat: exclude curlinfo.c from legacy VS projects

- Do not include curlinfo.c as a ClCompile unit when compiling the curl
  tool.

Prior to this change generate.bat would add curlinfo.c to the source
files for the curl tool because it is located in the src directory. That
caused ambiguous behavior in legacy versions of Visual Studio which had
to guess between two main entry points (one in curlinfo and one in
tool_main, the latter being correct).

Closes https://github.com/curl/curl/pull/17263

6 months agotests: separate tunit tests from unit tests more
Daniel Stenberg [Tue, 6 May 2025 13:03:46 +0000 (15:03 +0200)] 
tests: separate tunit tests from unit tests more

- unit tests need no tool code as they are libcurl unit tests
- unit test 1621 is now tunit test 1621 instead, as it tests tool code
- build unit tests with BUILDING_LIBCURL as they pretent to be libcurl

Closes #17259

6 months agortsp: move easy handle/connection protoocol structs into meta data
Stefan Eissing [Tue, 6 May 2025 08:44:27 +0000 (10:44 +0200)] 
rtsp: move easy handle/connection protoocol structs into meta data

Remove the connectdata proto and data->req.p member for rtsp and manage
the structs as meta data at easy handle/connection.

Closes #17254

6 months agopop3: add null pointer check
Daniel Stenberg [Tue, 6 May 2025 09:05:30 +0000 (11:05 +0200)] 
pop3: add null pointer check

Pointed out by Coverity. A precaution to catch internal errors.

Follow-up to 76d13c721bcd992e3e19f52

Closes #17255

6 months agoftp: fix bug in failed init
Stefan Eissing [Tue, 6 May 2025 10:59:28 +0000 (12:59 +0200)] 
ftp: fix bug in failed init

torture tests revealed that memory was not released correctly when FTP's
connection setup failed an allocation.

Follow-up from a2d90d4ba5076643b5af9978c4

Closes #17258

6 months agosmb: use easy handle/connection meta hash to keep structs
Stefan Eissing [Wed, 30 Apr 2025 12:00:35 +0000 (14:00 +0200)] 
smb: use easy handle/connection meta hash to keep structs

Keep easy/connection related protoocl structs in the meta hash instead
of the unions at request and connectdata.

Closes #17238

6 months agortmp: use connection meta for RTMP* instance
Stefan Eissing [Wed, 30 Apr 2025 10:59:01 +0000 (12:59 +0200)] 
rtmp: use connection meta for RTMP* instance

Keep RTMP* instance at connection meta hash.

Closes #17237

6 months agopop3: use meta hashes at easy handle and connection
Stefan Eissing [Wed, 30 Apr 2025 10:06:53 +0000 (12:06 +0200)] 
pop3: use meta hashes at easy handle and connection

Keep the pop3 related protocol information in the meta hashes at easy
handle and connection.

Move the struct definitions inside pop3.c

Closes #17236

6 months agoftp: use easy handle and connectin meta data for protocol structs
Stefan Eissing [Mon, 5 May 2025 11:31:14 +0000 (13:31 +0200)] 
ftp: use easy handle and connectin meta data for protocol structs

- remove data->req.p.ftp and store `struct FTP` as easy meta data
- place `struct ftp_conn` instance in connection meta data

Closes #17249

6 months agotftp: use connections meta hash
Stefan Eissing [Wed, 30 Apr 2025 09:08:02 +0000 (11:08 +0200)] 
tftp: use connections meta hash

Use connection meta hash for state struct instead of union pointer at
connectdata.

Closes #17235

6 months agoopenldap: use connection meta for context struct
Stefan Eissing [Tue, 29 Apr 2025 11:09:00 +0000 (13:09 +0200)] 
openldap: use connection meta for context struct

Remove member of conn->proto union.

Closes #17224

6 months agoECH: reference the OpenSSL ECH feature branch
sftcd [Mon, 5 May 2025 21:37:49 +0000 (22:37 +0100)] 
ECH: reference the OpenSSL ECH feature branch

rather than the defo-project fork.

Closes #17251

6 months agospacecheck.pl: check for non-ASCII chars, fix fallouts
Viktor Szakats [Sat, 3 May 2025 16:11:29 +0000 (18:11 +0200)] 
spacecheck.pl: check for non-ASCII chars, fix fallouts

Reported-by: James Fuller
Assisted-by: Dan Fandrich
Closes #17247

7 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 1 May 2025 20:27:18 +0000 (22:27 +0200)] 
RELEASE-NOTES: synced

7 months agoGHA: Update libressl-portable/portable to v4.1.0
renovate[bot] [Wed, 30 Apr 2025 19:42:34 +0000 (19:42 +0000)] 
GHA: Update libressl-portable/portable to v4.1.0

Closes #17234

7 months agomkhelp: fix to not generate a line-ending space in some cases
Viktor Szakats [Wed, 30 Apr 2025 16:32:02 +0000 (18:32 +0200)] 
mkhelp: fix to not generate a line-ending space in some cases

Fixing gcc-15:
```
bld/src/tool_hugehelp.c:11739:1: error: trailing whitespace [-Werror=trailing-whitespace=]
```
Ref: https://github.com/curl/curl/actions/runs/14758743743/job/41433794102?pr=17239#step:10:32

Closes #17240

7 months agoTLS: add CURLOPT_SSL_SIGNATURE_ALGORITHMS and --sigalgs
Andrei Florea [Wed, 2 Apr 2025 07:41:54 +0000 (09:41 +0200)] 
TLS: add CURLOPT_SSL_SIGNATURE_ALGORITHMS and --sigalgs

Fixes #12982
Closes #16964

7 months agoTODO: remove "nicer lacking perl message"
NeimadTL [Tue, 29 Apr 2025 22:32:23 +0000 (18:32 -0400)] 
TODO: remove "nicer lacking perl message"

The document has been updated by removing point 20.2 as it was done
some time ago.

Closes #17233

7 months agodocs/libcurl: fix type and prototype problems in examples
Daniel Stenberg [Tue, 29 Apr 2025 20:27:52 +0000 (22:27 +0200)] 
docs/libcurl: fix type and prototype problems in examples

Found by enabling the typechecks when compiling them with
verify-examples.pl

Closes #17231

7 months agoCURLOPT_XFERINFOFUNCTION.md: fix the callback return type in example
Daniel Stenberg [Tue, 29 Apr 2025 15:47:50 +0000 (17:47 +0200)] 
CURLOPT_XFERINFOFUNCTION.md: fix the callback return type in example

Fixes #17228
Reported-by: gkarracer on github
Closes #17229

7 months agoscripts: fix perl indentation, whitespace, semicolons
Viktor Szakats [Mon, 28 Apr 2025 12:57:16 +0000 (14:57 +0200)] 
scripts: fix perl indentation, whitespace, semicolons

Ref: #17116

Closes #17209

7 months agoGHA: drop vcpkg cache and most vcpkg logic with it
Viktor Szakats [Sat, 26 Apr 2025 16:37:39 +0000 (18:37 +0200)] 
GHA: drop vcpkg cache and most vcpkg logic with it

The unplanned dropping of the granular vcpkg binary cache indeed fell
into the cracks between Microsoft's various departments. The old method
is now official dropped, without replacement either on the vcpkg side or
the GitHub cache provider side.

Without a granular cache, vcpkg is impractical for builds larger than
a small dependency tree in CI, for performance reasons.

A granular cache is critical for CI use. Building dependencies is not
a goal of this CI, so a more desirable option would be pre-built binary
downloads. This would also allow keeping job timeouts low, which is
important for quick iteration in GHA when a flaky job requiring a manual
retry needs all other jobs to finish first. (GHA often disregards
step timeouts, which is another contributing factor here.)

Windows remains tested extensively with MSYS2, curl-for-win, and via
AppVeyor CI with MSVC + OpenSSL, and also in GHA via scaled back vcpkg
jobs that perform well without caching. What's lost is the recently
added Android OpenSSL build tests.

We may consider building/cachine important dependencies manually as in
GHA/linux-http3, and/or try integrating MSVC jobs with MSYS2 UCRT DLLs.

Ref: https://github.com/microsoft/vcpkg-tool/pull/1662
Ref: https://github.com/microsoft/vcpkg/issues/45073

Follow-up to cd0ec4784c1c0f873939f33ec1a73c8739f276b9 #17089
Follow-up to e3912f0f9fac06d37cd1ab93cef4f01f33809f0b #17086
Follow-up to 15fb1dc7f86ad1832e0386ec7d92542f44ee9c44 #17069

Closes #17200

7 months agobuild: enable gcc-15 picky warnings
Viktor Szakats [Fri, 25 Apr 2025 14:39:45 +0000 (16:39 +0200)] 
build: enable gcc-15 picky warnings

Closes #17199

7 months agoopenssl: set the cipher string before doing private cert
Corinna Brandt [Tue, 29 Apr 2025 13:31:17 +0000 (15:31 +0200)] 
openssl: set the cipher string before doing private cert

... as this allows a set string to affect how OpenSSL deals with the
private keys/certs.

Closes #17227

7 months agomqtt: use conn/easy meta hash
Stefan Eissing [Tue, 29 Apr 2025 08:49:46 +0000 (10:49 +0200)] 
mqtt: use conn/easy meta hash

Remove mqtt structs from the unions at connectdata and
easy handle requests. Use meta hash at easy/connnection.

Make mqtt structs private to mqtt.c

Closes #17221

7 months agomulti_ev: remove redundant check for data
Daniel Stenberg [Tue, 29 Apr 2025 12:03:10 +0000 (14:03 +0200)] 
multi_ev: remove redundant check for data

Pointed out by CodeSonar

Closes #17226