From 3b1926164b2e0eb91cf3a7e9c854cca85f7d4c8e Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 28 Oct 2016 14:33:25 +0200 Subject: Support for changing firmware update password and test Signed-off-by: Szczepan Zalega --- include/stick20_commands.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/stick20_commands.h b/include/stick20_commands.h index a1e65c2..676b3df 100644 --- a/include/stick20_commands.h +++ b/include/stick20_commands.h @@ -99,15 +99,17 @@ namespace nitrokey { class DisableHiddenEncryptedPartition : public PasswordCommand {}; class EnableFirmwareUpdate : public PasswordCommand {}; - class UpdatePassword : Command { + class ChangeUpdatePassword : Command { public: struct CommandPayload { - uint8_t old_password[15]; - uint8_t new_password[15]; + uint8_t __gap; + uint8_t current_update_password[20]; + uint8_t __gap2; + uint8_t new_update_password[20]; std::string dissect() const { std::stringstream ss; - print_to_ss( old_password ); - print_to_ss( new_password ); + print_to_ss( current_update_password ); + print_to_ss( new_update_password ); return ss.str(); } }; -- cgit v1.2.1