Commit Graph
9 Commits
Author SHA1 Message Date
Dirk Wetter 06f364f25b Make ca_hashes up-to-date test platform-independent
The test compared the regenerated etc/ca_hashes.txt byte-for-byte
against the committed file, but two aspects are not stable across
platforms:

- The name column comes from 'openssl x509 -subject', which formats
  differently between LibreSSL (macOS) and OpenSSL (Linux).
- The line order comes from 'sort', whose collation differs between
  BSD libc and glibc even under an identically-named locale.

Only the SPKI hash (field 1) is deterministic, and it is the sole
column testssl.sh consumes. So:

- The test now compares the set of SPKI hashes (field 1) between the
  committed and regenerated files, order-independently, using
  'LC_ALL=C sort -u' for a stable, platform-independent collation.
- create_ca_hashes.sh pins the name format ('-nameopt compat') and
  sort collation ('LC_ALL=C') so the generated file is stable.

Verified on macOS (LibreSSL) and Ubuntu 24.04 (OpenSSL).
2026-10-17 17:06:55 +02:00
Dirk Wetter 0ed8d49692 Make t/05_ca_hashes_up_to_date.t work 2026-10-16 19:32:50 +02:00
Dirk 1880a06110 Enable warnings 2026-09-01 15:27:44 +02:00
Dirk Wetter 17acd2a256 Better phrasing 2025-05-08 14:30:13 +02:00
Dirk ae77349f3a see previous commit 2024-10-14 17:11:55 +02:00
Peter Dave Hello cbae32e5a4 Add missing vim modeline config in sh & perl files, cc #1901 2021-06-01 14:40:24 +08:00
Dirk Wetter 8d864aba2e Output adjustments closer to a more common format 2020-01-14 18:44:11 +01:00
Dirk Wetter 58498583c9 Modified LFs 2020-01-13 23:50:14 +01:00
Dirk Wetter 91f8f33a6c add new basic checks, rename ca_hashes_up_to_date 2020-01-13 17:36:40 +01:00