Commit Graph

34076 Commits

Author SHA1 Message Date
Daniel Stenberg
b2a845c8ad
RELEASE-NOTES: synced 2025-01-10 08:47:27 +01:00
Asger Hautop Drewsen
cacceef5a6
completion.pl: add completion for paths after @ for fish
Closes #15928
2025-01-10 08:37:55 +01:00
sftcd
1ae47b91a3
ECH: update APIs to those agreed with OpenSSL maintainers
Closes #15945
2025-01-10 08:36:25 +01:00
Daniel Stenberg
386f570df6
cookie: cap expire times to 400 days
The pending cookie RFC update (currently known as 6265bis draft-19) says

  Let cookie-age-limit be the maximum age of the cookie (which name of
  Max-Age and an attribute-value of expiry-time. SHOULD be 400 days or
  less.

This change makes received cookies over the wire get capped to 400 days.

It does not cap the expiry date of cookies loaded from file.

It does this by rounding the expire time to a even minute. This, to
allow the test suite to do the same and have a chance to get the same
number for stable testing without requiring a debug build.

The test script generates TWO numbers in the output file for each
%days[] used in the input test file, and the function that subsequently
compares and verifies output is fine with *either* of the two numbers.

This is done so that if the test case is generated the second
immediately before curl runs, that updated expiry number is also deemed
okay. It still checks for an exact match of either number.

Closes #15937
2025-01-10 08:20:03 +01:00
Stefan Eissing
533dc84e6e
GnuTLS: fix 'time_appconnect' for early data
When using early data with GnuTLS, the the timer `appconnect`
had the value from the "pretended" connect, not when the actual
TLS handshake was done.

Closes #15954
2025-01-09 17:27:10 +01:00
Daniel Stenberg
a19b759dea
vtls_scache: fix possible null ptr deref
Pointed out by CodeSonar. It is probably not reachable, but might as
well just add a precaution.

Closes #15950
2025-01-09 17:25:48 +01:00
Daniel Stenberg
779908df43
tool_ssls: fix "ignored return value" warning
Pointed out by CodeSonar. While harmless, we might as well address it.

Closes #15949
2025-01-09 17:24:47 +01:00
Daniel Stenberg
d0607b27b0
vtls_scache: avoid a "Redundant Condition"
Pointed out by CodeSonar. "ssl_config" can in fact not be NULL here.
Made it an assert instead.

Closes #15948
2025-01-09 17:23:26 +01:00
Viktor Szakats
ca18198dd4
msvc: drop checks for _MSC_VER >= 900
It's Visual C++, 32-bit, version 2.0, released in 1993. Used to verify
if `_INTEGRAL_MAX_BITS` is available.

After this patch we assume `_INTEGRAL_MAX_BITS` is always available in
MSVC.

Closes #15952
2025-01-09 14:52:45 +01:00
Viktor Szakats
8363dd51bc
msvc: drop checks for ancient versions
- drop version guard for `__inline`.
  Supported since `_MSC_VER` 1000.
  Visual C++, 32-bit, version 4.0 (1996)

- drop version guard for `__declspec(noreturn)` and `__forceinline`.
  Supported since `_MSC_VER` 1200.
  Visual C++, 32-bit, version 6.0 (1998)

For ancient versions, it's possible to override the default behaviour
by setting these macros via `CPPFLAGS`: `CURL_NORETURN`, `CURL_INLINE`,
`CURL_FORCEINLINE`

Closes #15946
2025-01-09 11:58:14 +01:00
Tal Regev
a394b78446
GHA/windows: add wolfSSL to MSVC MultiSSL job
Follow-up to 98932f3487 #15765

Closes #15438
2025-01-09 11:02:08 +01:00
Daniel Stenberg
d1c1c96e0a
curl_trc: repair build with verbose strings disabled
- moved the dummy functions into the C file, made them non-static
- added a Curl_trc_ssls dummy

Closes #15951
2025-01-09 09:23:03 +01:00
Viktor Szakats
703e053110
cmake: update a comment [ci skip]
Follow-up to 421e592db2 #15832
2025-01-09 04:11:38 +01:00
Viktor Szakats
a19b79ce87
tidy-up: delete stray references from autotools, docs
- autotools: delete stray `VC14_LIB*` references.
- autotools: delete (now) empty `CLEANFILES`.
- autotools: delete no longer used lib/src .inc includes in root makefile.
- autotools: delete stray `cygwinbin` target.
- autotools: delete stray `pkgadd` target (Solaris).
- lib, src: delete stray files from `.gitignore`.
- INSTALL.md: delete reference to non-existing `src/config-win32.h`.
- lib/config-win32ce.h: whitespace.
- lib/config-win32ce.h: sync comments with `config-win32.h`.

Closes #15944
2025-01-09 02:12:53 +01:00
Viktor Szakats
8a266ac488
build: delete -Wsign-conversion related FIXMEs
We decided last year not to pursue avoiding this warning, because it
adds noise and friction, while in most cases not revealing actual code
issues. We fixed the interesting portion of them throughout mid-2024.

Conclude this effort by deleting related FIXMEs and temporary comments.

Follow-up to 3829759bd0 #12489
Closes #15939
2025-01-09 02:12:52 +01:00
Daniel Stenberg
115ea7633e
DEPRECATE: remove msh3 in six months
The msh3 backed for QUIC and HTTP/3 was introduced in April 2022 but has
never been made to work properly. It has seen no visible traction or
developer activity from the msh3 main author (or anyone else seemingly
interested) in two years. As a non-functional backend, it only adds
friction and "weight" to the development and maintenance.

Meanwhile, we have a fully working backend in the ngtcp2 one and we have
two fully working backends in OpenSSL-QUIC and quiche well on their way
of ending their experimental status in a future.

We remove msh3 support from the curl source tree in July 2025.

Closes #15931
2025-01-08 23:57:36 +01:00
Neil Horman
957eb240ed
osslq: use SSL_poll to determine writeability of QUIC streams
This discussion:
https://github.com/openssl/openssl/discussions/23339#discussion-6094341

Specifically item number 2 (Send Blocking) was raised by the curl team,
noting that SSL_want_write returning false was not a good indicator of
when a stream is writeable. The suggestion in that discussion was to use
SSL_poll with an SSL_POLL_EVENT_W flag instead, as that is a proper
indication of when an SSL_object will allow writing without blocking.

While ssl_want_write updates its state based on the last error
encountered (implying a need to retry an operation to update the
last_error state again), SSL_poll checks stream buffer status during the
call, giving it more up to date information on request. This is the
method used by our guide demos (quic-hq-interop specifically), and it
works well.

This change has been run through the curl test suite, and shown to pass
all tests. However, given the initial problem description I'm not sure
if there is a test case that explicitly checks for blocking and
unblocking of streams. As such some additional testing may be warranted.

Closes #15909
2025-01-08 23:52:49 +01:00
Daniel Stenberg
616b66e68f
scripts/delta: add number of days since first httpget release 2025-01-08 23:48:48 +01:00
Stefan Eissing
4e15605896
HTTP/2: strip TE request header
The TE request header field is invalid in HTTP/2. Since clients may not
know in advance if a connection negotiates HTTP/2, automatically strip
such a header when h2 is in play.

Add test_01_10 to verify.

Reported-by: Jiri Stary
Fixes #15941
Closes #15943
2025-01-08 23:44:51 +01:00
Stefan Eissing
515a21f350
vtls: feature ssls-export for SSL session im-/export
Adds the experimental feature `ssls-export` to libcurl and curl for
importing and exporting SSL sessions from/to a file.

* add functions to libcurl API
* add command line option `--ssl-sessions <filename>` to curl
* add documenation
* add support in configure
* add support in cmake
+ add pytest case

Closes #15924
2025-01-08 23:32:07 +01:00
Viktor Szakats
8a1ee2b47d
appveyor: tidy up shell code
Closes #15940
2025-01-08 18:16:50 +01:00
Viktor Szakats
d34aeecb08
appveyor: bump VS2008 jobs to VS2010
VS2008 has been partly broken for a while with its shared-debug builds
crashing on startup. Its compiler output (UTF-16 HTML) was also barely
readable even after conversion. It's also the only platform in CI
missing `stdint.h`.

This patch migrates a VS2008 job to VS2010 and drops another that
already had a VS2010 equivalent.

We recommend switching to VS2010 or newer when using MSVC to build curl.

Ref: #15907
Closes #15934
2025-01-08 12:33:31 +01:00
Viktor Szakats
38ff7ba501
appveyor: always use cmake -A option to select x64
The `Win64` generator suffix alternative was required by old CMake
versions (<3.1) only:
https://cmake.org/cmake/help/v3.22/generator/Visual%20Studio%2010%202010.html

Closes #15935
2025-01-08 00:33:02 +01:00
Viktor Szakats
cba0d3abcb
appveyor: reorder builds to get useful results earlier
Also to align with existing VS2010. Keeping the VS2008 job first to give
a quick sniff test for MSVC builds.

Follow-up to 08ff33e483 #15923
Follow-up to 50f6a6b1d4 #15926

Closes #15932
2025-01-07 20:14:03 +01:00
Viktor Szakats
0cacdd6dd1
GHA/windows: drop MSH3 job (broken after 0.7.0 bump)
Starting GHA runner image 20250105.1.0.

As seen on Linux with 0.7.0:
```
/home/runner/msh3/include/msh3.h:377:18: error: width of ‘RESERVED’ exceeds its type
  377 |             bool RESERVED                 : 5;
      |                  ^~~~~~~~
/home/runner/msh3/include/msh3.h:490:18: error: width of ‘RESERVED’ exceeds its type
  490 |             bool RESERVED            : 7;
      |                  ^~~~~~~~
```
https://github.com/curl/curl/actions/runs/12655717818/job/35266716846#step:35:195

Bug: https://github.com/curl/curl/pull/15924#issuecomment-2575106711
Bug: https://github.com/curl/curl/pull/15930#issuecomment-2575842486

Closes #15927
2025-01-07 18:27:32 +01:00
Viktor Szakats
24ef9de9f4
content_encoding: namespace GZIP flag constants
To avoid collision with a 3rd-party `RESERVED` symbols.

This symbol is used in the public header of MSH3 0.7.0.

Closes #15929
2025-01-07 17:54:19 +01:00
Daniel Stenberg
0cc458686c
cookie: small variable type cleanups
- bump cookie counter and "creation time" to use 'unsigned int'
- use BIT() for single-bit struct field
- make invalid_octets() return bool properly

Closes #15921
2025-01-07 16:47:18 +01:00
Viktor Szakats
f6566f332f
cmake: pre-fill HAVE_STDINT_H on Windows
Closes #15925
2025-01-07 15:37:36 +01:00
Viktor Szakats
554d4aee4d
appveyor: fixup job name
Follow-up to 50f6a6b1d4 #15926
2025-01-07 15:02:22 +01:00
Viktor Szakats
50f6a6b1d4
msvc: add VS2012 CI job, fix compiler warnings in LDAP and tests
Follow-up to 8cfc936f5c #10674
Follow-up to d620ec6791 #14700

Closes #15926
2025-01-07 14:51:48 +01:00
Viktor Szakats
08ff33e483
msvc: fix building with HAVE_INET_NTOP and MSVC <=1900
MSVC 1900 and older is missing a `const` specifier in the `inet_ntop()`
declaration for the second argument. A workaround was in place for it
in cmake, but it didn't cover all necessary versions.

Replace the workaround with a different one, move it to `lib/inet_ntop.c`
and extend to all necessary MSVC versions.

Also add CI jobs for the older MSVC versions: 2013, 2015, 2017.

Closes #15923
2025-01-07 14:07:19 +01:00
renovate[bot]
4e6de2f43f
GHA/linux: update awslabs/aws-lc to v1.42.0
Closes #15919
2025-01-06 23:35:03 +01:00
dependabot[bot]
d2dee6bd0d
GHA: bump cygwin/cygwin-install-action from 4 to 5
Bumps [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) from 4 to 5.
- [Release notes](https://github.com/cygwin/cygwin-install-action/releases)
- [Commits](006ad0b094...f61179d722)

---
updated-dependencies:
- dependency-name: cygwin/cygwin-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Closes #15918
2025-01-06 23:11:17 +01:00
Stefan Eissing
bd3c027ac9
conncache: count shutdowns against host and max limits
Count connections to a host against a possibly configured destination
limit. Trigger multi `connchange` when a connection has been shutdown,
so pending transfers can try to get a connection once again.

Reported-by: baranyaib90 on github
Fixes #15857
Closes #15879
2025-01-06 23:10:23 +01:00
Daniel Stenberg
508861eb80
RELEASE-NOTES: synced 2025-01-06 14:11:15 +01:00
Patrick Monnerat
1b3f00f794
mime: explicitly rewind subparts at attachment time.
Subparts may have been previously used as a top-level mime structure and
thus not rewound.

New test 695 checks the proper functioning in these particular conditions.

Reported-by: Qriist on github
Fixes #15842
Closes #15911
2025-01-06 14:03:42 +01:00
Yedaya Katsman
e602f7f119
docs/examples/checksrc: don't allow snprintf specifically
This isn't needed anymore after https://github.com/curl/curl/pull/15835,
since banned functions are just allowed in general in
`docs/examples/.checksrc`, and emits a warning when running make
checksrc:

`invalid warning specified in .checksrc: "SNPRINTF"`

Closes #15916
2025-01-06 13:49:21 +01:00
Viktor Szakats
a3a131b2a6
autotools: silence gcc warnings in libtool code
```
./.libs/lt-upload-pausing.c: In function 'lt_fatal':
./.libs/lt-upload-pausing.c:593:1: warning: function might be candidate for attribute 'noreturn' [-Wsuggest-attribute=noreturn]
  593 | lt_fatal (const char *file, int line, const char *message, ...)
      | ^~~~~~~~
```
https://github.com/curl/curl/actions/runs/12611924141/job/35148104431?pr=15911#step:11:264

Ref: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsuggest-attribute_003d

Closes #15915
2025-01-05 17:15:05 +01:00
Daniel Stenberg
893e57e84c
INFRASTRUCTURE.md: project infra
Closes #15906
2025-01-05 11:25:06 +01:00
Viktor Szakats
699ac9430c
cmake: publish/check supported protocols/features via CURLConfig.cmake
Via these variables, as lists:
- `CURL_SUPPORTED_PROTOCOLS`
- `CURL_SUPPORTED_FEATURES`

As individual flags:
- `CURL_SUPPORTS_<protocol/feature>` = `TRUE`

Also:
- set `CURL_VERSION_STRING` which was missing when using
  `find_package(CURL CONFIG)` or
  `find_package(CURL NO_MODULE)`.
- set `CURL_<prototol/feature>_FOUND` for compatibility.
- show full list of missing but required `COMPONENTS`.

Assisted-by: Derek Huang
Fixes #15854
Closes #15858
2025-01-04 10:29:00 +01:00
Daniel Stenberg
f62be9cfb6
checkdocs: trim links off docs/ markdowns before spellcheck
So that we can use words in links without having them spellchecked.

Closes #15910
2025-01-03 18:38:04 +01:00
Daniel Stenberg
cc16211a30
cleancmd.pl: strip out backticked words
To make sure they are not spellchecked. Also, leaving two backticks is
not good because they cause the spellchecker to misinterpret the
markdown file so they have to be removed as well.
2025-01-03 18:36:50 +01:00
Daniel Stenberg
0e120c5b92
netrc: 'default' with no credentials is not a match
Test 486 verifies.

Reported-by: Yihang Zhou

Closes #15908
2025-01-03 18:21:10 +01:00
Daniel Stenberg
abf8062449
CURLOPT_SEEKFUNCTION.md: used for FTP, HTTP and SFTP (only)
The same goes for *SEEKDATA.

Closes #15903
2025-01-02 22:31:11 +01:00
Viktor Szakats
852692b24f
GHA/http3-linux: fix cache rebuild conditions, switch to wolfSSL stable
ngtcp2 depends on crypto backends. nghttp2 depends on ngtcp2 and nghttp3
(for nghttpx server used in pytests).

Before this patch, ngtcp2, nghttp2 weren't rebuilt when their
dependencies changes. This worked fine until wolfSSL bumped its
soversion and caused CI to fail because ngtcp2 was not rebuilt and was
still referring to the old soname that was no longer offered by the
wolfSSL package.

Make sure to rebuild ngtcp2/nghttp2 when any of their dependencies bump.
To avoid rebuilding everything on every wolfSSL commit, switch to use
wolfSSL stable versions.

Bug: https://github.com/curl/curl/pull/15882#issuecomment-2566821417
Closes #15885
2025-01-02 21:04:02 +01:00
prpr19xx on github
d984209e59
smb: fix compiler warning
An old version of GCC (4.5.2 on a mipsel) moans about the constant being
too big to fit in a long.

Closes #15902
2025-01-02 18:01:17 +01:00
Daniel Stenberg
3eb57d6ba7
docs: use lowercase curl and libcurl
Adjusted badwords to find them.

Plus: make badwords run on all markdown files in the repo and update
markdowns previously unchecked

Closes #15898
2025-01-02 17:15:54 +01:00
Daniel Stenberg
e694c8284a
docs/libcurl/opts: clarify the return values
Expand a little.

- mention the type name of the return code
- avoid stating which exact return codes that might be returned, as that
  varies over time, builds and conditions
- avoid stating some always return OK
- refer to the manpage documenting all the return codes

Closes #15900
2025-01-02 17:13:33 +01:00
Daniel Stenberg
e256d9df6d
docs/cmdline-opts/_ENVIRONMENT.md: minor language fix
Closes #15897
2025-01-02 17:02:26 +01:00
Daniel Stenberg
4501b7e28d
docs/libcurl: return value overhall
Unified, extended, clarified the return values for numerous functions

Closes #15899
2025-01-02 16:58:05 +01:00