Commit Graph

7386 Commits

Author SHA1 Message Date
Daniel Stenberg
c247725b92
DEPRECATE: remove last empty line 2026-03-21 15:18:33 +01:00
Daniel Stenberg
ceae02db04
rtmp: drop support
- librtmp has no test cases, makes no proper releases and has not had a
  single commit within the last year

- librtmp parses the URL itself and requires non-compliant URLs for this

- we have no RTMP tests

- RTMP was used by 2.2% of curl users (self-identified in the 2025
  survey)

Closes #20673
2026-03-21 14:56:06 +01:00
Daniel Stenberg
ff28f67970
DEPRECATE: fix minor release number typo 2026-03-21 14:49:36 +01:00
Daniel Stenberg
7e0a9b309c
CURLOPT_HAPROXY_CLIENT_IP.md: mention assuption on data format
The user is assumed to pass in correct data. I think we should start
clarifying this in more places.

Closes #21042
2026-03-21 14:46:55 +01:00
Stefan Eissing
82009c4220
share: concurrency handling, easy updates
Replace the `volatile int dirty` with a reference counter
protected by a mutex when available.

Solve the problem of when to call application's lock function
by adding a volatile flag that indicates a share has been added
to easy handles in its lifetime. That flag ever goes from
FALSE to TRUE, so volatile might work (in the absence of a mutex).

(The problem is that the lock/unlock functions need 2-3
`curl_share_setopt()` invocations to become usable and there
is no way of telling if the third will ever happen. Calling
the lock function before the 3rd setopt may crash the
application.)

When removing a share from an easy handle (or replacing it with
another share), detach the easy connection on a share with a
connection pool.

When cleaning up a share, allow this even if it is still used in
easy handles. It will be destroyed when the reference count
drops to 0.

Closes #20870
2026-03-21 14:42:49 +01:00
Viktor Szakats
89043ba906
cmake: drop support for CMake 3.17 and older
Require CMake 3.18 (2020-07-15) or newer, up from 3.7 (2016-11-11)
prior to this patch.

This requirement also applies to the distributed `curl-config.cmake`.

To allow dropping compatibility code maintained for old versions, and to
use features which were unpractical in separate code paths. Also to make
testing, documentation and development easier, CI builds faster due to
CMake performance improvements over time. (e.g. integration tests on
macOS run 8x faster (10 minutes is now under 1.5m) in CI, 2.5x faster on
Windows.)

CMake offers pre-built binaries for major platforms. They work without
an install step, just by unpacking and pointing the cmake command to
them. Making upgrades easy in many cases:
https://cmake.org/download/
https://cmake.org/files/
https://github.com/Kitware/CMake/releases

CMake 3.18 brings these feature as generally available when building or
consuming curl/libcurl:

LTO support, improved performance, `pkg-config` and interface target
support, `OBJECT` target (for faster libcurl builds), modern invocation
with `-S`/`-B` options, better support for custom linker options,
FetchContent, `GnuTLS::GnuTLS` target, `--verbose` and `--install`
options, `CMAKE_GENERATOR` env, last but not least unity mode and Ninja
generator.

For maximum build speed, use:
`-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON`

As for deprecations, C++11 is required to build CMake itself, which may
be a limit on some platforms. autotools continues to cover them.

Follow-up to 9bcdfb3809 #20408
Follow-up to a7c974e038 #19902
Follow-up to dfbe035c8b #10161
Discussion: https://github.com/curl/curl/discussions/18704

Closes #20407
2026-03-21 13:24:47 +01:00
Stefan Eissing
96d5b5c688
dnscache: own source file, improvements
- Rename `Curl_resolv_unlink()` to `Curl_dns_entry_unlink()`.
- Change `Curl_dnscache_get()` to return CURLcode result. Returns
  now `CURLE_COULDNT_RESOLVE_HOST` for "negative" cache entries.
- Add `Curl_dnscache_add_negative()` to put a "negative" entry
  into the cache.

Closes #20864
2026-03-21 12:04:36 +01:00
Viktor Szakats
31add10322
docs: enable more compiler warnings for C snippets, fix 3 finds
Also:
- sync gcc option order.
- unfold lines in C snippet.

Closes #21006
2026-03-19 14:21:53 +01:00
Jason Stangroome
ae864e824e
examples: fix typo in comment
noticed while reviewing https://github.com/curl/curl/pull/20793

Ref: https://github.com/curl/curl/pull/20793/changes#r2957089487

Closes #21001
2026-03-19 12:02:10 +01:00
Viktor Szakats
d86fd143a1
synctime: fix off-by-one read and write to a read-only buffer (Windows)
Also making the `--synctime` option work.

Off-by-one found by Codex Security

Assisted-by: Jay Satiro

Closes #20987
2026-03-19 11:17:17 +01:00
Viktor Szakats
454db7aeee
badwords: prefer 'null-terminated'
Aligning with existing text.

Closes #20979
2026-03-18 11:40:13 +01:00
Viktor Szakats
a3699e8b9e
examples/websocket: fix to sleep more on Windows
Found by Codex Security

Follow-up to d4b8589055 #13771

Closes #20978
2026-03-18 11:37:15 +01:00
Viktor Szakats
578ee6b79b
gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings
Extend `#pragma diagnostic push`/`pop` guards to the whole codebase
(from tests and examples only) to disable it for GCC <4.6. Rename guard
to `CURL_HAVE_DIAG` and make it include llvm/clang to be interchangeable
with `__GNUC__ || __clang__` in this context.

The above means no longer disabling certain warnings locally, so pair
this with disabling all picky warnings for GCC <4.6.

Also:
- drop global workarounds for misbehaving GCC <4.6 compiler warnings.
  Not needed with picky warnings disabled.

Reported-by: fds242 on github
Reported-by: Sergey Fedorov
Thanks-to: Orgad Shaneh
Follow-up to f07a98ae11 #20366
Fixes #20892
Fixes #20924
Closes #20902
Closes #20907
2026-03-18 11:33:37 +01:00
Daniel Stenberg
a327a5bded
netrc: refactor into smaller sub functions
Fixes #20950 - test 685 is extended for this
Closes #20932
2026-03-17 16:51:38 +01:00
Viktor Szakats
38107d3354
configure: fix --with-ngtcp2=<path> option for crypto libs
ngtcp2 1.14.0 added module dependencies to `ngtcp2_crypto_*.pc` files.
This broke certain build cases in curl, because configure was is
querying pkg-config modules by setting `PKG_CONFIG_LIBDIR` to the
directory specified via `--with-*=` options, including `--with-ngtcp2=`.
Setting `PKG_CONFIG_LIBDIR` tells pkg-config (and pkgconf) to ignore
system locations. This caused that `ngtcp2_crypto_gnutls.pc` could no
longer find its indirect dependencies, if those were present at system
locations (where they typically are). Another fallout was BoringSSL,
because it does not provide `openssl.pc` on its own, and successful
detection relied on finding a non-BoringSSL copy, typically at a system
location (also fixed in ngtcp2 main branch).

Fix `ngtcp2_crypto_*` detections to not touch `PKG_CONFIG_LIBDIR` and
instead prepend `<path>` set via `--with-ngtcp2=` to `PKG_CONFIG_PATH`.
This ensures to pick up any dependent modules from system locations.

Note the side-effect is that potentially undesired modules may be
detected this way from system locations, i.e. it makes this particular
detection less "hermetic" than the rest used in curl configure.

(Configurations using a bare `--with-ngtcp2` with no path were not
affected, and served as a workaround before this patch. It remains a
valid way of configuration after.)

Both `pkgconf` and `pkg-config` use this logic to calculate their search
directory list:
```pseudo
search = {}
if PKG_CONFIG_PATH is set
  search += PKG_CONFIG_PATH
endif
if PKG_CONFIG_LIBDIR is set (even if empty)
  search += PKG_CONFIG_LIBDIR
else
  search += built-in-pkg-config-dirs
endif
```

Refs:
https://github.com/curl/curl/pull/18028/commits (earlier attempt. Failed due to using `PKG_CONFIG_DIR` instead of the correct `PKG_CONFIG_PATH`)
c0874ce824
https://man.archlinux.org/man/pkgconf.1.en
https://manpages.debian.org/unstable/pkgconf/pkgconf.1.en.html
https://manpages.debian.org/unstable/pkg-config/pkg-config.1.en.html
10e27fd63c

Bug: https://github.com/curl/curl/pull/18022#issuecomment-3120587041
Bug: https://github.com/ngtcp2/ngtcp2/pull/1689#issuecomment-3120593664
Follow-up to 04d90b5deb #20931
Follow-up to 3c64ffaff4 #18415 #18188
Follow-up to 99500660af #18028 #18022

Closes #20920
2026-03-17 14:37:53 +01:00
Viktor Szakats
32500f12c4
HTTP3.md: minor improvements
- document building curl with CMake.

- mention all supported forks in the OpenSSL section. Delete dedicated
  quictls section.

- add TLS-backend pkgconfig dir to `PKG_CONFIG_PATH` for correctness.
  OpenSSL-based ones often work without this, by finding system
  `openssl.pc`. For GnuTLS and wolfSSL this has a lesser chance. Best to
  point to them explicitly. (configure may technically be able to do
  this automatically, but it isn't implemented.)

- use `--with-ngtcp2=<path>` again, where possible.
  GnuTLS is the exception, pending fix in #20910.
  Same for BoringSSL, but not documented in `HTTP3.md`.

- replace `<somewhereN>` with `/path/to/depname` for clarity.

- move `LDFLAGS` after `./configure` for curl, to match dep builds.

- move `--with-ngtcp2` next to the TLS-backend option.

Follow-up to 1e3c2bec7e #20926
Follow-up to 3c64ffaff4 #18415 #18188
Cherry-picked from #20920

Closes #20947
2026-03-17 12:28:58 +01:00
Viktor Szakats
3525ed9b2f
ECH.md: replace double-backticks with single ones
Also fix a indent/space nits.

Closes #20937
2026-03-16 14:24:25 +01:00
Viktor Szakats
e76968e20d
curl_get_line: fix potential infinite loop when filename is a directory
Fix potential inifinite loop reading file content with `Curl_get_line()`
when a filename passed via these options are pointing to a directory
entry (on non-Windows):

- `--alt-svc` / `CURLOPT_ALTSVC`
- `-b` / `--cookie` / `CURLOPT_COOKIEFILE`
- `--hsts` / `CURLOPT_HSTS`
- `--netrc-file` / `CURLOPT_NETRC_FILE`

Fix by checking for this condition and silently skipping such filename
without attempting to read content. Add test 1713 to verify.

Mention in cookie documentation as an accepted case, also show a verbose
message when a directory is detected. Extend test 46 to verify if such
failure lets the logic continue to the next cookie file.

Reported-and-based-on-patch-by: Richard Tollerton
Fixes #20823
Closes #20826 (originally-based-on)
Follow-up to 769ccb4d42 #19140

Closes #20873
2026-03-16 11:54:43 +01:00
Viktor Szakats
6d87eb2878
cmake: add CURL_GCC_ANALYZER option, enable in CI, fix/silence
Enable in one existing Linux, macOS and Windows job.

Cost:
- Linux: +1.3 minutes.
- macOS: +1.5 minutes.
- Windows: +2.5 minutes.

Fix or silence issues found:
- conncache: silence NULL deref warning.
  ```
  lib/conncache.c:564:18: warning: dereference of NULL '*data.multi' [CWE-476] [-Wanalyzer-null-dereference]
  ```
  Ref: ede6a8e087 #19378
- http2: check pointer for NULL.
  ```
  lib/http2.c:388:7: error: dereference of NULL ‘data’ [CWE-476] [-Wanalyzer-null-dereference]
  ```
- http2: silence potential NULL deref in `cf_h2_recv`.
  ```
  lib/http2.c: In function 'cf_h2_recv':
  lib/curl_trc.h:62:15: warning: dereference of NULL 'data' [CWE-476] [-Wanalyzer-null-dereference]
  ```
- openldap: silence deref before NULL check.
  Seen in GHA/Linux.
  ```
  lib/openldap.c: In function ‘oldap_state_mechs_resp’:
  lib/curl_trc.h:140:7: warning: check of ‘data’ for NULL after already dereferencing it [-Wanalyzer-deref-before-check]
  ```
- sendf: silence NULL deref false positive in `Curl_creader_set_fread`.
  It looks impossible to happen.
  ```
  lib/sendf.c:1133:7: warning: dereference of NULL 'r' [CWE-476] [-Wanalyzer-null-dereference]
  ```
- ws: silence deref before NULL check.
  ```
  lib/ws.c: In function 'ws_send_raw_blocking':
  lib/curl_trc.h:205:7: warning: check of 'data' for NULL after already dereferencing it [-Wanalyzer-deref-before-check]
  ```
- var: fix potential NULL deref
  ```
  src/var.c:216:29: warning: dereference of NULL 'envp' [CWE-476] [-Wanalyzer-null-dereference]
  ```
- cli_hx_upload.c: fix NULL check after dereference.
  ```
  tests/libtest/cli_hx_upload.c:170:7: warning: check of '*t.method' for NULL after already dereferencing it [-Wanalyzer-deref-before-check]
  ```
- unit1607, unit1609: fix theoretical NULL ptr dereference.
  ```
  tests/unit/unit1607.c:211:12: warning: dereference of NULL 'addr' [CWE-476] [-Wanalyzer-null-dereference]
  tests/unit/unit1609.c:193:12: warning: dereference of NULL 'addr' [CWE-476] [-Wanalyzer-null-dereference]
  ```
- globally disable checks triggering false positives only:
  ```
  docs/examples/externalsocket.c:135:8: warning: 'connect' on possibly invalid file descriptor 'sockfd' [-Wanalyzer-fd-use-without-check]
  lib/bufq.c:465:16: warning: infinite loop [CWE-835] [-Wanalyzer-infinite-loop] (gcc-15 Windows)
  lib/doh.c:1035:34: warning: stack-based buffer over-read [CWE-126] [-Wanalyzer-out-of-bounds] (gcc-15 macOS)
  lib/ftp.c:4022:20: warning: infinite loop [CWE-835] [-Wanalyzer-infinite-loop] (gcc-15 macOS)
  lib/http2.c:689:28: warning: buffer over-read [CWE-126] [-Wanalyzer-out-of-bounds] (gcc-15 macOS)
  lib/socketpair.c:195:5: warning: leak of file descriptor 'curl_dbg_socket(2, 1, 0, 192, "D:/a/curl/curl/lib/socketpair.c")' [CWE-775] [-Wanalyzer-fd-leak]
  src/tool_doswin.c:810:7: warning: leak of file descriptor '*tdata.socket_l' [CWE-775] [-Wanalyzer-fd-leak]
  src/tool_doswin.c:816:9: warning: leak of file descriptor '*tdata.socket_l' [CWE-775] [-Wanalyzer-fd-leak]
  src/tool_main.c:96:1: warning: leak of file descriptor 'fd[0]' [CWE-775] [-Wanalyzer-fd-leak]
  src/tool_main.c:96:1: warning: leak of file descriptor 'fd[1]' [CWE-775] [-Wanalyzer-fd-leak]
  src/tool_urlglob.c:48:17: warning: leak of 'malloc(8)' [CWE-401] [-Wanalyzer-malloc-leak]
  src/tool_writeout.c:870:3: warning: leak of FILE 'stream2' [CWE-775] [-Wanalyzer-file-leak]
  tests/libtest/lib518.c:90:1: warning: leak of FILE [CWE-775] [-Wanalyzer-file-leak]
  tests/libtest/lib537.c:87:1: warning: leak of FILE [CWE-775] [-Wanalyzer-file-leak]
  tests/server/tftpd.c:1147:10: warning: 'bind' on possibly invalid file descriptor 'sock' [-Wanalyzer-fd-use-without-check]
  tests/server/tftpd.c:1155:10: warning: 'bind' on possibly invalid file descriptor 'sock' [-Wanalyzer-fd-use-without-check]
  tests/server/tftpd.c:1259:10: warning: 'connect' on possibly invalid file descriptor '4294967295' [-Wanalyzer-fd-use-without-check]
  ```

Also:
- cmake: update clang-tidy typecheck comment.

Ref: https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html

Closes #20921
2026-03-16 11:49:34 +01:00
Viktor Szakats
04d90b5deb
configure: add option to trace pkg-config detection details
To aid debugging cases when dependency detection acts unexpectedly.
Sprung from spending days trying to figure out behavior of ngtcp2 crypto
modules and their dependencies.

You can enable by setting env `CURL_TRACE_PKG_CONFIG` to a non-empty
value. When enabled, details are logged for both successful and
unsuccessful detections. Logging of unsuccessful ones is automatically
enabled when `CURL_CI` env is set, which is the case for all CI jobs.

It works by asking for `--debug` output and grepping for lines that seem
useful for this purpose. Output is different for classic pkg-config and
pkgconf, and may depending on tool version. Also append `--print-errors`
output if any.

Examples (with pkgconf):

Fail, before:
```
checking for libngtcp2_crypto_boringssl options with pkg-config... no
configure: error: --with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.
```

Fail, after:
```
checking for libngtcp2_crypto_boringssl options with pkg-config... no
configure: pkg-config --exists libngtcp2_crypto_boringssl trace:
---- begin
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/ngtcp2-boringssl/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/ngtcp2-boringssl/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/nghttp3/build/lib/pkgconfig for openssl
trying path: /home/runner/ngtcp2-boringssl/build/lib/pkgconfig for openssl
trying path: /home/runner/nghttp2/build/lib/pkgconfig for openssl
==== error:
Package openssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `openssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'openssl', required by 'libngtcp2_crypto_boringssl', not found
---- end
configure: error: --with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.
```

Success, after:
```
checking for libngtcp2_crypto_boringssl options with pkg-config... found
configure: pkg-config --exists libngtcp2_crypto_boringssl trace:
---- begin
trying path: /home/runner/awslc/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/nghttp2/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/ngtcp2/build/lib/pkgconfig for libngtcp2_crypto_boringssl
trying path: /home/runner/awslc/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/nghttp3/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/nghttp2/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/ngtcp2/build/lib/pkgconfig for libngtcp2
trying path: /home/runner/awslc/build/lib/pkgconfig for openssl
trying path: /home/runner/awslc/build/lib/pkgconfig for libssl
trying path: /home/runner/awslc/build/lib/pkgconfig for libcrypto
---- end
```

More examples:
https://github.com/curl/curl/pull/20926#issuecomment-4064259935

If there is an externally enablable, built-in feature like this in
classic pkg-config or pkgconf, I could not find it.

Also:
- GHA/http3-linux: set `CURL_TRACE_PKG_CONFIG` to log detection details.
  H3 builds are prone to hard-to-debug dependency issues.

Ref: #20920
Follow-up to 3c64ffaff4 #18415 #18188
Follow-up to 99500660af #18028 #18022

Cherry-picked from #20926

Closes #20931
2026-03-16 11:31:01 +01:00
Martin Dürrmeier
594a9276bc
docs/lib: fix typos
Repated 'the the' and 'with with'

Closes #20933
2026-03-16 10:43:24 +01:00
Daniel Stenberg
510efa0007
HTTP3.md: drop outdated mentions of OpenSSL-QUIC
And make it a little clearer that the quiche backend is what is still
experimental.

Follow-up to 6aaac9dd38

Closes #20914
2026-03-12 23:20:47 +01:00
Viktor Szakats
56739855f3
examples: drop warning silencers no longer hit
Also:
- scope clang `-Wcast-function-type-strict` silencing, add missed `pop`.

Follow-up to d06b49d8b2 #18260

Closes #20896
2026-03-12 01:01:16 +01:00
Viktor Szakats
435eabeac8
badwords: rework exceptions, fix many of them
Also:
- support per-directory and per-upper-directory whitelist entries.
- convert badlist input grep tweak into the above format.
  (except for 'And' which had just a few hits.)
- fix many code exceptions, but do not enforce.
  (there also remain about 350 'will' uses in lib)
- fix badwords in example code, drop exceptions.
- badwords-all: convert to Perl.
  To make it usable from CMake.
- FAQ: reword to not use 'will'. Drop exception.

Closes #20886
2026-03-12 01:01:16 +01:00
Daniel Stenberg
1a4d392046
docs: minor wording tweaks
found when improving the badwords whitelisting logic
2026-03-11 08:46:01 +01:00
Daniel Stenberg
7a73be1f95
VERSIONS: add 8.19.0 2026-03-11 07:46:12 +01:00
Daniel Stenberg
3fd0d776d1
THANKS: add contributors from 8.19.0 release 2026-03-11 07:46:12 +01:00
Viktor Szakats
18e8c9f455
FAQ.md: point codeproject.com URL to archive.org copy
The original server closed down, linked page last seen on 2026-02-16.

Refs:
https://github.com/curl/curl/actions/runs/22051494128
https://web.archive.org/web/20250818150617/www.codeproject.com/info/Changes.aspx

Closes #20882
2026-03-11 01:48:21 +01:00
Felipe Mesquita
f25124338c
badwords: avoid 'simply'
It's mostly a filler word. I've read through each use of it in the code
base and did minor rephrasings when "simply" carried some meaning. The
overwhelming majority of cases, removing it improved the text
significantly. Inspired by #20793.

Closes #20822
2026-03-10 19:34:06 +01:00
Daniel Stenberg
ed7bf43a08
BUG-BOUNTY.md: minor rephrase to say there is no bug bounty
also add a brief mention to VULN-DISCLOSURE-POLICY.md

Closes #20878
2026-03-10 17:34:08 +01:00
Daniel Stenberg
8ec0e1e109
docs: fixup wording nits
Mostly sentences starting with bad words
2026-03-09 22:47:07 +01:00
Viktor Szakats
df5c6b6f54
docs: handle error in curl_global_init* examples
Also:
- call cleanup in `curl_global_init_mem()` example.

Closes #20866
2026-03-09 13:01:22 +01:00
Viktor Szakats
f6840572c4
THANKS-filter: update with a new entry
Closes #20861
2026-03-09 11:35:19 +01:00
Viktor Szakats
ccba492024
tidy-up: miscellaneous
Closes #20851
2026-03-09 11:35:19 +01:00
dbalsom
9a674ee6f7
docs: replace instances of the vague qualifier 'quite'
in documentation and comments

Closes #20841
2026-03-07 23:52:50 +01:00
Daniel Stenberg
13f48dfb52
docs: avoid starting sentences with However,
An unnecessary filling word

Closes #20834
2026-03-07 23:49:11 +01:00
Daniel Stenberg
f180818976
DEPRECATE.md: SMB and NTLM become build-time opt-in
Closes #20847
2026-03-07 14:56:08 +01:00
Daniel Stenberg
2f8fe96d6d
tests/FILEFORMAT.md: the <server> section is NOT mandatory
It can be left out if no servers are necessary.

Closes #20845
2026-03-07 14:21:46 +01:00
Daniel Stenberg
1495489c41
docs: drop basically
Another filler word

Closes #20835
2026-03-07 10:58:36 +01:00
Andrei Rybak
86ea3abd41
FAQ: syntax improvements
During conversion of `docs/FAQ` into Markdown, 'man ld' has incorrectly
kept one of its quotes when it was surrounded by backticks for inline
code formatting.  A space on the left of it was lost as well.

Fix the formatting in the new `docs/FAQ.md`.

Closes #20812
2026-03-06 23:01:47 +01:00
Daniel Stenberg
e49efce12f
synctime: fix use of uninitialized buffer on non-Windows
Follow-up to: b714c674f3

Spotted by Codex Security
Closes #20806
2026-03-06 22:49:03 +01:00
Viktor Szakats
38ee35353c
examples: improve OpenSSL certificate examples
- add/fix/synchronize error messages and comments.
- consistently return error from the callback on failure.
- fix potential leaks on OpenSSL API failures.
- fix to not pass the nul-terminator to BIO read.
- scope a variable.
- sync code/formatting between the two examples.

Closes #20807
2026-03-04 12:37:31 +01:00
Daniel Stenberg
7079f1d39c
usercertinmem: use the correct cert BIO
PEM_read_bio_PrivateKey() is called with the wrong BIO, so the private
key is not loaded.

Follow-up to 8494012196

Pointed out by Codex Security
Closes #20800
2026-03-03 23:16:08 +01:00
Daniel Stenberg
ad58e07b54
curl.h: remove CURLPROTO_MQTTS from the public header
- the value collided with the internal one used for WebSocket
- we add all new ones as internal bits
- bump to 64-bit internal type
- introduce new define for setting all protocols (CURLPROTO_64ALL)

Reported by Codex Security

Closes #20798
2026-03-03 23:14:34 +01:00
Daniel Stenberg
cc85cdf3c5
docs: avoid using the word 'magic'
It's never actually magic.

Closes #20796
2026-03-03 15:32:13 +01:00
Daniel Stenberg
b4dba346cd
stop using the word 'just'
Everywhere. In documentation and code comments.

It is almost never a good word and almost always a filler that should be
avoided.

Closes #20793
2026-03-03 15:30:22 +01:00
Daniel Stenberg
7fe5b933d8
TODO: drop the alt-svc fallback
Let's return to this subject if someone actually needs this for their
specific use case.

See #17152
Closes #20786
2026-03-02 09:18:07 +01:00
Daniel Stenberg
99bd5ed97b
HISTORY: mention that Rafael passed away much too early
Closes #20781
2026-03-01 22:42:13 +01:00
Viktor Szakats
1b35c9e1e3
cmake: rename testbins target to tt, restore internal option
To make it easy to type. The internal option is used in CI.

Follow-up to aae361242f #20708

Closes #20768
2026-03-01 00:24:47 +01:00
Florian Imdahl
006f561f6e
docs: some nitpicks
- replaced double spaces with single space where applicable
- replaced "favourite" with "favorite"
- added language identifiers to code blocks in markdown files
- added extra line after code blocks and after headings in markdown
  files

Cloes #20748
2026-02-27 23:05:37 +01:00