summaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
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 /NitrokeyManager.cc
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 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 7b8deaa..ea409ef 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -1167,4 +1167,18 @@ using nitrokey::misc::strcpyT;
return data.data();
};
+ void NitrokeyManager::enable_firmware_update_pro(const char *firmware_pin) {
+ auto p = get_payload<FirmwareUpdate>();
+ strcpyT(p.firmware_password, firmware_pin);
+ FirmwareUpdate::CommandTransaction::run(device, p);
+ }
+
+ void
+ NitrokeyManager::change_firmware_update_password_pro(const char *firmware_pin_current, const char *firmware_pin_new) {
+ auto p = get_payload<FirmwarePasswordChange>();
+ strcpyT(p.firmware_password_current, firmware_pin_current);
+ strcpyT(p.firmware_password_new, firmware_pin_new);
+ FirmwarePasswordChange::CommandTransaction::run(device, p);
+ }
+
}