Skip to content

Add WOLFCOSE_LEAN config layer with WOLFCOSE_HAVE_* feature gates#42

Merged
mattia-moffa merged 1 commit into
mainfrom
lean-sign1-build
Jun 5, 2026
Merged

Add WOLFCOSE_LEAN config layer with WOLFCOSE_HAVE_* feature gates#42
mattia-moffa merged 1 commit into
mainfrom
lean-sign1-build

Conversation

@aidangarske
Copy link
Copy Markdown
Member

@aidangarske aidangarske commented Jun 2, 2026

  • Default unchanged: all wolfSSL-provided algorithms enabled, no breaking change
  • New WOLFCOSE_LEAN: core-only build (Sign1/Encrypt0/Mac0 + ES256/AES-GCM/HMAC-256)
  • Extensions opt-in with WOLFCOSE_ENABLE_<X>; WOLFCOSE_ENABLE_ALL enables all
  • New include/wolfcose/settings.h resolves config into WOLFCOSE_HAVE_* flags
  • Default adapts to wolfSSL; explicit enable of a missing capability is a #error
  • Sources/tests/examples gate on WOLFCOSE_HAVE_*, so lean make test runs only enabled algos
  • Key-setter prototypes aligned with impls; CBOR / AES-wrap / ECDH-ES #error guards added
  • Enabled scenario examples that were silently disabled on main; fixed flaky group-broadcast tamper check
  • No Makefile change; only MISRA workflow stale-macro fix
  • Update docs
  • addresses WOLFCOSE_LEAN Minimal Build Profile #21
  • addresses user_settings update to cohesively enable/disable features #11

Copilot AI review requested due to automatic review settings June 2, 2026 23:44

This comment was marked as resolved.

@aidangarske aidangarske marked this pull request as draft June 2, 2026 23:54
@aidangarske aidangarske self-assigned this Jun 3, 2026
@aidangarske aidangarske changed the title Make wolfCOSE small by default with NO_/ENABLE_ feature gates Add WOLFCOSE_LEAN config layer with WOLFCOSE_HAVE_* feature gates Jun 3, 2026
wolfSSL-Fenrir-bot

This comment was marked as low quality.

@aidangarske aidangarske added enhancement New feature or request feature Feature addition labels Jun 3, 2026
@aidangarske aidangarske force-pushed the lean-sign1-build branch 2 times, most recently from 33b0c75 to 1000ac9 Compare June 3, 2026 18:46
@aidangarske aidangarske marked this pull request as ready for review June 3, 2026 19:18
Copy link
Copy Markdown
Member

@mattia-moffa mattia-moffa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There still seem to be references to raw HAVE_ECC which should probably be WOLFCOSE_HAVE_ECDSA: src/wolfcose.c at lines 4072, 4241, 4669 (the latter two also call wolfCose_EccSignRaw / wolfCose_EccVerifyRaw which are only defined with WOLFCOSE_HAVE_ECDSA).

Also WOLFCOSE_HAVE_CHACHA20/AESCCM/HMAC384/HMAC512/AESMAC seem to only be used in the tests and examples, not in the source.

@mattia-moffa mattia-moffa merged commit 6456084 into main Jun 5, 2026
62 checks passed
@aidangarske aidangarske deleted the lean-sign1-build branch June 5, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature Feature addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants