Commit Graph

288 Commits

Author SHA1 Message Date
Viktor Szakats
ede2e812c2
tidy-up: whitespace
Closes #12484
2023-12-08 03:28:50 +00:00
Viktor Szakats
8b76591b6b
tidy-up: fix yamllint whitespace issues in labeler.yml
Follow-up to bda2129114 #12466

Reviewed-by: Dan Fandrich
Closes #12475
2023-12-06 20:33:04 +00:00
Viktor Szakats
bda2129114
tidy-up: fix yamllint whitespace issues
Closes #12466
2023-12-06 17:25:59 +00:00
Dan Fandrich
ee2e8bfa36 github/labeler: update a missed key in the v5 upgrade
Follow-up to ce03fe3ba
2023-12-06 00:59:53 -08:00
Dan Fandrich
ce03fe3bae github/labeler: switch from the beta to labeler v5
Some keys were renamed and the dot option was made default.

Closes #12458
2023-12-05 13:30:35 -08:00
Daniel Stenberg
cb521d1f9a
docs: make all examples in all libcurl man pages compile
Closes #12448
2023-12-04 10:50:42 +01:00
Daniel Stenberg
8dbcdc8c09
GHA/man-examples: verify libcurl man page examples 2023-12-04 10:50:42 +01:00
Daniel Stenberg
c5576d8d28
verify-examples.pl: verify that all man page examples compile clean 2023-12-04 10:50:42 +01:00
Graham Campbell
f6e83a4cb0
http3: bump ngtcp2 and nghttp3 versions
nghttp3 v1.1.0
ngtcp2 v1.1.0

In docs and CI

Closes #12446
2023-12-02 23:02:54 +01:00
Graham Campbell
7b507feff4
CI/quiche: use 3.1.4+quic consistently in CI workflows
Closes #12447
2023-12-02 23:00:36 +01:00
Daniel Stenberg
e7112a726b
CI: verify libcurl function SYNPOSIS sections
With the .github/scripits/verify-synopsis.pl script

Closes #12402
2023-11-24 20:35:50 +01:00
Daniel Stenberg
ad1dfc594f
docs/libcurl: SYNSOPSIS cleanup
- use the correct include file
- make sure they are declared as in the header file
- fix minor nroff syntax mistakes (missing .fi)

These are verified by verify-synopsis.pl, which extracts the SYNPOSIS
code and runs it through gcc.

Closes #12402
2023-11-24 20:35:38 +01:00
Daniel Stenberg
481755955b
CI: codespell
The list of words to ignore is in the file
.github/scripts/codespell-ignore.txt

Closes #12390
2023-11-23 13:07:26 +01:00
Viktor Szakats
006977859d
openssl: fix building with v3 no-deprecated + add CI test
- build quictls with `no-deprecated` in CI to have test coverage for
  this OpenSSL 3 configuration.

- don't call `OpenSSL_add_all_algorithms()`, `OpenSSL_add_all_digests()`.
  The caller code is meant for OpenSSL 3, while these two functions were
  only necessary before OpenSSL 1.1.0. They are missing from OpenSSL 3
  if built with option `no-deprecated`, causing build errors:
  ```
  vtls/openssl.c:4097:3: error: call to undeclared function 'OpenSSL_add_all_algorithms'; ISO C99 and later do not   support implicit function declarations [-Wimplicit-function-declaration]
  vtls/openssl.c:4098:3: error: call to undeclared function 'OpenSSL_add_all_digests'; ISO C99 and later do not   support implicit function declarations [-Wimplicit-function-declaration]
  ```
  Ref: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/48587418?fullLog=true#L7667

  Regression from b6e6d4ff8f #12030
  Bug: https://github.com/curl/curl/issues/12380#issuecomment-1822944669
  Reviewed-by: Alex Bozarth

- vquic/curl_ngtcp2: fix using `SSL_get_peer_certificate` with
  `no-deprecated` quictls 3 builds.
  Do it by moving an existing solution for this from `vtls/openssl.c`
  to `vtls/openssl.h` and adjusting caller code.
  ```
  vquic/curl_ngtcp2.c:1950:19: error: implicit declaration of function 'SSL_get_peer_certificate'; did you mean   'SSL_get1_peer_certificate'? [-Wimplicit-function-declaration]
  ```
  Ref: https://github.com/curl/curl/actions/runs/6960723097/job/18940818625#step:24:1178

- curl_ntlm_core: fix `-Wunused-parameter`, `-Wunused-variable` and
  `-Wunused-function` when trying to build curl with NTLM enabled but
  without the necessary TLS backend (with DES) support.

Closes #12384
2023-11-23 02:03:02 +00:00
Viktor Szakats
413a0fedd0
autotools: stop setting -std=gnu89 with --enable-warnings
Do not alter the C standard when building with `--enable-warnings` when
building with gcc.

On one hand this alters warning results compared to a default build.
On the other, it may produce different binaries, which is unexpected.

Also fix new warnings that appeared after removing `-std=gnu89`:

- include: fix public curl headers to use the correct printf mask for
  `CURL_FORMAT_CURL_OFF_T` and `CURL_FORMAT_CURL_OFF_TU` with mingw-w64
  and Visual Studio 2013 and newer. This fixes the printf mask warnings
  in examples and tests. E.g. [1]

- conncache: fix printf format string [2].

- http2: fix potential null pointer dereference [3].
  (seen on Slackware with gcc 11.)

- libssh: fix printf format string in SFTP code [4].
  Also make MSVC builds compatible with old CRT versions.

- libssh2: fix printf format string in SFTP code for MSVC.
  Applying the same fix as for libssh above.

- unit1395: fix `argument is null` and related issues [5]:
  - stop calling `strcmp()` with NULL to avoid undefined behaviour.
  - fix checking results if some of them were NULL.
  - do not pass NULL to printf `%s`.

- ci: keep a build job with `-std=gnu89` to continue testing for
  C89-compliance. We can apply this to other gcc jobs as needed.
  Ref: b23ce2cee7 (2022-09-23) #9542

[1] https://dev.azure.com/daniel0244/curl/_build/results?buildId=18581&view=logs&jobId=ccf9cc6d-2ef1-5cf2-2c09-30f0c14f923b
[2] https://github.com/curl/curl/actions/runs/6896854263/job/18763831142?pr=12346#step:6:67
[3] https://github.com/curl/curl/actions/runs/6896854253/job/18763839238?pr=12346#step:30:214
[4] https://github.com/curl/curl/actions/runs/6896854253/job/18763838007?pr=12346#step:29:895
[5] https://github.com/curl/curl/actions/runs/6896854253/job/18763836775?pr=12346#step:33:1689

Closes #12346
2023-11-20 22:28:17 +00:00
Junho Choi
a621418995
ci: test with latest quiche release (0.19.0)
Closes #12180
2023-11-11 23:44:54 +01:00
Stefan Eissing
5a3e277290
GHA: fix checkout of quictls repository to use correct branch name
Follow-up to c868b0e30f

Closes #12232
2023-10-30 16:58:45 +01:00
Daniel Stenberg
c868b0e30f
GHA: bump ngtcp2, nghttp3, nghttp2 and quictls versions
ngtcp2 1.0.1
nghttp3 1.0.0
nghttp2 1.58.0
quictls 3.1.4+quic

also sync HTTP3.md with these changes

Closes #12132
2023-10-29 17:39:23 +01:00
Stefan Eissing
8cb95850c0
GHA: move mod_h2 version in CI to v2.0.25
Closes #12157
2023-10-19 16:51:59 +02:00
Viktor Szakats
2e283c69e0
CI: add autotools, out-of-tree, debug build to distro check job
Add a job that builds curl from a generated source tarball sample, with
autotools, out-of-tree, in debug mode.

Ref: #12085
Closes #12088
2023-10-12 23:29:39 +00:00
Stefan Eissing
09e25b9d94 CI: remove slowed-network tests
- remove these tests as they are currently not reliable in our CI
  setups.

curl handles the test cases, but CI sometimes fails on these due to
additional conditions. Rather than mix them in, an additional CI job
will be added in the future that is specific to them.

Closes https://github.com/curl/curl/pull/12075
2023-10-10 16:29:01 -04:00
Jay Satiro
ba8c5c49a3 libcurl-env-dbg.3: move debug variables from libcurl-env.3
- Move documentation of libcurl environment variables used only in debug
  builds from libcurl-env into a separate document libcurl-env-dbg.

- Document more debug environment variables.

Previously undocumented or missing a description:

CURL_ALTSVC_HTTP, CURL_DBG_SOCK_WBLOCK, CURL_DBG_SOCK_WPARTIAL,
CURL_DBG_QUIC_WBLOCK, CURL_DEBUG, CURL_DEBUG_SIZE, CURL_GETHOSTNAME,
CURL_HSTS_HTTP, CURL_FORCETIME, CURL_SMALLREQSEND, CURL_SMALLSENDS,
CURL_TIME.

Closes https://github.com/curl/curl/pull/11811
2023-10-10 15:37:16 -04:00
Marc Hoersken
2e93c07c87
CI: move distcheck job from Azure Pipelines to GitHub Actions
This will allow for more trigger excludes within Azure Pipelines.

Also fixes seemingly broken check with scripts/installcheck.sh.
Ref: 190374c74e

Assisted-by: Philip Heiduck
Closes #9532
2023-10-08 19:36:16 +02:00
Viktor Szakats
9243ed6f4b
GHA/linux: mbedtls 3.5.0 + minor dep bumps
Closes #12057
2023-10-07 20:34:53 +00:00
Dan Fandrich
d1b0317f9b github/labeler: improve labeler matches 2023-10-04 12:21:17 -07:00
Viktor Szakats
1b9becb5d9
GHA: bump actions/checkout
Follow-up to 2e0fa50fc1 #11964
Follow-up to c39585d9b7 #12000

Closes #12023
2023-10-04 09:11:46 +00:00
Daniel Stenberg
2e0fa50fc1
GHA: add workflow to compare configure vs cmake outputs
Uses scripts/cmp-config.pl two compare two curl_config.h files,
presumbly generated with configure and cmake. It displays the
differences and filters out a lot of known lines we ignore.

The script also shows the matches that were *not* used. Possibly
subjects for removal.

Closes #11964
2023-10-03 23:33:06 +02:00
Viktor Szakats
772f0d8edf
cmake: fix HAVE_LDAP_SSL, HAVE_LDAP_URL_PARSE on non-Windows
- set `HAVE_LDAP_URL_PARSE` if `ldap_url_parse` function exists.
  Before this patch we set it based it on the presence of `stricmp`,
  which correctly enabled it on e.g. Windows, but was inaccurate for
  other platforms.

- always set `HAVE_LDAP_SSL` if an LDAP backend is detected and
  LDAPS is not explicitly disabled. This mimics autotools behaviour.
  Previously we set it only for Windows LDAP. After this fix, LDAPS is
  correctly enabled in default macOS builds.

- enable LDAP[S] for a CMake macOS CI job. Target OS X 10.9 (Mavericks)
  to avoid deprecation warnings for LDAP API.

- always detect `HAVE_LDAP_SSL_H`, even with LDAPS explicitly disabled.
  This doesn't make much sense, but let's do it to sync behaviour with
  autotools.

- fix benign typo in variable name.

Ref: #11964 (effort to sync cmake detections with autotools)

Closes #12006
2023-10-02 22:19:47 +00:00
Viktor Szakats
c39585d9b7
gha: bump actions to latest versions
- actions@checkout@v4 (from v3 and v2)

- fsfe/reuse-action@v2 (from v1)

Closes #12000
2023-10-01 12:16:23 +00:00
Dan Fandrich
5c006df36c github/labeler: remove workaround for labeler
This was added due to what seemed to be a bug regarding the sync-labels:
config option, but it looks like it wasn't necessary.

Follow-up to b2b0534e7
2023-09-29 08:58:52 -07:00
Viktor Szakats
781242ffa4
cmake: detect TLS-SRP in OpenSSL/wolfSSL/GnuTLS
With new option `CURL_DISABLE_SRP=ON` to force-disable it.
To match existing option and detection logic in autotools.

Also:
- fix detecting GnuTLS.
  We assume `nettle` as a GnuTLS dependency.
- add CMake GnuTLS CI job.
- bump AppVeyor CMake OpenSSL MSVC job to OpenSSL 1.1.1 (from 1.0.2)
  TLS-SRP fails to detect with 1.0.2 due to an OpenSSL header bug.
- fix compiler warning when building with GnuTLS and disabled TLS-SRP.
- fix comment typos, whitespace.

Ref: #11964

Closes #11967
2023-09-28 10:50:56 +00:00
Daniel Stenberg
367be426d9
GHA/linux: run singleuse to detect single-use global functions
Use --unit for configure --enable-debug builds

Closes #11932
2023-09-25 17:06:09 +02:00
Mark Gaiser
65b563a96a
curl: add support for the IPFS protocols:
- ipfs://<cid>
- ipns://<cid>

This allows you tu use ipfs in curl like:
curl ipfs://<cid>
and
curl ipns://<cid>

For more information consult the readme at:
https://curl.se/docs/ipfs.html

Closes #8805
2023-09-23 11:02:10 +02:00
Dan Fandrich
ddc180fdc9 github/labeler: improve the match patterns
This includes new rules for setting the appleOS and logging labels and
matches on some example files. Also, enable dot mode for wildcard
matches in the .github directory.
2023-09-21 14:37:27 -07:00
Dan Fandrich
b2b0534e76 github/labeler: give the sync-labels config item a default value
This shouldn't be necessary and is likely a bug with this beta version
of the labeller.

Also, fix the negative matches for the documentation label.

Follow-up to dd12b452a
Closes #11907
2023-09-21 01:23:41 -07:00
Dan Fandrich
32dcda98e7 github/labeler: fix up more the labeler config format
The new version didn't like the workaround we had for a bug in the
previous labeler version, and it should no longer be needed.

Follow-up to dd12b452a
Closes #11906
2023-09-21 01:10:44 -07:00
Dan Fandrich
23283dac5d github/labeler: fix indenting to try to appease labeller
Follow-up to dd12b452a
2023-09-21 00:05:02 -07:00
Dan Fandrich
dd12b452a8 github/labeler: switch to the 5 beta version
This version adds an important feature that will allow more PRs to be
labelled. Rather than being limited to labeling PRs with files that
match a single glob, it can now label them if multiple changed files
match any one of a number of globs.
2023-09-20 12:42:07 -07:00
Junho Choi
267e14f1ba quiche: fix build error with --with-ca-fallback
- Fix build error when curl is built with --with-quiche
  and --with-ca-fallback.

- Add --with-ca-fallback to the quiche CI job.

Fixes https://github.com/curl/curl/issues/11850
Closes https://github.com/curl/curl/pull/11847
2023-09-14 03:10:18 -04:00
Dan Fandrich
14108c1b80 CI: run pytest with the -v option
This lists of the test cases being run so it can be tracked over time.

Closes #11824
2023-09-11 09:20:40 -07:00
Daniel Stenberg
4600bd3993
cmdline-docs: use present tense, not future
+ some smaller cleanups

Closes #11821
2023-09-08 16:57:33 +02:00
Stefan Eissing
3b30cc1a0d
pytest: improvements
- set CURL_CI for pytest runs in CI environments
- exclude timing sensitive tests from CI runs
- for failed results, list only the log and stat of
  the failed transfer

- fix type in http.c comment

Closes #11812
2023-09-07 10:30:14 +02:00
Stefan Eissing
108e51835e
CI: move on to ngtcp2 v0.19.1
Closes #11809
2023-09-06 23:11:30 +02:00
Viktor Szakats
c63a4b6544
http3: adjust cast for ngtcp2 v0.19.0
ngtcp2 v0.19.0 made size of `ecn` member of `ngtcp2_pkt_info`
an `uint8_t` (was: `uint32_t`). Adjust our local cast accordingly.

Fixes:
```
./curl/lib/vquic/curl_ngtcp2.c:1912:12: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'uint8_t' (aka 'unsigned char') [-Wimplicit-int-conversion]
  pi.ecn = (uint32_t)ecn;
         ~ ^~~~~~~~~~~~~
```

Also bump ngtcp2, nghttp3 and nghttp2 to their latest versions in our
docs and CI.

Ref: 80447281bb
Ref: https://github.com/ngtcp2/ngtcp2/pull/877
Closes #11798
2023-09-05 15:25:37 +00:00
Dan Fandrich
22b1f7d032 CI: add a 32-bit i686 Linux build
This is done by cross-compiling under regular x86_64 Linux.  Since the
kernel offers backwards compatibility, the binaries can be tested as
normal.

Closes #11799
2023-09-04 17:11:44 -07:00
Stefan Eissing
331b89a319
http2: polish things around POST
- added test cases for various code paths
- fixed handling of blocked write when stream had
  been closed inbetween attempts
- re-enabled DEBUGASSERT on send with smaller data size

- in debug builds, environment variables can be set to simulate a slow
  network when sending data. cf-socket.c and vquic.c support
  * CURL_DBG_SOCK_WBLOCK: percentage of send() calls that should be
    answered with a EAGAIN. TCP/UNIX sockets.
    This is chosen randomly.
  * CURL_DBG_SOCK_WPARTIAL: percentage of data that shall be written
    to the network. TCP/UNIX sockets.
    Example: 80 means a send with 1000 bytes would only send 800
    This is applied to every send.
  * CURL_DBG_QUIC_WBLOCK: percentage of send() calls that should be
    answered with EAGAIN. QUIC only.
    This is chosen randomly.

Closes #11756
2023-09-04 19:48:49 +02:00
Dan Fandrich
78e0938fcc CI: adjust labeler match patterns for new & obsolete files 2023-09-01 15:08:39 -07:00
Stefan Eissing
280f90061a
CI/ngtcp2: clear wolfssl for when cache is ignored
Closes #11783
2023-09-01 23:48:47 +02:00
Stefan Eissing
289cd4073c
CI: ngtcp2-linux: use separate caches for tls libraries
allow ever changing master for wolfssl

Closes #11766
2023-09-01 13:35:00 +02:00
Stefan Eissing
1c9781475c replace master as wolfssl-version with recent commit 2023-09-01 11:43:55 +02:00