aboutsummaryrefslogtreecommitdiff
path: root/unittest/misc.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2018-03-01 19:41:35 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2018-03-02 11:13:08 +0100
commitc3d615b659b608f3a1d624f6fc78c303efbe1f8e (patch)
tree2d186dec6976b12a9f7b37e589c02703275a30ef /unittest/misc.py
parentf5da7b4cbd508faef38fcdfff659fab5c4649838 (diff)
downloadlibnitrokey-c3d615b659b608f3a1d624f6fc78c303efbe1f8e.tar.gz
libnitrokey-c3d615b659b608f3a1d624f6fc78c303efbe1f8e.tar.bz2
Correct firmware version getting in Pro tests
Done for Pro devices Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/misc.py')
-rw-r--r--unittest/misc.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/unittest/misc.py b/unittest/misc.py
index a41f2b2..8be915d 100644
--- a/unittest/misc.py
+++ b/unittest/misc.py
@@ -43,7 +43,7 @@ def cast_pointer_to_tuple(obj, typen, len):
def get_devices_firmware_version(C):
- firmware = C.NK_get_major_firmware_version()
+ firmware = C.NK_get_minor_firmware_version()
return firmware
@@ -54,7 +54,7 @@ def is_pro_rtm_07(C):
def is_pro_rtm_08(C):
firmware = get_devices_firmware_version(C)
- return firmware == 8
+ return firmware in [8,9]
def is_storage(C):
@@ -62,7 +62,8 @@ def is_storage(C):
exact firmware storage is sent by other function
"""
# TODO identify connected device directly
- return not is_pro_rtm_08(C) and not is_pro_rtm_07(C)
+ firmware = get_devices_firmware_version(C)
+ return firmware >= 45
def is_long_OTP_secret_handled(C):