aboutsummaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-23 14:00:49 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:56 +0200
commit93350afd317250b4c5d4c2519dc7a9248f68cfdb (patch)
tree9295075cdc8aeacff91941234a0f74bc1597194e /NitrokeyManager.cc
parent40408740edce4558d2249b31a36e2c7a81045797 (diff)
downloadlibnitrokey-93350afd317250b4c5d4c2519dc7a9248f68cfdb.tar.gz
libnitrokey-93350afd317250b4c5d4c2519dc7a9248f68cfdb.tar.bz2
Get TOTP writing feedback
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
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) {