aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-11-09 18:30:07 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2016-12-03 16:01:48 +0100
commit90bf7f564c50bf48799056179dbc5a09b7782d27 (patch)
tree9023ebbb5bf1a18c01ca156dc380f9abc1f158d0
parent17a1961704791c61fd69889867b3285c37539b59 (diff)
downloadlibnitrokey-90bf7f564c50bf48799056179dbc5a09b7782d27.tar.gz
libnitrokey-90bf7f564c50bf48799056179dbc5a09b7782d27.tar.bz2
Check firware version in Pro 0.8 test
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--include/stick10_commands_0.8.h1
-rw-r--r--unittest/test3.cc7
2 files changed, 8 insertions, 0 deletions
diff --git a/include/stick10_commands_0.8.h b/include/stick10_commands_0.8.h
index cee0d78..9099b3d 100644
--- a/include/stick10_commands_0.8.h
+++ b/include/stick10_commands_0.8.h
@@ -24,6 +24,7 @@ namespace nitrokey {
using stick10::FirstAuthenticate;
using stick10::UserAuthenticate;
using stick10::SetTime;
+ using stick10::GetStatus;
class EraseSlot : Command<CommandID::ERASE_SLOT> {
public:
diff --git a/unittest/test3.cc b/unittest/test3.cc
index bd6f2a5..7f779a5 100644
--- a/unittest/test3.cc
+++ b/unittest/test3.cc
@@ -148,6 +148,13 @@ TEST_CASE("authorize user HOTP", "[pronew]") {
}
+TEST_CASE("check firmware version", "[pronew]") {
+ Stick10 stick;
+ connect_and_setup(stick);
+
+ auto p = GetStatus::CommandTransaction::run(stick);
+ REQUIRE(p.data().firmware_version == 8);
+}
TEST_CASE("authorize user TOTP", "[pronew]") {
Stick10 stick;