aboutsummaryrefslogtreecommitdiff
path: root/libnitrokey/stick10_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-06-13 15:01:23 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2019-06-13 15:01:23 +0200
commit3eb4856ed8c9a5a8179679f2432c01d382a9c07a (patch)
treea06f2f7dad5fe320677828b9f95d4482f0c4f7d9 /libnitrokey/stick10_commands.h
parent4a0da78d76906f052642e19dedf72f18298e5f9c (diff)
parent82e659779531a969155420f4f816b2458de3cfd5 (diff)
downloadlibnitrokey-3eb4856ed8c9a5a8179679f2432c01d382a9c07a.tar.gz
libnitrokey-3eb4856ed8c9a5a8179679f2432c01d382a9c07a.tar.bz2
Merge branch 'bootloader_pro'
Add bootloader support for the Nitrokey Pro v0.11+
Diffstat (limited to 'libnitrokey/stick10_commands.h')
-rw-r--r--libnitrokey/stick10_commands.h35
1 files changed, 35 insertions, 0 deletions
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<CommandID::NEW_AES_KEY> {
};
+class FirmwareUpdate : Command<CommandID::FIRMWARE_UPDATE> {
+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<command_id(), struct CommandPayload, struct EmptyPayload>
+ CommandTransaction;
+
+};
+
+class FirmwarePasswordChange : Command<CommandID::FIRMWARE_PASSWORD_CHANGE> {
+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<command_id(), struct CommandPayload, struct EmptyPayload>
+ CommandTransaction;
+
+};
+
+
}
}
}