Implement SHE GET_ID command with client side request, server side handler, and tests#450
Draft
AlexLanzano wants to merge 1 commit into
Draft
Implement SHE GET_ID command with client side request, server side handler, and tests#450AlexLanzano wants to merge 1 commit into
AlexLanzano wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for the AUTOSAR SHE CMD_GET_ID command across the wolfHSM client/server messaging layer, exposing a client API to request module identity and implementing the server-side handler to return UID, status (SREG), and an identity CMAC.
Changes:
- Added
WH_SHE_GET_IDto the SHE action enum and introduced GET_ID request/response message types plus translation helpers. - Implemented client APIs (
wh_Client_SheGetId*) and server handler (_GetId) including SREG composition refactoring via_BuildSreg. - Added end-to-end and server-direct tests covering MAC verification, truncated request handling, empty
MASTER_ECU_KEYfallback-to-zero-key behavior, and pre-secure-boot allowance; updated docs accordingly.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| wolfhsm/wh_message.h | Adds WH_SHE_GET_ID action identifier. |
| wolfhsm/wh_message_she.h | Defines GET_ID request/response structs and translation function prototypes. |
| wolfhsm/wh_client_she.h | Adds public client API declarations and documentation for CMD_GET_ID. |
| src/wh_server_she.c | Implements server-side GET_ID handler, refactors SREG building into _BuildSreg, and updates state-gating/dispatch. |
| src/wh_message_she.c | Implements GET_ID request/response translation functions. |
| src/wh_client_she.c | Implements client request/response helpers and blocking wh_Client_SheGetId. |
| test/wh_test_she.c | Adds end-to-end GET_ID validation and server-direct GET_ID cases (empty key + pre-boot) plus req-size truncation test. |
| test/wh_test_check_struct_padding.c | Includes new GET_ID message structs in padding/struct compilation coverage. |
| test-refactor/server/wh_test_she_server.c | Adds GET_ID truncated request test in refactor suite. |
| test-refactor/misc/wh_test_check_struct_padding.c | Includes new GET_ID message structs in refactor padding coverage. |
| test-refactor/client-server/wh_test_she.c | Adds end-to-end GET_ID identity+MAC verification in refactor client-server test. |
| docs/src/5-Features.md | Documents wh_Client_SheGetId in the SHE client API feature list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.