Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ cc_library(
srcs = ["htool_provisioning.c"],
hdrs = ["htool_provisioning.h"],
deps = [
":host_commands",
":htool_cmd",
":htool_header",
":htool_macros",
":htool_security_version",
"//protocol:host_cmd",
"//protocol:provisioning",
"//transports:libhoth_device",
],
)
Expand Down Expand Up @@ -267,6 +265,7 @@ cc_binary(
"//protocol:payload_status",
"//protocol:payload_update",
"//protocol:progress",
"//protocol:provisioning",
"//protocol:reboot",
"//protocol:rot_firmware_version",
"//protocol:secure_boot",
Expand All @@ -293,7 +292,6 @@ cc_test(
":host_commands",
":htool_cmd",
":htool_provisioning",
":htool_security_version",
"//examples/test:test_util",
"//protocol:host_cmd",
"//protocol/test:libhoth_device_mock",
Expand Down
6 changes: 0 additions & 6 deletions examples/host_commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ struct hoth_response_flash_spi_info {
*/
#define HOTH_BASE_CMD(cmd) (HOTH_CMD_BOARD_SPECIFIC_BASE + (cmd))

/* The major command identifier for the Provisioning Log read host command. */
#define HOTH_PRV_CMD_HOTH_PROVISIONING_LOG 0x0040

/**
* The request header structure for security v2 commands
*/
Expand Down Expand Up @@ -367,7 +364,4 @@ struct hoth_response_target_control {
}
#endif

// Host Command for Provisioning Commands
#define HOTH_PRV_CMD_HOTH_PROVISIONING_LOG 0x0040

#endif // LIBHOTH_EXAMPLES_HOST_COMMANDS_H_
31 changes: 31 additions & 0 deletions examples/htool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,37 @@ static const struct htool_cmd CMDS[] = {
.desc = "The signed cert file."},
{}},
},
{
.verbs = (const char*[]){"provisioning", "store_secrets", NULL},
.desc = "Store secrets encrypted with the provisioning encryption key",
.func = htool_provisioning_store_secrets,
.params =
(const struct htool_param[]){
{HTOOL_FLAG_VALUE, .name = "secrets", .default_value = "",
.desc = "File containing the encrypted secrets."},
{}},
},
{
.verbs = (const char*[]){"provisioning", "write", NULL},
.desc = "Write and commit the provisioning log",
.func = htool_provisioning_write,
.params =
(const struct htool_param[]){
{HTOOL_FLAG_VALUE, .name = "input", .default_value = "",
.desc = "File containing the provisioning log to write."},
{}},
},
{
.verbs = (const char*[]){"provisioning", "load_mldsa_key", NULL},
.desc = "Load the ML-DSA-44 public key to the RoT",
.func = htool_provisioning_load_mldsa_key,
.params =
(const struct htool_param[]){
{HTOOL_FLAG_VALUE, .name = "key", .default_value = "",
.desc = "Path to the ML-DSA-44 public key file. Must be "
"exactly 1312 raw bytes."},
{}},
},
{
.verbs = (const char*[]){"security", "get_alias_key_cert", NULL},
.desc = "Get the Alias Key Cert",
Expand Down
Loading
Loading