From 6d42e3d56a6851fa2463ef45226fd027867d74a7 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 20 Jul 2016 07:55:44 +0200 Subject: Comments. Fix crc to authorize in write hotp Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index a2b324e..6058cbb 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -9,6 +9,7 @@ namespace nitrokey{ template auto get_payload(){ + //Create, initialize and return by value command payload typename T::CommandPayload st; bzero(&st, sizeof(st)); return st; @@ -107,11 +108,11 @@ namespace nitrokey{ strcpy((char *) payload.slot_secret, secret); strcpy((char *) payload.slot_name, slot_name); payload.slot_counter = hotp_counter; - payload.slot_config; + payload.slot_config; //TODO auto auth = get_payload(); strcpy((char *) (auth.temporary_password), temporary_password); - auth.crc_to_authorize = auth.crc_to_authorize = WriteToHOTPSlot::CommandTransaction::getCRC(payload); + auth.crc_to_authorize = WriteToHOTPSlot::CommandTransaction::getCRC(payload); Authorize::CommandTransaction::run(*device, auth); auto resp = WriteToHOTPSlot::CommandTransaction::run(*device, payload); -- cgit v1.2.3