Conversation
bigbrett
left a comment
There was a problem hiding this comment.
Can we make these new functionalities self-contained demos in the demo directory, rather than done inline in the client example driver?
Concur. Great idea. I'll switch this to draft as I rework. |
There was a problem hiding this comment.
Pull Request Overview
This PR enriches the wolfHSM demos by adding a full secure-boot workflow (provision, boot, zeroize), extends the TCP client/server examples with multiple crypto contexts, and standardizes demo header guards.
- Added secure-boot examples (
wh_demo_client_secboot.c) with provisioning, measurement, signing, verification, and zeroization. - Extended
wh_server_tcp.candwh_client_tcp.cto showcase software/hardware RNG contexts and added shared sleep/hex-dump helpers. - Renamed and unified header guards across all demo client headers and updated the demo driver to invoke the new examples.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/posix/tcp/wh_server_tcp/wh_server_tcp.c | Added _SleepMs, _HexDump, hardware RNG callback, and server crypto contexts for demos |
| examples/posix/tcp/wh_client_tcp/wh_client_tcp.c | Added _SleepMs, _HexDump and two client RNG contexts |
| examples/demo/client/wh_demo_client_wctest.h | Updated include guard to DEMO_CLIENT_WCTEST_H_ |
| examples/demo/client/wh_demo_client_wctest.c | Fixed include from counter to wctest header |
| examples/demo/client/wh_demo_client_wcbench.h | Updated include guard to DEMO_CLIENT_WCBENCH_H_ |
| examples/demo/client/wh_demo_client_secboot.h | Introduced secure-boot demo function declarations |
| examples/demo/client/wh_demo_client_secboot.c | Implemented provisioning, boot, and zeroize workflows |
| examples/demo/client/wh_demo_client_nvm.h | Updated include guard to DEMO_CLIENT_NVM_H_ |
| examples/demo/client/wh_demo_client_nvm.c | Reordered and cleaned up includes |
| examples/demo/client/wh_demo_client_keystore.h | Updated include guard to DEMO_CLIENT_KEYSTORE_H_ |
| examples/demo/client/wh_demo_client_keystore.c | Reordered and cleaned up includes |
| examples/demo/client/wh_demo_client_crypto.h | Updated include guard to DEMO_CLIENT_CRYPTO_H_ |
| examples/demo/client/wh_demo_client_crypto.c | Reordered and cleaned up includes |
| examples/demo/client/wh_demo_client_counter.h | Updated include guard to DEMO_CLIENT_COUNTER_H_ |
| examples/demo/client/wh_demo_client_counter.c | Fixed include order |
| examples/demo/client/wh_demo_client_all.h | Updated include guard to DEMO_CLIENT_ALL_H_ |
| examples/demo/client/wh_demo_client_all.c | Added SecBoot routines to the demo driver |
bigbrett
left a comment
There was a problem hiding this comment.
good addition. One typo that needs to be fixed, and a few other small things that could be punted or addressed
Adds 3 additional examples into the client demos:
Added crypto examples for 5 different usage context: