diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0212ae8..bad7b01 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -34,7 +34,7 @@ jobs: os: ubuntu-latest build: cmake wolfssl: full - cmake_extra: -DWOLFCERT_WERROR=ON + cmake_extra: -DWOLFCERT_WERROR=ON -DWOLFCERT_ENABLE_EXAMPLES=ON - name: cmake-full-opensslextra os: ubuntu-latest build: cmake @@ -208,6 +208,19 @@ jobs: exit 1 fi + - name: Release tarball (make distcheck) + if: matrix.build == 'autoconf' + shell: bash + run: | + set -euo pipefail + trap '' PIPE + if ! make distcheck \ + DISTCHECK_CONFIGURE_FLAGS="--with-wolfssl=$WOLFSSL_PREFIX"; then + find wolfcert-* -name '*.log' \ + -exec sh -c 'echo "== $1 =="; cat "$1"' _ {} \; 2>/dev/null + exit 1 + fi + header-only: name: user_settings header-only build runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index e740ab8..0d27c88 100644 --- a/.gitignore +++ b/.gitignore @@ -72,6 +72,11 @@ cmake/wolfCertTargets.cmake /wolfcert-client /wolfcert-server +# Example binaries from an in-tree autoconf build +/examples/enroll_est +/examples/enroll_cryptocb +/examples/enroll_scep + # make sbom in the source tree /wolfcert-*.cdx.json /wolfcert-*.spdx.json diff --git a/AGENTS.md b/AGENTS.md index db1f622..d8620a8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -191,7 +191,7 @@ wolfcert_cleanup(); | `wolfcert/errors.h`, `wolfcert/status.h`, `wolfcert/log.h` | Error codes, last-error detail, log callback | | `wolfcert/memory.h` | Default heap hint, allocation macros | | `examples/` | `enroll_est.c`, `enroll_scep.c`, `enroll_cryptocb.c`, `user_settings.h.example` | -| `examples/certs/` | Test credentials; never ship them | +| `examples/certs/` | Test credentials; never deploy them | | `zephyr/samples/wolfcert_est_client/` | EST client on Zephyr (qemu_x86, FRDM-MCXN947) | | `src/` | Implementation; `src/internal.h` is not for applications | diff --git a/Makefile.am b/Makefile.am index 5b5ae96..26a4867 100644 --- a/Makefile.am +++ b/Makefile.am @@ -104,6 +104,23 @@ WOLFCERT_TEST_SERVER = $(abs_builddir)/wolfcert-server endif endif +noinst_PROGRAMS = + +if WOLFCERT_BUILD_EXAMPLES +if WOLFCERT_HAVE_EST +noinst_PROGRAMS += examples/enroll_est examples/enroll_cryptocb +endif +if WOLFCERT_HAVE_SCEP +noinst_PROGRAMS += examples/enroll_scep +endif +endif +examples_enroll_est_SOURCES = examples/enroll_est.c +examples_enroll_est_LDADD = libwolfcert.la $(WOLFSSL_LIBS) +examples_enroll_cryptocb_SOURCES = examples/enroll_cryptocb.c +examples_enroll_cryptocb_LDADD = libwolfcert.la $(WOLFSSL_LIBS) +examples_enroll_scep_SOURCES = examples/enroll_scep.c +examples_enroll_scep_LDADD = libwolfcert.la $(WOLFSSL_LIBS) + if WOLFCERT_BUILD_TESTS check_PROGRAMS = \ test_smoke test_keygen test_csr test_store test_http test_transport \ @@ -245,15 +262,35 @@ EXTRA_DIST = \ CMakeLists.txt \ wolfcert/options.h.in \ examples/user_settings.h.example \ + examples/CMakeLists.txt \ + examples/certs/README.md \ + examples/certs/gen-certs.sh \ + examples/certs/gen-server-cert.sh \ + examples/certs/ecc/ca-cert.pem \ + examples/certs/ecc/ca-key.pem \ + examples/certs/ecc/client-cert.pem \ + examples/certs/ecc/client-key.pem \ + examples/certs/ecc/server-cert.pem \ + examples/certs/ecc/server-key.pem \ + examples/certs/mldsa/ca-cert.pem \ + examples/certs/mldsa/ca-key.pem \ + examples/certs/mldsa/client-cert.pem \ + examples/certs/mldsa/client-key.pem \ + examples/certs/mldsa/server-cert.pem \ + examples/certs/mldsa/server-key.pem \ cmake/wolfCertConfig.cmake.in \ cmake/Config.cmake.in \ cmake/wolfCertConfigVersion.cmake.in \ cmake/wolfCertTargets.cmake.in \ cmake/wolfcert.pc.in \ + tests/CMakeLists.txt \ + tests/test_static_mem.h \ tests/integration/tls_test_util.h \ tests/integration/est_client_cases.h \ tests/integration/cli_proto_scoping.sh +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-tests --enable-examples + # Zephyr module port include zephyr/include.am diff --git a/docs/CI.md b/docs/CI.md index 4fe270b..f28026d 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -11,7 +11,7 @@ set skips the wolfSSL build entirely. | Workflow | Trigger | What it does | |----------|---------|--------------| -| `pr.yml` | PR + push | Merge gate: CMake (`-Werror`) + autoconf + ASan/UBSan on the canonical config, the same config against the minimum wolfSSL release (`cmake-full-floor`), plus per-PR feature/config gating — EST-only, SCEP-only, server-off, the key-alg variants (NO_RSA, ECC-only, RSA-only, no-3DES), TLS 1.3-only, the three ML-DSA per-level builds, the static-memory and no-malloc constrained builds, the platform-pieces-off build (`cmake-no-builtin-transport`), the freestanding ARM compile and config-resolution check (`no-posix-arm`), the header-only (`WOLFCERT_USER_SETTINGS`) build, a macOS build, and the two cheapest configure-must-fail assertions. | +| `pr.yml` | PR + push | Merge gate: CMake (`-Werror`, examples on) + autoconf (with a `make distcheck` of the release tarball) + ASan/UBSan on the canonical config, the same config against the minimum wolfSSL release (`cmake-full-floor`), plus per-PR feature/config gating — EST-only, SCEP-only, server-off, the key-alg variants (NO_RSA, ECC-only, RSA-only, no-3DES), TLS 1.3-only, the three ML-DSA per-level builds, the static-memory and no-malloc constrained builds, the platform-pieces-off build (`cmake-no-builtin-transport`), the freestanding ARM compile and config-resolution check (`no-posix-arm`), the header-only (`WOLFCERT_USER_SETTINGS`) build, a macOS build, and the two cheapest configure-must-fail assertions. | | `lint.yml` | PR + push | GPL license-header check and CMake↔autoconf parity of both the library and test source lists, plus the Zephyr module's library list and the version in `configure.ac`, `CMakeLists.txt` and `wolfcert/version.h` (`scripts/ci/check-buildsystem-parity.sh`). No wolfSSL build, so it fails in seconds. | | `sbom.yml` | PR + push | Generates the SBOM with `make sbom` and `cmake --build --target sbom` against the `full` wolfSSL config, from `options.h` and from `examples/user_settings.h.example`, checks each with `tools/sbom/validate_sbom.py`, `pyspdxtools` and `scripts/ci/check-sbom.py` (identity, license, hash source, that the library hash matches a real `make install` / `cmake --install`, the `options.h` feature set, the wolfSSL dependency version, no host paths), checks that a second run is byte-identical and that both build systems and both configuration modes record the same configuration, and checks `tools/sbom/` against its pinned wolfssl-compliance-tooling commit. See [`SBOM.md`](SBOM.md). | | `nightly.yml` | schedule + dispatch | Re-runs the wolfSSL-variant build matrix against fresh wolfSSL `master`, the macOS extras, and the full negative-config set. Also **reseeds the wolfSSL prefix caches** so the next day's PRs restore instead of build. The feature/config gating itself now runs per-PR (see `pr.yml`). |