summaryrefslogtreecommitdiff
path: root/NitrokeyManager.cc
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-07-23 15:03:42 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-01 13:54:56 +0200
commit49ea52c45eee26be51df4969ca2af8c2b7c9ceb6 (patch)
tree91c0eb42eeda7286c8b5e83041b71e763f183d2e /NitrokeyManager.cc
parent7eb15813ffa2c2766e53245311b017c3b9c196fb (diff)
downloadlibnitrokey-49ea52c45eee26be51df4969ca2af8c2b7c9ceb6.tar.gz
libnitrokey-49ea52c45eee26be51df4969ca2af8c2b7c9ceb6.tar.bz2
Handling device errors through exceptions
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r--NitrokeyManager.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 39f1cff..e2dfa9d 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -115,11 +115,9 @@ namespace nitrokey{
strcpy((char *) (auth.temporary_password), temporary_password);
auth.crc_to_authorize = WriteToHOTPSlot::CommandTransaction::getCRC(payload);
Authorize::CommandTransaction::run(*device, auth);
- auto auth_successful = device->last_command_sucessfull();
auto resp = WriteToHOTPSlot::CommandTransaction::run(*device, payload);
- auto write_successful = device->last_command_sucessfull();
- return auth_successful && write_successful;
+ return true;
}
enum totp_config{digits8=0, enter=1, tokenID=2};