diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2019-03-19 08:20:01 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2019-03-19 08:20:01 +0100 |
commit | 07ab86a31ca07c58c58632d9b3845e9782855d0b (patch) | |
tree | e9efbc4a60a81bf7bfbe461691a916f9eccb6704 /NitrokeyManager.cc | |
parent | 3788515d6546971a3ac6e46769fb8d6e6d24e159 (diff) | |
parent | ee79dfdaf06a865cb4c5e26daac1280c9ca09905 (diff) | |
download | libnitrokey-07ab86a31ca07c58c58632d9b3845e9782855d0b.tar.gz libnitrokey-07ab86a31ca07c58c58632d9b3845e9782855d0b.tar.bz2 |
Merge branch '154-storage54'
Add support for the Storage v0.54:
- use binary OTP counter
- handle 320 bit OTP secret
- enable tests for these features
Fixes #153
Fixes #154
Diffstat (limited to 'NitrokeyManager.cc')
-rw-r--r-- | NitrokeyManager.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 0320ebb..7b8deaa 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -906,16 +906,16 @@ using nitrokey::misc::strcpyT; //authorization command is supported for versions equal or below: auto m = std::unordered_map<DeviceModel , int, EnumClassHash>({ {DeviceModel::PRO, 7}, - {DeviceModel::STORAGE, 999}, + {DeviceModel::STORAGE, 53}, }); return get_minor_firmware_version() <= m[device->get_device_model()]; } bool NitrokeyManager::is_320_OTP_secret_supported(){ - //authorization command is supported for versions equal or below: + // 320 bit OTP secret is supported by version bigger or equal to: auto m = std::unordered_map<DeviceModel , int, EnumClassHash>({ {DeviceModel::PRO, 8}, - {DeviceModel::STORAGE, 999}, + {DeviceModel::STORAGE, 54}, }); return get_minor_firmware_version() >= m[device->get_device_model()]; } |