aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-03-18 16:36:58 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2019-03-19 08:18:48 +0100
commit59a81e5bc293959f75d977ded0ba091e985c3926 (patch)
treec4e450c4c053caf2fb22b3b6687437cbd960b162
parent486da104571bb881c66b33d59e4cb30800320344 (diff)
downloadlibnitrokey-59a81e5bc293959f75d977ded0ba091e985c3926.tar.gz
libnitrokey-59a81e5bc293959f75d977ded0ba091e985c3926.tar.bz2
Storage v0.54: activate tests for OTP320 and binary counter
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--unittest/test_pro.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/unittest/test_pro.py b/unittest/test_pro.py
index 6ab7c1d..7d3dc69 100644
--- a/unittest/test_pro.py
+++ b/unittest/test_pro.py
@@ -709,7 +709,7 @@ def test_OTP_secret_started_from_null(C, secret):
skip_if_device_version_lower_than({'S': 43, 'P': 8})
if len(secret) > 40:
# feature: 320 bit long secret handling
- skip_if_device_version_lower_than({'P': 8})
+ skip_if_device_version_lower_than({'P': 8, 'S': 54})
oath = pytest.importorskip("oath")
lib_at = lambda t: bb(oath.hotp(secret, t, format='dec6'))
@@ -741,8 +741,8 @@ def test_HOTP_slots_read_write_counter(C, counter):
:param counter:
"""
if counter >= 1e7:
- # Storage does not handle counters longer than 7 digits
- skip_if_device_version_lower_than({'P': 7})
+ # Storage v0.53 and below does not handle counters longer than 7 digits
+ skip_if_device_version_lower_than({'P': 7, 'S': 54})
secret = RFC_SECRET
oath = pytest.importorskip("oath")
@@ -804,8 +804,8 @@ def test_TOTP_secrets(C, secret):
skip_if_device_version_lower_than({'S': 44, 'P': 8})
if len(secret)>20*2: #*2 since secret is in hex
- # pytest.skip("Secret lengths over 20 bytes are not supported by NK Pro 0.7 and NK Storage")
- skip_if_device_version_lower_than({'P': 8})
+ # pytest.skip("Secret lengths over 20 bytes are not supported by NK Pro 0.7 and NK Storage v0.53 and older")
+ skip_if_device_version_lower_than({'P': 8, 'S': 54})
slot_number = 0
time = 0
period = 30
@@ -836,7 +836,7 @@ def test_HOTP_secrets(C, secret):
feature needed: support for 320bit secrets
"""
if len(secret)>40:
- skip_if_device_version_lower_than({'P': 8})
+ skip_if_device_version_lower_than({'P': 8, 'S': 54})
slot_number = 0
counter = 0