aboutsummaryrefslogtreecommitdiff
path: root/unittest/test3.cc
diff options
context:
space:
mode:
authorElie Tournier <tournier.elie@gmail.com>2017-04-18 13:32:27 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2017-05-25 15:14:09 +0200
commit2428f3ad0a5542a996c16ef80fd7bbd2be5bb5c6 (patch)
tree2adb0370cf498acf12770d1e48439aee7055e9b1 /unittest/test3.cc
parent05ae75697be8df1b2179035d3ef8dc6b2e7fe30f (diff)
downloadlibnitrokey-2428f3ad0a5542a996c16ef80fd7bbd2be5bb5c6.tar.gz
libnitrokey-2428f3ad0a5542a996c16ef80fd7bbd2be5bb5c6.tar.bz2
Rename functions: s/stick10/NKPro and s/stick20/NKStorage
Signed-off-by: Elie Tournier <tournier.elie@gmail.com>
Diffstat (limited to 'unittest/test3.cc')
-rw-r--r--unittest/test3.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/unittest/test3.cc b/unittest/test3.cc
index 9e0ef11..65680ad 100644
--- a/unittest/test3.cc
+++ b/unittest/test3.cc
@@ -11,13 +11,13 @@ const char * RFC_SECRET = "12345678901234567890";
#include <NitrokeyManager.h>
#include "device_proto.h"
#include "log.h"
-#include "stick10_commands_0.8.h"
-//#include "stick20_commands.h"
+#include "NKPro_commands_0.8.h"
+//#include "NKStorage_commands.h"
using namespace std;
using namespace nitrokey::device;
using namespace nitrokey::proto;
-using namespace nitrokey::proto::stick10_08;
+using namespace nitrokey::proto::NKPro_08;
using namespace nitrokey::log;
using namespace nitrokey::misc;
@@ -52,20 +52,20 @@ TEST_CASE("write slot", "[pronew]"){
strcpyT(p2.temporary_admin_password, temporary_password);
p2.setTypeName();
strcpyT(p2.data, "test name aaa");
- stick10_08::SendOTPData::CommandTransaction::run(stick, p2);
+ NKPro_08::SendOTPData::CommandTransaction::run(stick, p2);
p2 = get_payload<SendOTPData>();
strcpyT(p2.temporary_admin_password, temporary_password);
strcpyT(p2.data, RFC_SECRET);
p2.setTypeSecret();
- stick10_08::SendOTPData::CommandTransaction::run(stick, p2);
+ NKPro_08::SendOTPData::CommandTransaction::run(stick, p2);
auto p = get_payload<WriteToOTPSlot>();
strcpyT(p.temporary_admin_password, temporary_password);
p.use_8_digits = true;
p.slot_number = 0 + 0x10;
p.slot_counter_or_interval = 0;
- stick10_08::WriteToOTPSlot::CommandTransaction::run(stick, p);
+ NKPro_08::WriteToOTPSlot::CommandTransaction::run(stick, p);
auto pc = get_payload<WriteGeneralConfig>();
pc.enable_user_password = 0;
@@ -135,20 +135,20 @@ TEST_CASE("authorize user HOTP", "[pronew]") {
strcpyT(p2.temporary_admin_password, temporary_password);
p2.setTypeName();
strcpyT(p2.data, "test name aaa");
- stick10_08::SendOTPData::CommandTransaction::run(stick, p2);
+ NKPro_08::SendOTPData::CommandTransaction::run(stick, p2);
p2 = get_payload<SendOTPData>();
strcpyT(p2.temporary_admin_password, temporary_password);
strcpyT(p2.data, RFC_SECRET);
p2.setTypeSecret();
- stick10_08::SendOTPData::CommandTransaction::run(stick, p2);
+ NKPro_08::SendOTPData::CommandTransaction::run(stick, p2);
auto p = get_payload<WriteToOTPSlot>();
strcpyT(p.temporary_admin_password, temporary_password);
p.use_8_digits = true;
p.slot_number = 0 + 0x10;
p.slot_counter_or_interval = 0;
- stick10_08::WriteToOTPSlot::CommandTransaction::run(stick, p);
+ NKPro_08::WriteToOTPSlot::CommandTransaction::run(stick, p);
auto p3 = get_payload<GetHOTP>();
@@ -186,20 +186,20 @@ TEST_CASE("authorize user TOTP", "[pronew]") {
strcpyT(p2.temporary_admin_password, temporary_password);
p2.setTypeName();
strcpyT(p2.data, "test name TOTP");
- stick10_08::SendOTPData::CommandTransaction::run(stick, p2);
+ NKPro_08::SendOTPData::CommandTransaction::run(stick, p2);
p2 = get_payload<SendOTPData>();
strcpyT(p2.temporary_admin_password, temporary_password);
strcpyT(p2.data, RFC_SECRET);
p2.setTypeSecret();
- stick10_08::SendOTPData::CommandTransaction::run(stick, p2);
+ NKPro_08::SendOTPData::CommandTransaction::run(stick, p2);
auto p = get_payload<WriteToOTPSlot>();
strcpyT(p.temporary_admin_password, temporary_password);
p.use_8_digits = true;
p.slot_number = 0 + 0x20;
p.slot_counter_or_interval = 30;
- stick10_08::WriteToOTPSlot::CommandTransaction::run(stick, p);
+ NKPro_08::WriteToOTPSlot::CommandTransaction::run(stick, p);
auto p_get_totp = get_payload<GetTOTP>();
p_get_totp.slot_number = 0 + 0x20;