From 5d0789af44ffdcdd7d3de30582fe51d1d2ceb22d Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Thu, 13 Jun 2019 13:55:36 +0200 Subject: Define commands structs Signed-off-by: Szczepan Zalega --- libnitrokey/stick10_commands.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/libnitrokey/stick10_commands.h b/libnitrokey/stick10_commands.h index f2ffba2..178b23f 100644 --- a/libnitrokey/stick10_commands.h +++ b/libnitrokey/stick10_commands.h @@ -882,6 +882,41 @@ class BuildAESKey : Command { }; +class FirmwareUpdate : Command { +public: + struct CommandPayload { + uint8_t firmware_password[20]; + std::string dissect() const { + std::stringstream ss; + print_to_ss_volatile(firmware_password); + return ss.str(); + } + } __packed; + + typedef Transaction + CommandTransaction; + +}; + +class FirmwarePasswordChange : Command { +public: + struct CommandPayload { + uint8_t firmware_password_current[20]; + uint8_t firmware_password_new[20]; + std::string dissect() const { + std::stringstream ss; + print_to_ss_volatile(firmware_password_current); + print_to_ss_volatile(firmware_password_new); + return ss.str(); + } + } __packed; + + typedef Transaction + CommandTransaction; + +}; + + } } } -- cgit v1.2.1