]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
14 months agocmake: whitespace, formatting/tidy-up in comments
Viktor Szakats [Sun, 19 May 2024 16:49:42 +0000 (18:49 +0200)] 
cmake: whitespace, formatting/tidy-up in comments

Also correct casing in a few option descriptions.

Closes #13711

14 months agocmake: allow `ENABLE_CURLDEBUG=OFF` with `ENABLE_DEBUG=ON`
Viktor Szakats [Mon, 27 May 2024 12:33:54 +0000 (14:33 +0200)] 
cmake: allow `ENABLE_CURLDEBUG=OFF` with `ENABLE_DEBUG=ON`

Before this patch, `ENABLE_CURLDEBUG` (memory tracking) was
unconditionally enabled when `ENABLE_DEBUGBUILD` was set. This made
testing some build configurations complicated. To fix it, this patch
makes `ENABLE_CURLDEBUG` to receive the value of `ENABLE_DEBUG` by
default, while allowing free override by the user.

This allows to use the config:
`ENABLE_DEBUGBUILD=ON ENABLE_CURLDEBUG=OFF`
to enable debug features, without also enabling memory tracking.

This is important because some other build methods allow to set one of
these features but not the other. This patch allows to test any
combination with CMake.

This makes it unnecessary to use the workaround of passing
`-DDEBUGBUILD` via `CMAKE_C_FLAGS`. Which has the disadvantage that our
CMake logic cannot easily detect it, e.g. for disabling symbol hiding on
Windows for `ENABLE_DEBUG`/`DEBUGBUILD` builds.

Cherry-picked from #13718
Closes #13792

14 months agocmake: `ENABLE_DEBUG=ON` to always set `-DDEBUGBUILD`
Viktor Szakats [Sat, 11 May 2024 00:44:10 +0000 (02:44 +0200)] 
cmake: `ENABLE_DEBUG=ON` to always set `-DDEBUGBUILD`

Before this patch `ENABLE_DEBUG=ON` always enabled the TrackMemory
(aka `ENABLE_CURLDEBUG=ON`) feature, but required the `Debug` CMake
configration to actually enable curl debug features
(aka `-DDEBUGBUILD`).

Curl debug features do not require compiling with C debug options. This
also made enabling debug features unintuitive and complicated to use.
Due to other issues (subject to PR #13694) it also caused an error in
default (and `Release`/`MinSizeRel`/`RelWithDebInfo`) configs, when
building the `testdeps` target:
```
ld: CMakeFiles/unit1395.dir/unit1395.c.o: in function `test':
unit1395.c:(.text+0x1a0): undefined reference to `dedotdotify'
```
Ref: https://github.com/curl/curl/actions/runs/9037287098/job/24835990826#step:3:2483

Fix it by always defining `DEBUGBUILD` when setting `ENABLE_DEBUG=ON`.
Decoupling this option from the selected CMake configuration.

Note that after this patch `ENABLE_DEBUG=ON` unconditionally enables
curl debug features. These features are insecure and unsuited for
production. Make sure to omit this option when building for production
in default, `Release` (and other not-`Debug`) modes.

Also delete a workaround no longer necessary in GHA CI jobs.

Ref: 1a62b6e68c08c7e471ff22dd92932aba7e026817 (2015-03-03)
Ref: #13583
Closes #13592

14 months agoGHA: add autotools mingw-64, build-only job
Viktor Szakats [Mon, 27 May 2024 13:07:23 +0000 (15:07 +0200)] 
GHA: add autotools mingw-64, build-only job

Cherry-picked from #13718
Closes #13793

14 months agoGHA: add three MSVC jobs
Viktor Szakats [Fri, 24 May 2024 15:53:27 +0000 (17:53 +0200)] 
GHA: add three MSVC jobs

Continuing the theme, add 3 MSVC jobs with tests, matching
configurations used on AppVeyor. MSVC versions are identical:
19.39.33523.0 + Windows SDK 10.0.22621.0.

Also enable websockets, and build examples. Tests are run in parallel
(`-j14`), with improved performance.

Job performance:
```
                                                       AppVeyor  GHA
                                                                 w/examples
                                                       --------  ----------
CMake, VS2022, Debug, x64, Schannel, Static, Unicode   38m 4s    11m57s
CMake, VS2022, Debug, x64, no SSL, Static              35m15s    12m 6s
CMake, VS2022, Debug, x64, no SSL, Static, HTTP only   25m25s    10m36s
```
Based on these runs:
https://ci.appveyor.com/project/curlorg/curl/builds/49884748
https://github.com/curl/curl/actions/runs/9229448468

This is the first time examples are built in CI with MSVC: Fix all
warnings and errors that came up via
d4b85890555388bec212b75f47a5c1a48705b156 #13771.

Closes #13766

14 months agoGHA: add three old (gcc 6, 7, 9) mingw-w64 jobs
Viktor Szakats [Thu, 23 May 2024 12:54:49 +0000 (14:54 +0200)] 
GHA: add three old (gcc 6, 7, 9) mingw-w64 jobs

Re-implement old mingw-w64 jobs in GHA. This allows to use the latest
Windows runners, replacing Windows Server 2012 R2 (gcc 6) and Windows
Server 2016 (gcc 7, 9) with Windows Server 2022.

GHA runners are also significantly faster, and allow running tests in
parallel (`-j14`). It also offloads 3 more long-running jobs from
AppVeyor CI.

These jobs download (then cache) the mingw-w64 packages from their
original location, which allows flexibility in choosing which versions
and flavours (win32/POSIX, SEH/DWARF, 64/32-bit) we want to test in CI.
The new jobs use these distros:
- https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/ (for gcc 7, same as on AppVeyor)
- https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/ (for gcc 6, same as on AppVeyor)
- https://winlibs.com/ (for gcc 9)

I matched existing AppVeyor job configs, with these differences:
- gcc 6.4.0 instead of 6.3.0.
  (same distro as on AppVeyor, but the latest bugfix release)
- gcc 9.5.0 instead of 9.1.0 and a different (but compatible) binary distro.
  (in AppVeyor this relies on an old MSYS2 pre-installed on the runner)
- using win32 builds instead of posix for gcc 6.4.0 and 7.3.0.
- websockets enabled.
- always build examples.
- always build tests (this wasn't done for 6.4.0 with AppVeyor CI).

I did not replicate existing test exclusions, and oddly enough the few
failures (so far) were different from MSYS2 jobs and also from their
AppVeyor CI counterparts.

Also:
- delete redundant (default) `-u` option from `cygpath` calls.
- allow matrix options to override default ones in CMake.
- detect and use Windows-supplied curl for `TFLAGS` `-ac` option.
  (it's available in modern runners.)
- delete the 3 AppVeyor CI jobs now replicated in GHA.
- appveyor: prefer `SYSTEMROOT` over `WINDIR`.
- tidy-up quotes.

Job performance:
```
                                                                 AppVeyor  GHA
                                                                           w/examples
                                                                           w/tests
                                                                 --------  ----------
CMake, mingw-w64, gcc 6, Debug, x86, Schannel, Static, no-unity   1m25s     8m50s
CMake, mingw-w64, gcc 7, Debug, x64, Schannel, Static, Unicode   31m45s     9m39s
CMake, mingw-w64, gcc 9, Debug, x64, Schannel, Static            28m25s    13m38s
```
Based on these runs:
https://ci.appveyor.com/project/curlorg/curl/builds/49880799
https://github.com/curl/curl/actions/runs/9218292508

Notice that building examples and tests is time consuming.

We can tweak any build parameter as necessary to make them more useful
and/or without clogging the job queue or introducing flakiness.

Closes #13759

14 months agoTODO: remove some old, clarify, add something
Daniel Stenberg [Mon, 27 May 2024 08:38:43 +0000 (10:38 +0200)] 
TODO: remove some old, clarify, add something

Closes #13788

14 months agoTODO: Add "Share CA cache" + "CA caching to more TLS backends"
Daniel Stenberg [Mon, 27 May 2024 08:13:40 +0000 (10:13 +0200)] 
TODO: Add "Share CA cache" + "CA caching to more TLS backends"

Closes #13787

14 months agoruntests: sort test IDs in summary lines
Viktor Szakats [Sat, 25 May 2024 06:54:27 +0000 (08:54 +0200)] 
runtests: sort test IDs in summary lines

Changing this output:
```
TESTFAIL: These test cases failed: 2301 2303 2302 2307
```
Ref: https://github.com/curl/curl/actions/runs/9228638364/job/25393106631#step:6:21181

To:
```
TESTFAIL: These test cases failed: 2301 2302 2303 2307
```

Cherry-picked from #13766
Closes #13774

14 months agoexamples: fix compiling with MSVC
Viktor Szakats [Fri, 24 May 2024 16:38:32 +0000 (18:38 +0200)] 
examples: fix compiling with MSVC

- `websocket.c`: use `Sleep()` on Windows.
  `sleep()` and `unistd.h` are not available in MSVC.

- `http2-upload.c`: use local `gettimeofday()` implementation when
  compiled with MSVC.
  (Alternate solution is to disable the trace function for MSVC.)
  Public domain code copied and adapted from libssh2:
  https://github.com/libssh2/libssh2/blob/e973493f992313b3be73f51d3f7ca6d52e288558/src/misc.c#L719-L743

- silence compiler warning for deprecated `inet_addr()`.
  Also drop duplicate winsock2 include.
  ```
  curl\docs\examples\externalsocket.c(125,32): error C2220: the following warning is treated as an error [curl\bld\docs\examples\curl-example-externalsocket.vcxproj]
  curl\docs\examples\externalsocket.c(125,32): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [curl\bld\docs\examples\curl-example-e
  ```
  Ref: https://github.com/curl/curl/actions/runs/9227337318/job/25389073450#step:4:95

- silence an MSVC compiler warning. This is in conflict with `checksrc`
  rules, so silence the rule in favour of the warning-free C syntax.
  ```
  curl\docs\examples\multi-legacy.c(152,1): error C2220: the following warning is treated as an error [curl\bld\docs\examples\curl-example-multi-legacy.vcxproj]
  curl\docs\examples\multi-legacy.c(152,1): warning C4706: assignment within conditional expression [curl\bld\docs\examples\curl-example-multi-legacy.vcxproj]
  ```
  Ref: https://github.com/curl/curl/actions/runs/9227337318/job/25389073450#step:4:226

- do not use `sys/time.h` and `unistd.h` in Windows builds.
  Some of these includes look unnecessary. Subject to another PR.

Cherry-picked from #13766
Closes #13771

14 months agodocs/cmdline-opts: fix mail-auth example TLD typo
Jonathan Matthews [Sun, 26 May 2024 18:50:44 +0000 (19:50 +0100)] 
docs/cmdline-opts: fix mail-auth example TLD typo

Closes: #13784
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
14 months agolibssh: remove CURLOPT_SSL_VERIFYHOST check
Daniel Stenberg [Sat, 25 May 2024 21:30:51 +0000 (23:30 +0200)] 
libssh: remove CURLOPT_SSL_VERIFYHOST check

It was never meant for SSH: it should rely on the knownhosts file (if
set) in the same way libssh2 already does.

Reported-by: James Abbatiello
Fixes #13767
Closes #13781

14 months agomulti: add multi->proto_hash, a key-value store for protocol data
Stefan Eissing [Thu, 11 Apr 2024 10:34:40 +0000 (12:34 +0200)] 
multi: add multi->proto_hash, a key-value store for protocol data

- add `Curl_hash_add2()` that passes a destructor function for
  the element added. Call element destructor instead of hash
  destructor if present.
- multi: add `proto_hash` for protocol related information,
  remove `struct multi_ssl_backend_data`.
- openssl: use multi->proto_hash to keep x509 shared store
- schannel: use multi->proto_hash to keep x509 shared store
- vtls: remove Curl_free_multi_ssl_backend_data() and its
  equivalents in the TLS backends

Closes #13345

14 months agotests: add pytest for --ciphers and --tls13-ciphers options
Jan Venekamp [Sat, 25 May 2024 12:56:53 +0000 (14:56 +0200)] 
tests: add pytest for --ciphers and --tls13-ciphers options

Closes #13530

14 months agotool_operate: avoid explicitly setting verifypeer to 1
Orgad Shaneh [Sun, 19 May 2024 08:58:44 +0000 (11:58 +0300)] 
tool_operate: avoid explicitly setting verifypeer to 1

Also for the proxy verison. It is the default, just like verifyhost,
since a long time.

Closes #13704

14 months agotests: extend user/password parsing test1620
Orgad Shaneh [Thu, 23 May 2024 07:01:38 +0000 (10:01 +0300)] 
tests: extend user/password parsing test1620

Closes #13756

14 months agoconfigure: use `$EGREP` in place of `grep -E`
Alejandro R. Sedeño [Sat, 25 May 2024 16:04:18 +0000 (12:04 -0400)] 
configure: use `$EGREP` in place of `grep -E`

`$EGREP` is set based on an earlier test in configure so that we can
work with systems that have `egrep` and a `grep` that does not support
`-E`.

Closes #13780

14 months agoci: update dependency awslabs/aws-lc to v1.28.0
renovate[bot] [Fri, 24 May 2024 19:22:28 +0000 (19:22 +0000)] 
ci: update dependency awslabs/aws-lc to v1.28.0

Closes #13770

14 months agotests: test_17_ssl_use.py clarify mbedtls TLSv1.3 support
Jan Venekamp [Sat, 25 May 2024 13:07:58 +0000 (15:07 +0200)] 
tests: test_17_ssl_use.py clarify mbedtls TLSv1.3 support

Closes #13779

14 months agohttp: write last header line late
Stefan Eissing [Thu, 23 May 2024 10:21:46 +0000 (12:21 +0200)] 
http: write last header line late

- HEADERFUNCTIONS might inspect response properties like
  CURLINFO_CONTENT_LENGTH_DOWNLOAD_T on seeing the last header line. If
  the line is being written before this is initialized, values are not
  available.

- write the last header line late when analyzing a HTTP response so that
  all information is available at the time of the writing.

- add test1485 to verify that CURLINFO_CONTENT_LENGTH_DOWNLOAD_T works
  on seeing the last header.

Fixes #13752
Reported-by: Harry Sintonen
Closes #13757

14 months agotests: use exec when spawning nghttpx
Dan Fandrich [Fri, 24 May 2024 21:46:19 +0000 (14:46 -0700)] 
tests: use exec when spawning nghttpx

This stops keeping perl and shell processes around that are no longer
needed, plus it eliminates an unneeded shell message when the server is
later terminated.

Closes #13772

14 months agoGHA: ignore flaky test 3017 (MQTT) on OpenBSD
Viktor Szakats [Fri, 24 May 2024 21:47:15 +0000 (23:47 +0200)] 
GHA: ignore flaky test 3017 (MQTT) on OpenBSD

```
TESTFAIL: These test cases failed: 3017
```
Ref: https://github.com/curl/curl/actions/runs/9223543272/job/25376999226?pr=13759#step:3:16326
Ref: https://github.com/curl/curl/actions/runs/9230183764/job/25397883193?pr=13766#step:3:16345

Ref: https://github.com/curl/curl/pull/13583#issuecomment-2119376898

14 months agobuild: add more supported attributes to the IAR compiler
Joseph Chen [Wed, 22 May 2024 07:35:31 +0000 (15:35 +0800)] 
build: add more supported attributes to the IAR compiler

Closes #13744

14 months agocmake: fix test 1013 with websockets enabled and no TLS
Viktor Szakats [Fri, 24 May 2024 18:51:23 +0000 (20:51 +0200)] 
cmake: fix test 1013 with websockets enabled and no TLS

test 1013 is 'Compare curl --version with curl-config --protocols'.

Ref: https://github.com/curl/curl/actions/runs/9228363859/job/25392251955

Closes #13769

14 months agoGHA: stop deleting curl in non-native workflows
Viktor Szakats [Thu, 23 May 2024 12:54:49 +0000 (14:54 +0200)] 
GHA: stop deleting curl in non-native workflows

We do it in Cirrus CI, but for some platforms it's not possible to
delete it and tests work anyway.

The test runner also runs `../src/curl` by default, which is always the
one freshly built. The runner may also need the system curl to talk to
APIs when needed.

Also:
- stop setting `CURL` env. This isn't picked up by the runners,
  and works out of the box anyway.
- quote an option just in case.

Follow-up to 90e644f944969bb11c6448bf50c6d441b5c0b1e6 #13583
Closes #13765

14 months agoopenssl: stop duplicate ssl key logging for legacy OpenSSL
Jay Satiro [Fri, 17 May 2024 08:01:35 +0000 (04:01 -0400)] 
openssl: stop duplicate ssl key logging for legacy OpenSSL

- Don't call the keylog function if it has already logged the key.

For old OpenSSL versions and its forks that do not have support for
OpenSSL's keylog callback, libcurl has its own legacy key logging
function that logs the TLS 1.2 (and earlier) key (client random + master
key) on a single line.

Prior to this change, since e7de80e8 (precedes 8.8.0), the legacy key
logging function could write the same key line more than once (usually
twice) due to some incorrect logic.

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

14 months agotransfer: remove curl_upload_refill_watermark, no longer used
Stefan Eissing [Fri, 24 May 2024 10:13:16 +0000 (12:13 +0200)] 
transfer: remove curl_upload_refill_watermark, no longer used

the define applied to upload buffers which we removed

Closes #13764

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 24 May 2024 11:33:15 +0000 (13:33 +0200)] 
RELEASE-NOTES: synced

14 months agocmake: fix brotli lib order
Viktor Szakats [Thu, 23 May 2024 14:44:40 +0000 (16:44 +0200)] 
cmake: fix brotli lib order

Fix root cause that caused missing symbols when linking brotli
statically with e.g. binutils `ld` (and any other "picky" linker,
or "traditional" linker as CMake now calls them).

Also drop existing workaround that added brotli libs twice to the lib
list.

```
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(decode.c.obj):decode.c:(.text$ProcessCommands[ProcessCommands]+0xbb5): undefined reference to `BrotliTransformDictionaryWord'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(decode.c.obj):decode.c:(.text$SafeProcessCommands[SafeProcessCommands]+0xe8a): undefined reference to `BrotliTransformDictionaryWord'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(decode.c.obj):decode.c:(.rdata$.refptr._kBrotliContextLookupTable[.refptr._kBrotliContextLookupTable]+0x0): undefined reference to `_kBrotliContextLookupTable'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(decode.c.obj):decode.c:(.rdata$.refptr._kBrotliPrefixCodeRanges[.refptr._kBrotliPrefixCodeRanges]+0x0): undefined reference to `_kBrotliPrefixCodeRanges'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(state.c.obj):state.c:(.text$BrotliDecoderStateInit[BrotliDecoderStateInit]+0x21): undefined reference to `BrotliDefaultAllocFunc'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(state.c.obj):state.c:(.text$BrotliDecoderStateInit[BrotliDecoderStateInit]+0x2f): undefined reference to `BrotliDefaultFreeFunc'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(state.c.obj):state.c:(.text$BrotliDecoderStateInit[BrotliDecoderStateInit]+0x10e): undefined reference to `BrotliSharedDictionaryCreateInstance'
x86_64-w64-mingw32-ld: .../curl/brotli/_bld/usr/lib/libbrotlidec.a(state.c.obj):state.c:(.text$BrotliDecoderStateCleanup[BrotliDecoderStateCleanup]+0xf4): undefined reference to `BrotliSharedDictionaryDestroyInstance'
collect2: error: ld returned 1 exit status
```

Breakage reproducible with curl-for-win config "`win-gcc`" and deleting
the `LDFLAGS+=' -Wl,--start-group'` line from its `curl.sh` script.
(Above line still required for some non-brotli cases, e.g. libssh2 and
zlib.)

Assisted-by: Kai Pastor
Ref: https://github.com/curl/curl/pull/10857#discussion_r1611714989
Follow-up to 1e3319a167d2f32d295603167486e9e88af9bb4e #10857
Closes #13761

14 months agocmake: fix building in unity mode
Pavel P [Wed, 22 May 2024 15:32:43 +0000 (17:32 +0200)] 
cmake: fix building in unity mode

- Fix sha256 and sha512 duplicate macro names (eg function-like macro Ch
  is now Sha256_Ch and Sha512_Ch).

- Avoid defining short defines like R, S. (eg S is now Sha256_S).

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

14 months agowinbuild: remove outdated WIN32 defines
Jay Satiro [Wed, 22 May 2024 06:46:13 +0000 (02:46 -0400)] 
winbuild: remove outdated WIN32 defines

- Remove all instances in the makefile of compiler option /DWIN32.

This is a follow-up to e9a7d4a1 which replaced all defined(WIN32) checks
with defined(_WIN32) in the codebase, since only the latter is
automatically defined by all compilers for Windows builds.

Bug: https://github.com/curl/curl/pull/13739#issuecomment-2123937859
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/13742

14 months agoci: update github/codeql-action digest to 9fdb3e4
renovate[bot] [Mon, 20 May 2024 19:21:13 +0000 (19:21 +0000)] 
ci: update github/codeql-action digest to 9fdb3e4

Closes #13726

14 months agoasyn-thread: avoid using GetAddrInfoExW with impersonation
Pavel P [Tue, 21 May 2024 23:23:34 +0000 (01:23 +0200)] 
asyn-thread: avoid using GetAddrInfoExW with impersonation

Multiple reports suggest that GetAddrInfoExW fails when impersonation is
used. This PR checks if thread is impersonating and avoids using
GetAddrInfoExW api.

Reported-by: Keerthi Timmaraju
Assisted-by: edmcln on github
Fixes #13612
Closes #13738

14 months agotransfer: conn close on paused upload
Stefan Eissing [Wed, 22 May 2024 14:52:16 +0000 (16:52 +0200)] 
transfer: conn close on paused upload

- add 2 variations on test_07_42 which PAUSEs uploads
  and response connections terminating either right away
  or after the 100-continue response
- when detecting the connection being closed in transfer.c
  readwrite_data(), clear ALL send bits in data->req.keepon.
  It no longer makes send to wait for a KEEP_SEND_PAUSE or HOLD.
- in the protocol client writer add the check for incomplete
  response bodies. When an EOS is seen and the length is known,
  check that and fail if bytes are missing.

Reported-by: Sergey Bronnikov
Fixes #13740
Closes #13750

14 months agoCI GHA: add vsftpd to ngtcp2-linux runs
Stefan Eissing [Thu, 23 May 2024 12:58:37 +0000 (14:58 +0200)] 
CI GHA: add vsftpd to ngtcp2-linux runs

- not using HTTP/3, but gnutls does not seem to run
  somewhere else right now

Closes #13760

14 months agoGHA: increase timeout for Cygwin autotools build tests step
Orgad Shaneh [Wed, 22 May 2024 19:37:35 +0000 (22:37 +0300)] 
GHA: increase timeout for Cygwin autotools build tests step

Apparently 10 minutes are not (always) enough:
https://github.com/curl/curl/actions/runs/9197003907/job/25296439556#step:8:1936

Closes #13753

14 months agombedtls: send close-notify on close
Stefan Eissing [Wed, 22 May 2024 08:35:51 +0000 (10:35 +0200)] 
mbedtls: send close-notify on close

- send the TLS close notify message when cloding down
  the mbedtls connection filter
- this is a "least" effort version and, as other TLS filters,
  is lacking a graceful send/receive/timeout for a really
  clean shutdown.

Closes #13745

14 months agombedtls: check version for cipher id
Stefan Eissing [Wed, 22 May 2024 12:44:56 +0000 (14:44 +0200)] 
mbedtls: check version for cipher id

mbedtls_ssl_get_ciphersuite_id_from_ssl() seems to have been added in
mbedtls 3.2.0. Check for that version.

Closes #13749

14 months agocmake: fix building with both md4 and md5 in unity mode
Viktor Szakats [Tue, 21 May 2024 20:31:12 +0000 (22:31 +0200)] 
cmake: fix building with both md4 and md5 in unity mode

Macro and static function names were colliding between
`lib/md4.c` and
`lib/md5.c`.

Fix it by namespacing these symbols.

Seen with a basic macOS build using these options:
`-DCMAKE_UNITY_BUILD=ON -DCURL_USE_SECTRANSP=ON`

Closes #13737

14 months agodocs/Makefile.am: make curl-config.1 install
Daniel Stenberg [Wed, 22 May 2024 06:43:43 +0000 (08:43 +0200)] 
docs/Makefile.am: make curl-config.1 install

on "make install" like it should

Follow-up to 60971d665b9b1df87082

Closes #13741

14 months agoGHA: bump actions/checkout from 4.1.4 to 4.1.6
dependabot[bot] [Mon, 20 May 2024 14:25:03 +0000 (14:25 +0000)] 
GHA: bump actions/checkout from 4.1.4 to 4.1.6

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/0ad4b8fadaa221de15dcec353f45205ec38ea70b...a5ac7e51b41094c92402da3b24376905380afc29)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Closes #13720

14 months agopytest: add ftp upload tests
Stefan Eissing [Tue, 21 May 2024 10:17:33 +0000 (12:17 +0200)] 
pytest: add ftp upload tests

- refs #13556
- allow anon uploads on vsftpd test server
- add test_30_05 for plain upload of 1k, 100k, 1m
- add test_31_05 for SSL upload of 1k, 100k, 1m
- verify file size and contents

Closes #13734

14 months agotest: add test1546, chunked not last transfer encoding
Stefan Eissing [Tue, 21 May 2024 13:51:51 +0000 (15:51 +0200)] 
test: add test1546, chunked not last transfer encoding

with more than one transfer-encoding, 'chunked' must be the last added
to the writer stack (and therefore the first to decode). RFC 9112, ch.
6.1.

Closes #13736

14 months agotest: add test1484, for HEAD with content
Stefan Eissing [Tue, 21 May 2024 13:22:47 +0000 (15:22 +0200)] 
test: add test1484, for HEAD with content

- test HEAD request with 'Transfer-Encoding:chunked' and
  non-encoded response content
- verifies #13725

Closes #13735

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 22 May 2024 06:53:19 +0000 (08:53 +0200)] 
RELEASE-NOTES: synced

bump to 8.8.1 for now

14 months ago(lib)curl.rc: set debug flag also for `CURLDEBUG` and `UNITTESTS`
Viktor Szakats [Tue, 21 May 2024 08:34:04 +0000 (10:34 +0200)] 
(lib)curl.rc: set debug flag also for `CURLDEBUG` and `UNITTESTS`

These macros also enable debug features in both libcurl and curl.
Enable `VS_FF_DEBUG` version resource flag when they are set.

Closes #13730

14 months agowinbuild: fix PE version info debug flag
Jay Satiro [Wed, 22 May 2024 05:39:44 +0000 (01:39 -0400)] 
winbuild: fix PE version info debug flag

- Only set PE file flag VS_FF_DEBUG if curl.exe and libcurl.dll were
  built with winbuild option DEBUG=yes which builds with debug info.

VS_FF_DEBUG is a PE flag (Portable Executable file flag - dll, exe, etc)
that indicates the file contains or was built with debug info.

Prior to this change when winbuild was used to build curl, curl.exe
and libcurl.dll always had VS_FF_DEBUG set, regardless of build option
DEBUG=yes/no, due to some bad logic.

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

14 months agoRELEASE-NOTES: synced curl-8_8_0
Daniel Stenberg [Wed, 22 May 2024 05:51:13 +0000 (07:51 +0200)] 
RELEASE-NOTES: synced

14 months agoTHANKS: add contributors from 8.8.0
Daniel Stenberg [Wed, 22 May 2024 05:54:14 +0000 (07:54 +0200)] 
THANKS: add contributors from 8.8.0

14 months agourl: remove duplicate call to Curl_conncache_remove_conn when pruning
Nathan Moinvaziri [Sun, 19 May 2024 19:33:21 +0000 (12:33 -0700)] 
url: remove duplicate call to Curl_conncache_remove_conn when pruning

- remove unnecessary prunedead struct from prune_dead_connections
- rename extract_if_dead to prune_if_dead for clarity

Closes #13710

14 months agocurl_setup.h: add support for IAR compiler
Joseph Chen [Tue, 21 May 2024 07:30:23 +0000 (15:30 +0800)] 
curl_setup.h: add support for IAR compiler

Closes #13728

14 months agodocs/ECH: typo/clarification
Stephen Farrell [Mon, 20 May 2024 20:53:01 +0000 (21:53 +0100)] 
docs/ECH: typo/clarification

Closes #13727

14 months agohash: delete unused debug function
Viktor Szakats [Tue, 21 May 2024 08:14:17 +0000 (10:14 +0200)] 
hash: delete unused debug function

It had no use in the curl codebase and was also protected by the macro
`AGGRESSIVE_TEST` (renamed in 2020), also with no local reference.

Added in ca6e77083768858aa34207f8c5dce38b3c05336d (2002-11-11)

Closes #13729

14 months agocontent_encoding: reject transfer-encoding after chunked
Stefan Eissing [Tue, 21 May 2024 09:38:47 +0000 (11:38 +0200)] 
content_encoding: reject transfer-encoding after chunked

reject a response that applies a transfer-encoding after a 'chunked'
encoding. RFC 9112 ch. 6.1 required chunked to be the final encoding.

Closes #13733

14 months agohttp: HEAD response body tolerance
Stefan Eissing [Tue, 21 May 2024 09:21:14 +0000 (11:21 +0200)] 
http: HEAD response body tolerance

- as reported in #13725, some servers wrongly send body bytes in
  responses to a HEAD request. This used to be tolerated in curl
  8.4 and before and leads to failed transfers in newer versions.
- restore previous behaviour for HTTP/1.1 and HTTP/2:
  * 1.1: do not add 'Transfer-Encoding' writers from HEAD
    responses. RFC 9112 says they do not apply.
  * 2: when the transfer expects 'no_body', to not report stream
    resets as error when all response headers have been received.

Reported-by: Jeroen Ooms
Fixes #13725
Closes #13732

14 months agotests: fix TFTP test 2305 on Windows
Viktor Szakats [Mon, 20 May 2024 17:13:26 +0000 (19:13 +0200)] 
tests: fix TFTP test 2305 on Windows

Ref: #13692
Closes #13724

14 months agoopenssl: revert keylog_callback support for LibreSSL
Jay Satiro [Fri, 17 May 2024 04:07:21 +0000 (00:07 -0400)] 
openssl: revert keylog_callback support for LibreSSL

- Revert to the legacy TLS 1.2 key logging code for LibreSSL.

- Document SSLKEYLOGFILE for LibreSSL is TLS 1.2 max.

Prior to this change if the user specified a filename in the
SSLKEYLOGFILE environment variable and was using LibreSSL 3.5.0+ then
an empty file would be created and no keys would be logged.

This is effectively a revert of e43474b4 which changed openssl.c to use
SSL_CTX_set_keylog_callback for LibreSSL 3.5.0+. Unfortunately LibreSSL
added that function only as a stub that doesn't actually do anything.

Reported-by: Gonçalo Carvalho
Fixes https://github.com/curl/curl/issues/13672
Closes https://github.com/curl/curl/pull/13682

14 months agoGHA: pin dependencies
renovate[bot] [Sun, 19 May 2024 21:07:47 +0000 (21:07 +0000)] 
GHA: pin dependencies

Closes #13712

14 months agoappveyor: drop unnecessary `--clean-first` cmake option
Viktor Szakats [Sun, 19 May 2024 08:15:48 +0000 (10:15 +0200)] 
appveyor: drop unnecessary `--clean-first` cmake option

In CI all machines are fresh on startup, making the `clean` operation
unnecessary. This can save some time/energy for each job run.

Closes #13707

14 months agocmake: merge two `if(BUILD_TESTING)` branches
Viktor Szakats [Sat, 18 May 2024 09:31:24 +0000 (11:31 +0200)] 
cmake: merge two `if(BUILD_TESTING)` branches

Closes #13708

14 months agoGHA: bump nghttp2 to v1.62.1
Tatsuhiro Tsujikawa [Sat, 18 May 2024 07:40:27 +0000 (16:40 +0900)] 
GHA: bump nghttp2 to v1.62.1

Use gcc-12 explicitly to compile C++20 source files.

Closes #13702

14 months agoGHA: add NetBSD, OpenBSD, FreeBSD/arm64 and OmniOS jobs
Viktor Szakats [Fri, 10 May 2024 13:29:21 +0000 (15:29 +0200)] 
GHA: add NetBSD, OpenBSD, FreeBSD/arm64 and OmniOS jobs

Add these jobs to GHA:
- NetBSD, cmake-unity, clang, OpenSSL, x86_64, with tests, w/o python,
  no parallelism (was flaky sometimes)
- OpenBSD, cmake-unity, clang, LibreSSL, x86_64, with tests,
  with python, -j8, TFTP results ignored due to #13623.
- FreeBSD, cmake-unity and autotools, clang, OpenSSL, arm64
  (Tests disabled for arm64, because they are slow. It's available for
  x86_64 with python, -j12.)
  Configuration matches our existing Cirrus CI one.
- OmniOS, autotools, gcc, OpenSSL, x86_64, with tests, -j12.

All build with websockets and examples.

Closes #13583

14 months agoGHA: disable TFTP test on native Windows
Viktor Szakats [Sat, 18 May 2024 20:38:58 +0000 (22:38 +0200)] 
GHA: disable TFTP test on native Windows

Some TFTP tests seem to enter into a loop and maybe hang?

E.g. 1007, 1009, 1238

Try fixing it by skipping all TFTP tests.

Ref: https://github.com/curl/curl/actions/runs/9141987545/job/25137038249?pr=13698

Also drop mingw-w64 test exclusions copy-pasted from MSYS jobs.

Possibly related: cffbcc3110c1eda2e333f9cfe2e269154618793a #5364

Close #13699

14 months agoGHA: pin dependencies
renovate[bot] [Fri, 17 May 2024 22:31:56 +0000 (22:31 +0000)] 
GHA: pin dependencies

Closes #13691

14 months agocmake: do not pass linker flags to the static library tool
Viktor Szakats [Sat, 18 May 2024 12:37:57 +0000 (14:37 +0200)] 
cmake: do not pass linker flags to the static library tool

Do not add linker flags to the global CMake static library tool (aka
"static linker") (e.g. `ar`) flags list. They don't mix well. This was
only done after successfully detecting GSSAPI.

Linker flags seen on Old Linux CI:
```
-- |GSS_LINKER_FLAGS|-Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/heimdal|
-- |CMAKE_STATIC_LINKER_FLAGS| -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/heimdal|
```
Ref: https://github.com/curl/curl/actions/runs/9138988036/job/25130791712#step:6:85

Causing:
```
/usr/bin/ar qc libcurltool.a  -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/heimdal
  CMakeFiles/curltool.dir/slist_wc.c.o CMakeFiles/curltool.dir/tool_binmode.c.o CMakeFiles/curltool.dir/tool_bname.c.o
  [...]
  CMakeFiles/curltool.dir/tool_writeout_json.c.o CMakeFiles/curltool.dir/tool_xattr.c.o CMakeFiles/curltool.dir/var.c.o
  CMakeFiles/curltool.dir/__/lib/base64.c.o CMakeFiles/curltool.dir/__/lib/dynbuf.c.o
/usr/bin/ar: invalid option -- 'W'
Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
       /usr/bin/ar -M [<mri-script]
```
Ref: https://github.com/curl/curl/actions/runs/9138988036/job/25130791712#step:9:125

This problem is invisible at the moment because of another bug (#13698)
that misses building unit tests when not using either the
`ENABLE_DEBUG=ON` or `ENABLE_CURLDEBUG=ON` options (to set
`-DCURLDEBUG`):
```
test 1300 SKIPPED: curl lacks unittest support
```
Ref: https://github.com/curl/curl/actions/runs/9135571781/job/25123104557#step:9:2883

With that fixed, this becomes the next issue.

It's possible this bug also required an older CMake version and/or
a specific OS environment which uses linker flags in GSSAPI that are not
playing well with `ar` options, to reproduce.

Follow-up to 558814e16d84aa202c5ccc0c8108a9d728e77a58 (2014-09-25)
Ref: #13698
Closes #13697

14 months agoGHA: ignore flaky test2302 results on Windows
Viktor Szakats [Sat, 18 May 2024 12:18:58 +0000 (14:18 +0200)] 
GHA: ignore flaky test2302 results on Windows

WebSockets:
```
TESTFAIL: These test cases failed: 2302
```
Ref: https://github.com/curl/curl/actions/runs/9139155361/job/25131144383?pr=13689#step:14:9892

Follow-up to 36fd2dd6ee874726c628e67fcf6415a2e52bfe29 #13599
Ref: #13692
Closes #13696

14 months agoGHA: add MSYS, mingw-w64, Cygwin jobs
Viktor Szakats [Sat, 11 May 2024 13:29:23 +0000 (15:29 +0200)] 
GHA: add MSYS, mingw-w64, Cygwin jobs

- re-implement autotools MSYS and Cygwin AppVeyor jobs in GHA.
  Now build with SSL and PSL to improve test coverage.
- re-implement MSYS2 mingw-w64 gcc 13 AppVeyor job in GHA.
  `CMake, mingw-w64, gcc 13, Debug, x64, Schannel, Static, Unicode`
- add new cmake Cygwin job (build-only).
- enable `-j14` parallelism when running tests.
- delete the 5 migrated jobs from AppVeyor CI.
- add 2 build-only mingw-w64 builds, gcc Release and clang OpenSSL.
- also enable brotli, libssh2, nghttp2 for more test coverage.

These jobs offer better performance, more flexibility and
parallelization compared to the AppVeyor ones they replace. It also
offloads AppVeyor, allowing to iterate faster. They also appear more
reliable than e.g. Azure Windows jobs, where runners are prone to fail
[1].

Closes #13599

[1]:
`Exit code 143 returned from process: file name 'C:\Windows\system32\docker.EXE',
arguments 'exec -i   6b13a669c6dfe7fb9f59414369872fd64d61c7182f880c3d39c135cb4c115c8f
C:\__a\externals\node\bin\node.exe C:\__w\_temp\containerHandlerInvoker.js'.`

14 months agopytest: fixes for recent python, add FTP tests
Stefan Eissing [Wed, 15 May 2024 12:20:11 +0000 (14:20 +0200)] 
pytest: fixes for recent python, add FTP tests

Fixes:
- in uds tests, abort also silently on os errors
- be conservative on the h3 goaway duration
- detect curl debug build and use in checks
- fix caddy version check for slight difference under linux
- set caddy default path fitting for linux
- fix deprecation warnings in valid time checks

FTP tests:
- add '--with-test-vsftpd=path' to configure
- use vsftpd default path suitable for linux
- add test_30 with plain FTP tests
- add test_31 with --ssl-reqd FTP tests
- add vsftpd to linux GHA for pytest workflows

Closes #13661

14 months agorustls: fix handshake done handling
Stefan Eissing [Fri, 17 May 2024 11:23:19 +0000 (13:23 +0200)] 
rustls: fix handshake done handling

- rustls report it has finished the TLS handshake *before*
  all relevant data has been sent off, e.g. it FINISHED message
- On connections the send data immediately, this was never noticed
  as the FINISHED in rustls buffers was send with the app data
- On passive FTP connections, curl does not send any data after
  the handshake, leaving FINISHED unsent and the server never
  responded as it was waiting on this.

Closes #13686

14 months agox509asn1: return error on missing OID
Daniel Stenberg [Fri, 17 May 2024 10:05:24 +0000 (12:05 +0200)] 
x509asn1: return error on missing OID

to avoid crash when dereferencing a NULL pointer.

Reported-by: Trzik on github
Patch-by: Trzik on github
Fixes #13684
Closes #13685

14 months agoCURLOPT_WRITEFUNCTION.md: fix the callback proto in the example
Daniel Stenberg [Fri, 17 May 2024 11:36:55 +0000 (13:36 +0200)] 
CURLOPT_WRITEFUNCTION.md: fix the callback proto in the example

Reported-by: Michael Litwak
Fixes #13681
Closes #13687

14 months agosrc: tidy up types, add necessary casts
Viktor Szakats [Mon, 13 May 2024 10:17:33 +0000 (12:17 +0200)] 
src: tidy up types, add necessary casts

Cherry-picked from #13489
Closes #13614

14 months agolib: fix compiler warnings (gcc)
Viktor Szakats [Sat, 11 May 2024 21:38:25 +0000 (23:38 +0200)] 
lib: fix compiler warnings (gcc)

Seen when setting `ENABLE_DEBUG=ON` and `-DDEBUGBUILD` for mingw-w64
gcc 13.2.0 CMake unity builds in 'Release' configurations.

```
curl/lib/curl_gethostname.c:71:5: error: 'strncpy' specified bound 1025 equals destination size [-Werror=stringop-truncation]
   71 |     strncpy(name, force_hostname, namelen);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from curl/_bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:175:
In function 'hostcache_timestamp_remove',
    inlined from 'Curl_hash_clean_with_criterium' at curl/lib/hash.c:265:19,
    inlined from 'Curl_hash_clean_with_criterium' at curl/lib/hash.c:247:1,
    inlined from 'hostcache_prune' at curl/lib/hostip.c:228:3,
    inlined from 'Curl_hostcache_prune' at curl/lib/hostip.c:256:21:
curl/lib/hostip.c:205:12: error: 'now' may be used uninitialized [-Werror=maybe-uninitialized]
  205 |     time_t age = prune->now - c->timestamp;
      |            ^~~
curl/lib/hostip.c: In function 'Curl_hostcache_prune':
curl/lib/hostip.c:241:10: note: 'now' was declared here
  241 |   time_t now;
      |          ^~~
In function 'hostcache_timestamp_remove',
    inlined from 'fetch_addr' at curl/lib/hostip.c:310:8:
curl/lib/hostip.c:205:23: error: 'user.now' may be used uninitialized [-Werror=maybe-uninitialized]
  205 |     time_t age = prune->now - c->timestamp;
      |                  ~~~~~^~~~~
curl/lib/hostip.c: In function 'fetch_addr':
curl/lib/hostip.c:304:33: note: 'user' declared here
  304 |     struct hostcache_prune_data user;
      |                                 ^~~~
In file included from curl/_bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:40:
curl/lib/cf-socket.c: In function 'cf_socket_send':
curl/lib/cf-socket.c:1294:10: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
 1294 |     if(c >= ((100-ctx->wblock_percent)*256/100)) {
      |        ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curl/lib/cf-socket.c:1292:19: note: 'c' was declared here
 1292 |     unsigned char c;
      |                   ^
In file included from curl/_bld/lib/CMakeFiles/libcurl_object.dir/Unity/unity_0_c.c:364:
In function 'tftp_state_timeout',
    inlined from 'tftp_multi_statemach' at curl/lib/tftp.c:1230:27:
curl/lib/tftp.c:1208:5: error: 'current' may be used uninitialized [-Werror=maybe-uninitialized]
 1208 |   if(current > state->rx_time + state->retry_time) {
      |     ^
curl/lib/tftp.c: In function 'tftp_multi_statemach':
curl/lib/tftp.c:1192:10: note: 'current' was declared here
 1192 |   time_t current;
      |          ^~~~~~~
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/49792835/job/91c8dj5qb36spfe0#L112
Ref: https://github.com/curl/curl/actions/runs/9082968838/job/24960616145#step:12:62

Ref: #13592
Closes #13643

14 months agowakeup_create: use FD_CLOEXEC/SOCK_CLOEXEC
Andrew [Mon, 13 May 2024 17:34:06 +0000 (22:34 +0500)] 
wakeup_create: use FD_CLOEXEC/SOCK_CLOEXEC

for `pipe()`/`socketpair()`

Fixes #13618
Closes #13625

14 months agorustls: fix partial send handling
Stefan Eissing [Thu, 16 May 2024 12:59:25 +0000 (14:59 +0200)] 
rustls: fix partial send handling

When TLS bytes could not completely sent off, the amount of plain bytes
already added to rustls were forgotten. This lead to send those byte
duplicate, corrupting the request send to the server.

Closes #13676

14 months agopytest: add DELETE tests, check server version
Stefan Eissing [Thu, 16 May 2024 15:53:19 +0000 (17:53 +0200)] 
pytest: add DELETE tests, check server version

- add tests for DELETE working
- check apache version in keepalive test
- fix some comments

Closes #13679

14 months agovquic-tls: use correct cert name check API for wolfSSL
Juliusz Sosinowicz [Thu, 16 May 2024 18:16:37 +0000 (20:16 +0200)] 
vquic-tls: use correct cert name check API for wolfSSL

wolfSSL_X509_check_host checks the peer name against the alt names and
the common name.

Fixes #13487
Closes #13680

14 months agocmake: initialize `BUILD_TESTING` before first use
Viktor Szakats [Thu, 16 May 2024 00:56:37 +0000 (02:56 +0200)] 
cmake: initialize `BUILD_TESTING` before first use

Before this patch `BUILD_TESTING` was used once, then initialized, then
used again. This caused the `curlu` library not being built when relying
on an implicit `BUILD_TESTING=ON` setting, and ending up with a link
error when building the `testdeps` target.

It did not cause issues when `BUILD_TESTING` was explicitly set.

Move the initialization before the first use to fix it.

Regression from aace27b0965c10394544d1dacc9c2cb2fe0de3d3 #12287
Closes #13668

14 months agolibtest: 2308 verifies CURLE_WRITE_ERROR after write callback error
Daniel Stenberg [Thu, 16 May 2024 07:07:31 +0000 (09:07 +0200)] 
libtest: 2308 verifies CURLE_WRITE_ERROR after write callback error

Verifies that the issue in #13669 actually is fixed. This return code is
what the CURLOPT_WRITEFUNCTION manpage documents should be returned.

This code is mostly from the
Source-written-by: Trumeet on github
Closes #13671

14 months agosocketpair: fix compilation when USE_UNIX_SOCKETS is not defined
Antoine Bollengier [Wed, 15 May 2024 20:46:05 +0000 (22:46 +0200)] 
socketpair: fix compilation when USE_UNIX_SOCKETS is not defined

Closes #13666

14 months agorustsls: fix error code on receive
Stefan Eissing [Thu, 16 May 2024 06:55:14 +0000 (08:55 +0200)] 
rustsls: fix error code on receive

- use CURLE_RECV_ERROR instead of CURLE_READ_ERROR when receiving
  data fails.

Closes #13670

14 months agoci: disable Renovate dashboard
Max Dymond [Thu, 16 May 2024 08:02:36 +0000 (09:02 +0100)] 
ci: disable Renovate dashboard

The Renovate dashboard insists on an open issue,
which is a problem. Disable the dashboard. Status
can still be seen at https://developer.mend.io/github/curl/curl.

Fixes #13630
Closes #13673

14 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 16 May 2024 06:44:21 +0000 (08:44 +0200)] 
RELEASE-NOTES: synced

14 months agoGHA: update awslabs/aws-lc to v1.27.0
renovate[bot] [Wed, 15 May 2024 21:23:24 +0000 (21:23 +0000)] 
GHA: update awslabs/aws-lc to v1.27.0

Closes #13667

14 months agocurl_easy_pause.md: use correct defines in example
Daniel Stenberg [Wed, 15 May 2024 14:11:42 +0000 (16:11 +0200)] 
curl_easy_pause.md: use correct defines in example

Spotted-by: Harry Sintonen
Closes #13664

14 months agoappveyor: more tidy-ups
Viktor Szakats [Sun, 12 May 2024 22:34:54 +0000 (00:34 +0200)] 
appveyor: more tidy-ups

- use `--disable` when calling `curl --version`. Just in case.

- use single-quotes for a constant.

Closes #13662

14 months agoreuse: migrate standalone license file to dep5
Viktor Szakats [Wed, 15 May 2024 09:50:07 +0000 (11:50 +0200)] 
reuse: migrate standalone license file to dep5

Follow-up to 73a36021207284ad2b4340ffde34a51b0ba4d47a
Closes #13660

14 months agoappveyor: guard against crash-build with VS2008
Viktor Szakats [Wed, 15 May 2024 06:19:54 +0000 (08:19 +0200)] 
appveyor: guard against crash-build with VS2008

The combination of `-DDEBUGBUILD`, a shared `curl.exe`, and the VS2008
compiler creates a `curl.exe` segfaulting on startup:

```
+ _bld/src/curl.exe --version
./appveyor.sh: line 122:   793 Segmentation fault      "${curl}" --version
Command exited with code 139
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/49817266/job/651iy6qn1e238pqj#L191

Add job that triggers the issue and add the necessary logic to skip
running the affected `curl.exe`.

Ref: #13592
Closes #13654

14 months agoGHA: pin dependencies
renovate[bot] [Wed, 15 May 2024 09:39:30 +0000 (09:39 +0000)] 
GHA: pin dependencies

Closes #13628

14 months agosocket: remove redundant call to getsockname
Orgad Shaneh [Wed, 15 May 2024 07:02:36 +0000 (10:02 +0300)] 
socket: remove redundant call to getsockname

The result "add" is unused.

Closes #13655

14 months agoCI: renovate updates
renovate[bot] [Tue, 14 May 2024 15:27:19 +0000 (15:27 +0000)] 
CI: renovate updates

- GHA: update actions/checkout action to v4
- GHA: update wolfSSL/wolfssh to v1.4.17
- GHA: update wolfSSL/wolfssl to v5.7.0
- Update the regex config in renovate.json

Closes #13632
Closes #13641
Closes #13658
Closes #13659

14 months agoci: fix renovate config for WolfSSL/WolfSSH tagging scheme
Max Dymond [Tue, 14 May 2024 16:16:14 +0000 (17:16 +0100)] 
ci: fix renovate config for WolfSSL/WolfSSH tagging scheme

WolfSSL/WolfSSH use a different versioning scheme;
stable builds end with `-stable`. Renovate requires
some extra configuration to extract the version
from these types of tags.

Closes #13644

14 months agoci: set semantic type as CI and include digests as CI operations
Max Dymond [Tue, 14 May 2024 15:44:37 +0000 (16:44 +0100)] 
ci: set semantic type as CI and include digests as CI operations

Replace "chore" with "ci" for renovate's semantic
type, and include digests with "pin" and
"pinDigest" as ci operations.

Closes #13644

14 months agoDEPRECATE.md: TLS libraries without 1.3 support
Daniel Stenberg [Mon, 6 May 2024 21:27:41 +0000 (23:27 +0200)] 
DEPRECATE.md: TLS libraries without 1.3 support

curl drops support for TLS libraries without TLS 1.3 capability after
May 2025.

It requires that a curl build using the library should be able to
negotiate and use TLS 1.3, or else it is not good enough. We support a
vast amount of other TLS libraries that are likely to satisfy users
better.

Closes #13544

14 months agoRevert "ci: update nghttp2/nghttp2 to v1.62.0"
Daniel Stenberg [Wed, 15 May 2024 07:13:21 +0000 (09:13 +0200)] 
Revert "ci: update nghttp2/nghttp2 to v1.62.0"

This reverts commit 14f2c767555b7598d7783ccd9093670b84d28488.

We need to also upgrade the C++ compiler for that bump to work.

Closes #13656

14 months agoDockerfile: update debian digest to 911821c
renovate[bot] [Tue, 14 May 2024 15:27:02 +0000 (15:27 +0000)] 
Dockerfile: update debian digest to 911821c

Closes #13629

14 months agoci: update gnutls/gnutls to v3.8.5
renovate[bot] [Tue, 14 May 2024 15:27:07 +0000 (15:27 +0000)] 
ci: update gnutls/gnutls to v3.8.5

Closes #13640

14 months agoci: update awslabs/aws-lc to v1.26.0
renovate[bot] [Tue, 14 May 2024 21:29:06 +0000 (21:29 +0000)] 
ci: update awslabs/aws-lc to v1.26.0

Closes #13647

14 months agoci: update cloudflare/quiche to v0.21.0
renovate[bot] [Tue, 14 May 2024 22:25:42 +0000 (22:25 +0000)] 
ci: update cloudflare/quiche to v0.21.0

Closes #13648

14 months agoci: update libressl-portable/portable to v3.9.2
renovate[bot] [Tue, 14 May 2024 22:25:47 +0000 (22:25 +0000)] 
ci: update libressl-portable/portable to v3.9.2

Closes #13649