From fe8161ba51d65382a20650a75f06e1cc7b753e68 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Tue, 9 Jul 2019 11:34:53 +0000 Subject: Check retry count before building AES key in test Due to a timing issue, some calls to the build_aes_key function may fail after a factory reset. As a workaround for this firmware bug, we check the user retry count before building the aes key in the factory_reset test. For details, see the upstream issue: https://github.com/Nitrokey/nitrokey-pro-firmware/issues/57 --- tests/device.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/device.rs b/tests/device.rs index a2bdfb5..e367558 100644 --- a/tests/device.rs +++ b/tests/device.rs @@ -344,6 +344,7 @@ fn factory_reset(device: DeviceWrapper) { assert_utf8_err_or_ne("testpw", pws.get_slot_password(0)); drop(pws); + assert_ok!(3, device.get_user_retry_count()); assert_ok!((), device.build_aes_key(DEFAULT_ADMIN_PIN)); } -- cgit v1.2.3