Commit Graph

15 Commits

Author SHA1 Message Date
Viktor Szakats
8d004781a5
build: drop the winbuild build system
In favor of CMake.

Closes #18040
2025-09-20 01:20:25 +02:00
Viktor Szakats
ec9cb618a0
spacecheck: warn for 3+ empty lines in a row, fix fallouts
Closes #18478
2025-09-04 20:37:51 +02:00
Viktor Szakats
cda243d053
projects: drop unused logic from generate.bat
Follow-up to 5a0644fae8 #8442

Closes #18397
2025-08-25 19:19:48 +02:00
Daniel Stenberg
e688fe18a9
spacecheck.pl: when detecting unicode, mention line number
Closes #18120
2025-07-31 23:29:17 +02:00
Daniel Stenberg
a3272c526c
GHA: make the spacecheck say line number for trailing space errors
As it can be quite confusing and frustrating without it.

Closes #17777
2025-06-29 16:43:41 +02:00
Viktor Szakats
828f998493
spacecheck.pl: drop more exceptions
- replace ß (scharfes S) with links.
- replace § (section sign) with links.
- replace 🙏 emoji with `🙏`.
 Supported by GitHub, Forgejo/Gitea and most likely GitLab.
- docs/libcurl/curl_mprintf.md: replace Unicode ± with `{+|-}`.
- docs/CIPHERS.md: URL encode Unicode in URLs.
- lib1560: use hex encoding in `räksmörgås.se`.
- unit1307: use hex encoding in `Lindmätarv`.
- drop LATIN SMALL LETTER A WITH ACUTE exception.
  No longer appears in tests.

This leaves the single character exception: `ö`
And file exceptions holding contributor names.

Follow-up to 9243ed59b3 #17329
Follow-up to 838dc53bb7 #17247

Closes #17335
2025-05-13 16:01:07 +02:00
Viktor Szakats
e270881a5d
lib1560: use hex notation, drop non-ASCII exception
Closes #17334
2025-05-13 11:04:43 +02:00
Daniel Stenberg
11cad7bf32
tests: provide all non-ascii data hex encoded
- make the scanner not whitelist anything for test cases making
  everything non-ascii forced to be hex encoded

- update all tests using non-ascii bytes to use %hex[] sequences

Closes #17331
2025-05-13 10:32:35 +02:00
Viktor Szakats
9243ed59b3
spacecheck.pl: verify tests/data/test* for non-ASCII chars
Exclude test data files (4 of them) based on existing feature tags:
`codeset-utf8` and `Unicode`.

Add the new keyword `non-ascii` to mark remaining exceptions (9 files).

Follow-up to 838dc53bb7 #17247

Closes #17329
2025-05-13 08:47:47 +02:00
Viktor Szakats
838dc53bb7
spacecheck.pl: check for non-ASCII chars, fix fallouts
Reported-by: James Fuller
Assisted-by: Dan Fandrich

Closes #17247
2025-05-04 17:26:11 +02:00
Viktor Szakats
3fcddc835c
scripts: fix perl indentation, whitespace, semicolons
Ref: #17116

Closes #17209
2025-04-29 19:35:55 +02:00
Viktor Szakats
e6ce46ea03
scripts: drop unused import, formatting
Ref: #16840
Closes #17077
2025-04-16 23:07:32 +02:00
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
Viktor Szakats
092c07d119
winbuild: MS-DOS batch tidy-ups
- prefer `.bat` extension over `.cmd` for MS-DOS batch, which also
  avoids confusion with OS/400 `.cmd` files.
- cleanup `echo` quotes, drop them consistently.
- delete empty output line from one of the error branches.
- prefer lowercase commands like the rest of MS-DOS batches.
- delete a contraction.
- drop backticks from error message.
- use `nmake.exe` consistently.
- use equal/not-equal operator style consistently.
- inline a single-line `if` branch.
- delete exceptions and rules dealing with Windows `.cmd` extension.

Closes #14084
2024-07-02 19:26:15 +02:00
Viktor Szakats
1ccdad64ef
CI: add whitespace checker
Fix issues detected.

Also:

- One of the `.vc` files used LF EOLs, while the other didn't.
  Make that one also use LF EOLs, as this is apparently supported by
  `nmake`.

- Drop `.dsw` and `.btn` types from `.gitattributes`.
  The repository doesn't use them.

- Sync section order with the rest of files in
  `tests/certs/EdelCurlRoot-ca.prm`.

- Indent/align `.prm` and `.pem` files.

- Delete dummy `[something]` section from `.prm` and `.pem` files.

Mental note:
MSVC `.sln` files seem to accept spaces for indentation and also support
LF line-endings. I cannot test this and I don't know what's more
convenient when updating them, so left them as-is, with specific
exclusions.

Closes #14031
2024-06-27 13:33:30 +02:00