aboutsummaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 8b0fff6..5ef340c 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -144,9 +144,11 @@ namespace nitrokey{
strcpy((char *) (auth.temporary_password), temporary_password);
auth.crc_to_authorize = WriteToTOTPSlot::CommandTransaction::getCRC(payload);
Authorize::CommandTransaction::run(*device, auth);
+ auto auth_successful = device->last_command_sucessfull();
auto resp = WriteToTOTPSlot::CommandTransaction::run(*device, payload);
- return false;
+ auto write_successful = device->last_command_sucessfull();
+ return auth_successful && write_successful;
}
const char * NitrokeyManager::get_totp_slot_name(uint8_t slot_number) {