aboutsummaryrefslogtreecommitdiff
path: root/unittest
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan.zalega@gmail.com>2016-04-13 22:12:39 +0200
committerSzczepan Zalega <szczepan.zalega@gmail.com>2016-04-19 12:55:45 +0200
commit317694c0796c536bb3397f89db6f7d23e3b09100 (patch)
tree09e17435d37d71e822a946037a449e2d1275d260 /unittest
parent3988f6bf30e84434310048159f27573c21f459eb (diff)
downloadlibnitrokey-317694c0796c536bb3397f89db6f7d23e3b09100.tar.gz
libnitrokey-317694c0796c536bb3397f89db6f7d23e3b09100.tar.bz2
checking slots programmed with nitrokey app (should be moved to separate TC)
Signed-off-by: Szczepan Zalega <szczepan.zalega@gmail.com>
Diffstat (limited to 'unittest')
-rw-r--r--unittest/test_HOTP.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/unittest/test_HOTP.cc b/unittest/test_HOTP.cc
index 9db23ca..b263693 100644
--- a/unittest/test_HOTP.cc
+++ b/unittest/test_HOTP.cc
@@ -34,8 +34,9 @@ TEST_CASE("test secret", "[functions]") {
}
TEST_CASE("Test HOTP codes according to RFC", "[HOTP]") {
- Stick10 stick;
- bool connected = stick.connect();
+ Stick10 stick;
+ bool connected = stick.connect();
+
REQUIRE(connected == true);
Log::instance().set_loglevel(Loglevel::DEBUG);
@@ -84,6 +85,15 @@ TEST_CASE("Test HOTP codes according to RFC", "[HOTP]") {
auto resp = GetHOTP::CommandTransaction::run(stick, gh);
REQUIRE( resp.code == code);
}
+ //checking slot programmed before with nitro-app
+ /*
+ for( auto code: codes){
+ GetHOTP::CommandTransaction::CommandPayload gh;
+ gh.slot_number = 0x12;
+ auto resp = GetHOTP::CommandTransaction::run(stick, gh);
+ REQUIRE( resp.code == code);
+ }
+ */
}