summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-08-05 10:04:42 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-05 10:19:25 +0200
commit9eb8cb8d63fcde52e097dadf312f6f22393ad6fb (patch)
tree79e45a4a1458d42e676339c1aabeabbdf5091777
parentac7ac406ce7337976d0c24f1fa6ee6b951ce941d (diff)
downloadlibnitrokey-9eb8cb8d63fcde52e097dadf312f6f22393ad6fb.tar.gz
libnitrokey-9eb8cb8d63fcde52e097dadf312f6f22393ad6fb.tar.bz2
Do not catch exception in is_AES supported
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--NitrokeyManager.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index b61b2b2..e360ece 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -401,13 +401,10 @@ namespace nitrokey{
}
bool NitrokeyManager::is_AES_supported(const char *user_password) {
- try {
- auto a = get_payload<IsAESSupported>();
- strcpyT(a.user_password, user_password);
- IsAESSupported::CommandTransaction::run(*device, a);
- }
- catch (CommandFailedException &ex) {};
- return device->get_last_command_status() == 0;
+ auto a = get_payload<IsAESSupported>();
+ strcpyT(a.user_password, user_password);
+ IsAESSupported::CommandTransaction::run(*device, a);
+ return true;
}
} \ No newline at end of file