curl-curl/.github/scripts
Viktor Szakats 44341e736a
runtests: generate certs dynamically, bump to EC-256, tidy up
Before this patch the curl repository and source tarball distribution
contained test certificates as binary blobs. Used by runtests.

Drop these certificates in favor of generating them dynamically as
part of the build process. Both via autotools and CMake.

As part of this, improve certificates, the generator script and process,
file layout, and fix any issue to make it work fast and smooth both in
CI and local builds.

Note, cert generator scripts require OpenSSL >=1.0.2
(or LibreSSL >=3.1.0). Generation requires POSIX shell, also with CMake.
Without a POSIX shell tests relying on TLS (and stunnel) will fail.

Details:

- build: generate certs as part of the test run process.
- build, tests: generate certs in the build directory.
- binarycheck: drop concept of known binary files with hashes.
- binarycheck: move binary check logic into spacecheck and drop this
  separate checker tool.
- build: fix to clean all cert files.
- autotools: fix to not run leaf cert generators in parallel. To avoid
  confusion when updating the revocation database and counter.
- scripts: drop `scripts` subdir, merge two scripts into one,
  auto-generate root cert, allow generating multiple leafs at once.
- scripts: switch to EC-256 keys (was: RSA-2048). For key size and perf.
- scripts: drop `-x` echo, text dumps, most other output. To avoid log
  noise and make it quicker in CI.
- scripts: make it non-RSA-specific.
- scripts: delete unused code.
- scripts: use POSIX shell shebang. Some envs don't have bash (Alpine).
- scripts: pass test pseudo-secrets via the command-line. To avoid:
  ```
  + openssl genrsa -out test-ca.key -passout fd:0 2048
  Invalid password argument, starting with "fd:"
  ```
- cmake: fix to launch generator scripts via the detected POSIX shell.
- cmake: fix `build-certs` rule to not depend on `SRPFILES`
  (`srp-verifier-*`).
- cmake: drop `EXCLUDE_FROM_ALL` for the cert subdir. It makes
  the Visual Studio generator miss to create the `clean-certs`,
  `build-certs` targets. No target depend on them, so they don't execute
  implicitly anyway. Fixes:
  ```
  MSBUILD : error MSB1009: Project file does not exist.
  Switch: clean-certs.vcxproj
  ```
- cmake: add `VERBATIM USES_TERMINAL` to `build-certs` target.
- GHA/linux: install openssl on Alpine, for the cert generator scripts.

Follow-up to 556f722fe3 #16593
Follow-up to fa461b4eff #14486

Closes #16824
2025-03-27 10:21:57 +01:00
..
badwords.pl docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
badwords.txt docs: use lowercase curl and libcurl 2025-01-02 17:15:54 +01:00
cleancmd.pl GHA: spellcheck curl symbols better 2025-02-27 13:15:21 +01:00
cmp-config.pl build: replace configure check with PP condition (Android <21) 2025-01-01 04:55:54 +01:00
cmp-pkg-config.sh GHA/configure-vs-cmake: check libcurl.pc/curl-config, fix issues 2024-09-21 12:08:35 +02:00
codespell-ignore.txt mbedTLS: implement CURLOPT_SSL_CIPHER_LIST option 2024-04-24 14:30:37 +02:00
distfiles.sh build: drop tool_hugehelp.c.cvs, tidy up macros, drop buildconf.bat 2025-01-26 14:22:49 +01:00
shellcheck.sh OS400: fix shellcheck warnings in scripts 2024-04-11 07:48:51 +00:00
spacecheck.pl runtests: generate certs dynamically, bump to EC-256, tidy up 2025-03-27 10:21:57 +01:00
spellcheck.curl GHA: spellcheck curl symbols better 2025-02-27 13:15:21 +01:00
spellcheck.words docs: rework RUSTLS install instructions 2025-03-27 08:47:43 +01:00
spellcheck.yaml docs: update CIPHERS.md 2024-08-12 23:35:56 +02:00
trimmarkdownheader.pl GHA: trim markdown headers before proselinting 2024-08-22 23:45:40 +02:00
verify-examples.pl docs: introduce "curldown" for libcurl man page format 2024-01-23 00:29:02 +01:00
verify-synopsis.pl verify-synopsis.pl: work with .md files 2024-06-27 12:45:06 +02:00
yamlcheck.sh GHA: add yamlcheck 2024-08-23 18:42:55 +02:00
yamlcheck.yaml GHA: add yamlcheck 2024-08-23 18:42:55 +02:00