Commit Graph
5 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 13111ef2b0 Add cleanup 2026-10-16 19:34:47 +02:00
Dirk Wetter fb6f4f1d24 Fix comment 2026-10-16 14:12:29 +02:00
Dirk 26c77cc3c2 any openssl will do 2017-09-18 14:02:12 +02:00
Frank Breedijk 5d7367a68d Shell script to generate ca_hashes.txt (OSX only) 2016-07-25 09:47:24 +02:00