aboutsummaryrefslogtreecommitdiff
path: root/include/stick20_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-10-28 14:33:25 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-11-26 18:56:25 +0100
commit3b1926164b2e0eb91cf3a7e9c854cca85f7d4c8e (patch)
tree55a4c529734b5d36f95e64239684a96975159138 /include/stick20_commands.h
parente262c978f4cb8b448087102b68bbdcc731a090a0 (diff)
downloadlibnitrokey-3b1926164b2e0eb91cf3a7e9c854cca85f7d4c8e.tar.gz
libnitrokey-3b1926164b2e0eb91cf3a7e9c854cca85f7d4c8e.tar.bz2
Support for changing firmware update password and test
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick20_commands.h')
-rw-r--r--include/stick20_commands.h12
1 files changed, 7 insertions, 5 deletions
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<CommandID::DISABLE_CRYPTED_PARI> {};
class EnableFirmwareUpdate : public PasswordCommand<CommandID::ENABLE_FIRMWARE_UPDATE> {};
- class UpdatePassword : Command<CommandID::CHANGE_UPDATE_PIN> {
+ class ChangeUpdatePassword : Command<CommandID::CHANGE_UPDATE_PIN> {
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();
}
};