From 344213284962aab6c21bc12331f5306f4a2c79ab Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 9 Aug 2016 13:06:52 +0200 Subject: Remove surplus string length assertions (it is done during copying anyway) Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index 83412b1..6d0a24c 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -153,8 +153,6 @@ namespace nitrokey{ bool use_8_digits, bool use_enter, bool use_tokenID, const char *token_ID, const char *temporary_password) { assert(is_valid_hotp_slot_number(slot_number)); - assert(strlen(secret)==20); //160 bits - assert(strlen(slot_name)<=15); slot_number = get_internal_slot_number_for_hotp(slot_number); auto payload = get_payload(); @@ -178,8 +176,6 @@ namespace nitrokey{ const char *temporary_password) { auto payload = get_payload(); assert(is_valid_totp_slot_number(slot_number)); - assert(strlen(secret) == sizeof payload.slot_secret); //160 bits - assert(strlen(slot_name) <= sizeof payload.slot_name); slot_number = get_internal_slot_number_for_totp(slot_number); payload.slot_number = slot_number; @@ -217,10 +213,6 @@ namespace nitrokey{ bool NitrokeyManager::first_authenticate(const char *pin, const char *temporary_password) { auto authreq = get_payload(); - - assert(strlen(pin) < sizeof authreq.card_password); - assert(strlen(temporary_password) < sizeof authreq.temporary_password); - strcpyT(authreq.card_password, pin); strcpyT(authreq.temporary_password, temporary_password); FirstAuthenticate::CommandTransaction::run(*device, authreq); -- cgit v1.2.3