aboutsummaryrefslogtreecommitdiff
path: root/unittest/test3.cc
diff options
context:
space:
mode:
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;