aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-03-18 16:19:53 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2019-03-18 16:19:53 +0100
commitf3c5653a0193312a47fe52a9132cf0f5a8bd83eb (patch)
tree31769c5bf4c98f22390d62d8737f1a2819df403c
parent37fa02a2f6b03ecc45f54a02445a5c990164a84f (diff)
downloadlibnitrokey-f3c5653a0193312a47fe52a9132cf0f5a8bd83eb.tar.gz
libnitrokey-f3c5653a0193312a47fe52a9132cf0f5a8bd83eb.tar.bz2
Storage v0.54: send slot counter as binary integer, instead of string repr
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--NitrokeyManager.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc
index 7b8deaa..9562be1 100644
--- a/NitrokeyManager.cc
+++ b/NitrokeyManager.cc
@@ -556,8 +556,12 @@ using nitrokey::misc::strcpyT;
break;
}
case DeviceModel::STORAGE: {
- string counter = to_string(hotp_counter);
- strcpyT(payload.slot_counter_s, counter.c_str());
+ if (get_minor_firmware_version() <= 53) {
+ string counter = to_string(hotp_counter);
+ strcpyT(payload.slot_counter_s, counter.c_str());
+ } else {
+ payload.slot_counter = hotp_counter;
+ }
break;
}
default: