From 9c627a75f027e2a6a9518869dc48fba28904ba49 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 12 Dec 2016 15:36:55 +0100 Subject: Use proper firmware version getter for feature availability check Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index a15b9c8..ddec600 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -589,13 +589,12 @@ namespace nitrokey{ } bool NitrokeyManager::is_authorization_command_supported(){ + //authorization command is supported for versions equal or below: auto m = std::unordered_map({ {DeviceModel::PRO, 7}, {DeviceModel::STORAGE, 43}, }); - auto status_p = GetStatus::CommandTransaction::run(*device); - //FIXME use different function for checking storage firmware version - return status_p.data().firmware_version <= m[device->get_device_model()]; + return get_major_firmware_version() <= m[device->get_device_model()]; } int NitrokeyManager::get_major_firmware_version(){ -- cgit v1.2.3