Commit Graph

233 Commits

Author SHA1 Message Date
Daniel Stenberg
6396c1f893
github/labeler: make HYPER.md set Hyper and not TLS 2023-08-11 08:59:26 +02:00
Jay Satiro
86b45f6e7e bug_report: require reporters to specify curl and os versions
- Change curl version and os sections from single-line input to
  multi-line textarea.

- Require curl version and os sections to be filled out before report
  can be submitted.

Closes https://github.com/curl/curl/pull/11636
2023-08-10 03:28:36 -04:00
Graham Campbell
8eda84bdc1
CI: use openssl 3.0.10+quic, nghttp3 0.14.0, ngtcp2 0.18.0
Closes #11585
2023-08-06 23:20:45 +02:00
Viktor Szakats
db70846e2e
tests: ensure libcurl.def contains all exports
Add `test1279` to verify that `libcurl.def` lists all exported API
functions found in libcurl headers.

Also:

- extend test suite XML `stdout` tag with the `loadfile` attribute.

- fix `tests/extern-scan.pl` and `test1135` to include websocket API.

- use all headers (sorted) in `test1135` instead of a manual list.

- add options `--sort`, `--heading=` to `tests/extern-scan.pl`.

- add `libcurl.def` to the auto-labeler GHA task.

Follow-up to 2ebc74c36a

Closes #11570
2023-08-03 11:07:47 +00:00
Samuel Chiang
20f4e94eeb
openssl: make aws-lc version support OCSP
And bump version in CI

Closes #11568
2023-08-02 16:23:45 +02:00
Viktor Szakats
ddb179586f
gha: bump libressl and mbedtls versions
Closes #11573
2023-08-02 10:39:01 +00:00
Daniel Stenberg
6b11d9d86b
CI/spellcheck: build curl.1 and spellcheck it
Added acceptable words

Closes #11562
2023-08-01 14:12:03 +02:00
Disyer
4f9c20d49f
wolfssl: support loading system CA certificates
Closes #11452
2023-07-31 08:27:50 +02:00
Daniel Stenberg
7c8bae0d9c
nss: remove support for this TLS library
Closes #11459
2023-07-29 23:44:28 +02:00
Viktor Szakats
1199308dbc
cmake: support building static and shared libcurl in one go
This patch adds the ability to build a static and shared libcurl library
in a single build session. It also adds an option to select which one to
use when building the curl executable.

New build options:
- `BUILD_STATIC_LIBS`. Default: `OFF`.
  Enabled automatically if `BUILD_SHARED_LIBS` is `OFF`.
- `BUILD_STATIC_CURL`. Default: `OFF`.
  Requires `BUILD_STATIC_LIBS` enabled.
  Enabled automatically if building static libcurl only.
- `STATIC_LIB_SUFFIX`. Default: empty.
- `IMPORT_LIB_SUFFIX`. Default: `_imp` if implib filename would collide
  with static lib name (typically with MSVC) in Windows builds.
  Otherwise empty.

Also:

- Stop setting the `CURL_STATICLIB` macro via `curl_config.h`, and pass
  it directly to the compiler. This also allows to delete a condition
  from `tests/server/CMakeLists.txt`.

- Complete a TODO by following the logic used in autotools (also for
  `LIBCURL_NO_SHARED`), and set `-DCURL_STATICLIB` in `Cflags:` of
  `libcurl.pc` for _static-only_ curl builds.

- Convert an existing CI test to build both shared and static libcurl.

Closes #11505
2023-07-29 00:40:01 +00:00
Stefan Eissing
40c63290e3
CI/awslc: add cache for build awslc library
Closes #11535
2023-07-28 23:13:13 +02:00
Stefan Eissing
b0f3e030c0
GHA/linux.yml: add caching
Closes #11532
2023-07-28 23:10:41 +02:00
Stefan Eissing
2284104c3f
CI: quiche updates
- remove quiche from standard `linux` workflow
- add mod_h2 caching to quiche workflow
- rename quiche to quiche-linux
- move version definitions into env section

Closes #11528
2023-07-27 17:47:09 +02:00
Stefan Eissing
a05cce74f9
http2: fix in h2 proxy tunnel: progress in ingress on sending
- depending on what is tunneled, the proxy may never get invoked for
  receiving data explicitly. Not progressing ingress may lead to stalls
  due to missed WINDOW_UPDATEs.

CI:
- add a chache for building mod_h2

Closes #11527
2023-07-27 17:00:38 +02:00
Stefan Eissing
3f518ce4b1
CI ngtcp2+quictls: use nghttpx cache as in quiche build 2023-07-27 16:59:37 +02:00
Stefan Eissing
bea86dad6e
GHA: adding quiche workflow
- adding separate quiche workflow to also build nghttpx server for testing

Closes #11517
2023-07-26 18:19:30 +02:00
Jacob Hoffman-Andrews
69c536b9c0
rustls: update rustls-ffi 0.10.0
This brings in version 0.21.0 of the upstream rustls implementation,
which notable includes support for IP address certificates.

Closes #10865
2023-07-22 23:40:44 +02:00
Jan Macku
3b3c41f933
bug_report: use issue forms instead of markdown template
Issue forms allow you to define web-like input forms using YAML
syntax. It allows you to guide the reporter to get the required
information.

Signed-off-by: Jan Macku <jamacku@redhat.com>
Closes #11474
2023-07-21 13:59:10 +02:00
Graham Campbell
cbe0b0e18b
CI: bump nghttp2 from 1.55.0 to 1.55.1
Closes #11442
2023-07-15 23:27:22 +02:00
Stefan Eissing
5c07439ba3
CI: brew fix for openssl in default path
If brew install/update links openssl into /usr/local, it will be found
before anything we add with `-isystem path` to CPP/LDLFAGS.  Get rid of
that by unlinking the keg.

Fixes #11413
Closes #11436
2023-07-13 15:15:44 +02:00
Tatsuhiro Tsujikawa
993b14900a
CI: Bump ngtcp2, nghttp3, and nghttp2
Closes #11428
2023-07-12 14:43:30 +02:00
Daniel Stenberg
9946410861
CI: use wolfSSL 5.6.3 in builds
No using master anymore

Closes #11424
2023-07-11 20:07:22 +02:00
Dan Fandrich
356208c16f CI: enable verbose test output on pytest
This shows individual pass/fail status on tests and makes this output
consistent with other jobs' pytest invocations.
2023-07-07 13:47:34 -07:00
Dan Fandrich
fb802b521a CI: enable parallel make in more builds
Most CI services provide at least two cores, so enable parallel make
jobs to take advantage of that for builds. Some dependencies aren't safe
to build in parallel so leave those as-is.  Also, rename a few
workflows to eliminate duplicate names and provide a better idea what
they're about.
2023-06-24 14:40:39 -07:00
Dan Fandrich
cfab581041 CI: don't install impacket if tests are not run
It just wastes time and bandwidth and isn't even used.
2023-06-24 14:40:39 -07:00
Daniel Stenberg
4337242345
libcurl-ws.3. WebSocket API overview
Closes #11314
2023-06-14 13:14:57 +02:00
Philip H
4397e41be0
CI: openssl-3.0.9+quic
Closes #11296
2023-06-12 16:24:52 +02:00
Daniel Stenberg
7630055a32
GHA: use nghttp2 1.54.0 for the ngtcp2 jobs 2023-06-09 20:50:31 +02:00
Philip H
32f103b0e9
GHA: ngtcp2: use 0.16.0 and nghttp3 0.12.0 2023-06-09 20:50:31 +02:00
Daniel Stenberg
259ee6defc
curl_pushheader_byname/bynum.3: document in their own man pages
These two functions were added in 7.44.0 when CURLMOPT_PUSHFUNCTION was
introduced but always lived a life in the shadows, embedded in the
CURLMOPT_PUSHFUNCTION man page. Until now.

It makes better sense and gives more visibility to document them in
their own stand-alone man pages.

Closes #11286
2023-06-09 14:25:47 +02:00
Viktor Szakats
3f8fc25720
cmake: add support for "unity" builds
Aka "jumbo" or "amalgamation" builds. It means to compile all sources
per target as a single C source. This is experimental.

You can enable it by passing `-DCMAKE_UNITY_BUILD=ON` to cmake.
It requires CMake 3.16 or newer.

It makes builds (much) faster, allows for better optimizations and tends
to promote less ambiguous code.

Also add a new AppVeyor CI job and convert an existing one to use
"unity" mode (one MSVC, one MinGW), and enable it for one macOS CI job.

Fix related issues:
- add missing include guard to `easy_lock.h`.
- rename static variables and functions (and a macro) with names reused
  across sources, or shadowed by local variables.
- add an `#undef` after use.
- add a missing `#undef` before use.
- move internal definitions from `ftp.h` to `ftp.c`.
- `curl_memory.h` fixes to make it work when included repeatedly.
- stop building/linking curlx bits twice for a static-mode curl tool.
  These caused doubly defined symbols in unity builds.
- silence missing extern declarations compiler warning for ` _CRT_glob`.
- fix extern declarations for `tool_freq` and `tool_isVistaOrGreater`.
- fix colliding static symbols in debug mode: `debugtime()` and
  `statename`.
- rename `ssl_backend_data` structure to unique names for each
  TLS-backend, along with the `ssl_connect_data` struct member
  referencing them. This required adding casts for each access.
- add workaround for missing `[P]UNICODE_STRING` types in certain Windows
  builds when compiling `lib/ldap.c`. To support "unity" builds, we had
  to enable `SCHANNEL_USE_BLACKLISTS` for Schannel (a Windows
  `schannel.h` option) _globally_. This caused an indirect inclusion of
  Windows `schannel.h` from `ldap.c` via `winldap.h` to have it enabled
  as well. This requires `[P]UNICODE_STRING` types, which is apperantly
  not defined automatically (as seen with both MSVS and mingw-w64).
  This patch includes `<subauth.h>` to fix it.
  Ref: https://github.com/curl/curl/runs/13987772013
  Ref: https://dev.azure.com/daniel0244/curl/_build/results?buildId=15827&view=logs&jobId=2c9f582d-e278-56b6-4354-f38a4d851906&j=2c9f582d-e278-56b6-4354-f38a4d851906&t=90509b00-34fa-5a81-35d7-5ed9569d331c
- tweak unity builds to compile `lib/memdebug.c` separately in memory
  trace builds to avoid PP confusion.
- force-disable unity for test programs.
- do not compile and link libcurl sources to libtests _twice_ when libcurl
  is built in static mode.

KNOWN ISSUES:
- running tests with unity builds may fail in cases.
- some build configurations/env may not compile in unity mode. E.g.:
  https://ci.appveyor.com/project/curlorg/curl/builds/47230972/job/51wfesgnfuauwl8q#L250

Ref: https://github.com/libssh2/libssh2/issues/1034
Ref: https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html
Ref: https://en.wikipedia.org/wiki/Unity_build

Closes #11095
2023-06-07 13:06:08 +00:00
Daniel Stenberg
7a48ebc08f
workflows/macos: add a job using gcc + debug + secure transport 2023-05-21 14:02:31 +02:00
Daniel Stenberg
10998e3b89
ngtcp2: use 0.15.0
- nghttp3 0.11.0
- nghttp2 1.53.0

Adapt to new API calls

Closes #11031
2023-05-12 17:25:38 +02:00
Diogo Teles Sant'Anna
31303c34e9 CI: Set minimal permissions on workflow ngtcp2-quictls.yml
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>

Closes #11055
2023-04-28 11:50:30 -07:00
Viktor Szakats
b1ad4f1d5f
ci: -Wno-vla no longer necessary
We handle this issue in the source now.

Follow-up to b725fe1944

Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #11048
2023-04-28 11:02:33 +00:00
Dan Fandrich
9f241a85dc CI: switch the awslc builds to build out-of-tree
This is a common configuration that should be tested to avoid
regressions. The awsls cmake build was already out-of-tree so the
automake build now joins it.

Ref: #11006
2023-04-27 00:15:41 -07:00
Stefan Eissing
acd82c8bfd
tests/http: more tests with specific clients
- Makefile support for building test specific clients in tests/http/clients
- auto-make of clients when invoking pytest
- added test_09_02 for server PUSH_PROMISEs using clients/h2-serverpush
- added test_02_21 for lib based downloads and pausing/unpausing transfers

curl url parser:
- added internal method `curl_url_set_authority()` for setting the
  authority part of a url (used for PUSH_PROMISE)

http2:
- made logging of PUSH_PROMISE handling nicer

Placing python test requirements in requirements.txt files
- separate files to base test suite and http tests since use
  and module lists differ
- using the files in the gh workflows

websocket test cases, fixes for we and bufq
- bufq: account for spare chunks in space calculation
- bufq: reset chunks that are skipped empty
- ws: correctly encode frames with 126 bytes payload
- ws: update frame meta information on first call of collect
  callback that fills user buffer
- test client ws-data: some test/reporting improvements

Closes #11006
2023-04-26 23:24:46 +02:00
Dan Fandrich
fe61f015e5 CI: don't run CI jobs if only another CI was changed
A few paths were missed in the last commit, as well as a job added since
then.

Followup-to 395b9175
2023-04-24 20:46:09 -07:00
Dan Fandrich
6d0d8b90e2 CI: adjust labeler match patterns 2023-04-24 20:46:09 -07:00
Stefan Eissing
fc2f1e547a
http2: support HTTP/2 to forward proxies, non-tunneling
- with `--proxy-http2` allow h2 ALPN negotiation to
  forward proxies
- applies to http: requests against a https: proxy only,
  as https: requests will auto-tunnel
- adding a HTTP/1 request parser in http1.c
- removed h2h3.c
- using new request parser in nghttp2 and all h3 backends
- adding test 2603 for request parser
- adding h2 proxy test cases to test_10_*

scorecard.py: request scoring accidentally always run curl
with '-v'. Removed that, expect double numbers.

labeller: added http1.* and h2-proxy sources to detection

Closes #10967
2023-04-17 17:27:49 +02:00
Philip H
314dc407d6
GHA: suppress git clone output
Follow-up: 8203aa6ed4

Closes #10949
2023-04-13 17:22:13 +02:00
Philip H
8203aa6ed4
GHA: suppress git clone output
Closes #10939
2023-04-13 08:56:48 +02:00
Dan Fandrich
aafb79de2a CI: retry failed downloads of aws-lc
Don't fail the build in case of a temporary server problem.
2023-04-10 12:19:11 -07:00
Dan Fandrich
e7a021e135 tests: use %LOGDIR to refer to the log directory
This will allow it be set dynamically.

Ref: #10818
2023-03-30 09:53:57 -07:00
Stefan Eissing
6d6404aca0
docs: add documentation for bufq
Closes #10869
2023-03-30 17:13:53 +02:00
Philip H
67546aea90
GHA: update ngtcp2-*.yml to v0.10.0
Closes #10612
2023-03-30 15:43:07 +02:00
Daniel Stenberg
843a72b456
spellcheck.words: unify the AWS-LC spelling
Follow-up to 34ef4fab22

Closes #10867
2023-03-30 11:40:00 +02:00
Jim King
34ef4fab22
openssl: interop with AWS-LC
* Configure changes to detect AWS-LC
* CMakeLists.txt changes to detect AWS-LC
* Compile-time branches needed to support AWS-LC
* Correctly set OSSL_VERSION and report AWS-LC release number
* GitHub Actions script to build with autoconf and cmake against AWS-LC

AWS-LC is a BoringSSL/OpenSSL derivative
For more information see https://github.com/awslabs/aws-lc/

Closes #10320
2023-03-30 10:56:14 +02:00
Philip H
3f3dfb4d0c
wolfssl.yml: bump to version 5.6.0
Closes #10843
2023-03-28 11:30:16 +02:00
Dan Fandrich
43e71fe0fc CI: skip some more builds when possible
When a commit only contains tests, documentation, or cmake files, skip
those builds that aren't affected by those.

The file filters available on the CI services don't seem to allow
skipping individual jobs, only the entire workflow, so we can't get any
more fine-grained than this.
2023-03-24 19:59:50 -07:00