From 54d59fa9ea2d9f7a57f1d6310d0914f59bff9c58 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Mon, 8 Aug 2016 18:03:31 +0200 Subject: Rename: auth_package -> authorize_package Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 3d90338..fb23ca1 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -24,7 +24,7 @@ namespace nitrokey{ // package type to auth, auth type [Authorize,UserAuthorize] template - void auth_package(T& package, const char* admin_temporary_password, shared_ptr device){ + void authorize_packet(T &package, const char *admin_temporary_password, shared_ptr device){ auto auth = get_payload(); strcpyT(auth.temporary_password, admin_temporary_password); auth.crc_to_authorize = S::CommandTransaction::getCRC(package); @@ -95,7 +95,7 @@ namespace nitrokey{ gh.slot_number = get_internal_slot_number_for_hotp(slot_number); if(user_temporary_password != nullptr && strlen(user_temporary_password)!=0){ //FIXME use string instead of strlen - auth_package(gh, user_temporary_password, device); + authorize_packet(gh, user_temporary_password, device); } auto resp = GetHOTP::CommandTransaction::run(*device, gh); @@ -120,7 +120,7 @@ namespace nitrokey{ gt.last_totp_time = last_totp_time; if(user_temporary_password != nullptr && strlen(user_temporary_password)!=0){ //FIXME use string instead of strlen - auth_package(gt, user_temporary_password, device); + authorize_packet(gt, user_temporary_password, device); } auto resp = GetTOTP::CommandTransaction::run(*device, gt); return resp.data().code; @@ -130,7 +130,7 @@ namespace nitrokey{ auto p = get_payload(); p.slot_number = slot_number; - auth_package(p, temporary_password, device); + authorize_packet(p, temporary_password, device); auto resp = EraseSlot::CommandTransaction::run(*device,p); return true; @@ -167,7 +167,7 @@ namespace nitrokey{ payload.use_enter = use_enter; payload.use_tokenID = use_tokenID; - auth_package(payload, temporary_password, device); + authorize_packet(payload, temporary_password, device); auto resp = WriteToHOTPSlot::CommandTransaction::run(*device, payload); return true; @@ -191,7 +191,7 @@ namespace nitrokey{ payload.use_enter = use_enter; payload.use_tokenID = use_tokenID; - auth_package(payload, temporary_password, device); + authorize_packet(payload, temporary_password, device); auto resp = WriteToTOTPSlot::CommandTransaction::run(*device, payload); return true; @@ -395,7 +395,7 @@ namespace nitrokey{ p.enable_user_password = (uint8_t) enable_user_password; p.delete_user_password = (uint8_t) delete_user_password; - auth_package(p, admin_temporary_password, device); + authorize_packet(p, admin_temporary_password, device); WriteGeneralConfig::CommandTransaction::run(*device, p); } -- cgit v1.2.3