Skip to content

Conversation

benpicco
Copy link
Contributor

Contribution description

If we only have access the the public key, we don't want it to be accidentally overwritten by the build system.

Intrudce a new SUIT_GEN_PUBKEY that defaults to 1, but can be set to 0 to disable auto-generating the public key from the private key (and generating a new private/public key pair if the private key does not exist).

Testing procedure

  • delete ~/.local/share/RIOT/keys/default.pem (assuming default.pem.pub already exists)
  • try to build examples/advanced/suit_update
    • it asks you to generate a new key pair. Abort that.
  • try to build examples/advanced/suit_update with SUIT_GEN_PUBKEY=0
    • the build succeeds without a private key

Issues/PRs references

If we only have access the the public key, we don't want it to be
accidentally overwritten by the build system.

Intrudce a new `SUIT_GEN_PUBKEY` that defaults to 1, but can be set
to 0 to disable auto-generating the public key from the private key
(and generating a new private/public key pair if the private key does
not exist).
@github-actions github-actions bot added the Area: build system Area: Build system label Aug 18, 2025
@benpicco benpicco changed the title makefiles/suit: add SUIT_GEN_PUBKEY variable to inhibit pubkey gen makefiles/suit: add SUIT_GEN_PUBKEY variable to inhibit pubkey gen Aug 18, 2025
@benpicco benpicco added Area: OTA Area: Over-the-air updates CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 18, 2025
@benpicco benpicco changed the title makefiles/suit: add SUIT_GEN_PUBKEY variable to inhibit pubkey gen makefiles/suit: add SUIT_GEN_PUBKEY variable to inhibit public key generation Aug 18, 2025
@benpicco benpicco requested review from maribu and fabian18 August 18, 2025 16:52
@riot-ci
Copy link

riot-ci commented Aug 18, 2025

Murdock results

✔️ PASSED

cd43084 makefiles/suit: add SUIT_GEN_PUBKEY variable to inhibit pubkey gen

Success Failures Total Runtime
10560 0 10560 13m:42s

Artifacts

@crasbe
Copy link
Contributor

crasbe commented Aug 18, 2025

It would be nice if you could add some documentation in the Doxygen generated SUIT documentation about this. Otherwise this may become a "hidden gem" that nobody else knows about and therefore nobody uses.

@benpicco
Copy link
Contributor Author

Where would I add this? Just in suit.h?

@crasbe
Copy link
Contributor

crasbe commented Aug 19, 2025

Since suit does not appear to have a doc.md file (yet?), that would indeed be the best place, yes.

@crasbe crasbe added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation State: waiting for author State: Action by the author of the PR is required labels Sep 4, 2025
@benpicco benpicco added this pull request to the merge queue Sep 11, 2025
@crasbe
Copy link
Contributor

crasbe commented Sep 11, 2025

You didn't add the documentation yet :(

Merged via the queue into RIOT-OS:master with commit 63c2a81 Sep 11, 2025
33 checks passed
@benpicco benpicco deleted the suit/SUIT_GEN_PUBKEY branch September 11, 2025 13:11
@benpicco
Copy link
Contributor Author

I'll write a proper documentation for all those SUIT options in a separate PR 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: OTA Area: Over-the-air updates CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: waiting for author State: Action by the author of the PR is required Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants