summaryrefslogtreecommitdiff
path: root/unittest/test_bindings.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-08-02 13:38:22 +0200
committerSzczepan Zalega <szczepan@nitrokey.com>2016-08-05 10:17:30 +0200
commitb1fbfa8eede1f2f9d003e49c027d5e4cb8a56bfe (patch)
tree4bb4e70f50de02ef09824256072f489242a13187 /unittest/test_bindings.py
parent24b1ff2b610b3af78bdb894e17a31ea937dd0d3e (diff)
downloadlibnitrokey-b1fbfa8eede1f2f9d003e49c027d5e4cb8a56bfe.tar.gz
libnitrokey-b1fbfa8eede1f2f9d003e49c027d5e4cb8a56bfe.tar.bz2
Support for command: is_aes_supported
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'unittest/test_bindings.py')
-rw-r--r--unittest/test_bindings.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittest/test_bindings.py b/unittest/test_bindings.py
index ddae6e7..d65eeaf 100644
--- a/unittest/test_bindings.py
+++ b/unittest/test_bindings.py
@@ -121,6 +121,7 @@ def test_issue_device_locks_on_second_key_generation_in_sequence(C):
def test_regenerate_aes_key(C):
C.NK_set_debug(True)
+ assert C.NK_first_authenticate(DefaultPasswords.ADMIN, DefaultPasswords.ADMIN_TEMP) == DeviceErrorCode.STATUS_OK
assert C.NK_build_aes_key(DefaultPasswords.ADMIN) == DeviceErrorCode.STATUS_OK
assert C.NK_enable_password_safe(DefaultPasswords.USER) == DeviceErrorCode.STATUS_OK
@@ -157,6 +158,11 @@ def test_destroy_password_safe(C):
assert is_slot_programmed[0] == 0
+def test_is_AES_supported(C):
+ aes_supported = C.NK_is_AES_supported(DefaultPasswords.USER)
+ assert aes_supported == 1
+ assert C.NK_get_last_command_status() == DeviceErrorCode.STATUS_OK
+
def test_admin_PIN_change(C):
new_password = '123123123'